mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
analysis result scores
This commit is contained in:
parent
c7ca74aa05
commit
83e0bcb1e8
@ -37,7 +37,6 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoAccount;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeNormalizationException;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeUtil;
|
||||
@ -63,12 +62,9 @@ import org.sleuthkit.datamodel.Image;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.Persona;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.PersonaAccount;
|
||||
import org.sleuthkit.datamodel.Account;
|
||||
import static org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT;
|
||||
import org.sleuthkit.datamodel.CommunicationsUtils;
|
||||
import org.sleuthkit.datamodel.Score;
|
||||
import org.sleuthkit.datamodel.Score.MethodCategory;
|
||||
import org.sleuthkit.datamodel.Score.Significance;
|
||||
|
||||
/**
|
||||
* Listen for ingest events and update entries in the Central Repository
|
||||
@ -76,7 +72,7 @@ import org.sleuthkit.datamodel.Score;
|
||||
*/
|
||||
@NbBundle.Messages({"IngestEventsListener.ingestmodule.name=Central Repository"})
|
||||
public class IngestEventsListener {
|
||||
|
||||
private static final Score LIKELY_NOTABLE_SCORE = new Score(Significance.LIKELY_NOTABLE, MethodCategory.AUTO);
|
||||
private static final Logger LOGGER = Logger.getLogger(CorrelationAttributeInstance.class.getName());
|
||||
private static final Set<IngestManager.IngestJobEvent> INGEST_JOB_EVENTS_OF_INTEREST = EnumSet.of(IngestManager.IngestJobEvent.DATA_SOURCE_ANALYSIS_COMPLETED);
|
||||
private static final Set<IngestManager.IngestModuleEvent> INGEST_MODULE_EVENTS_OF_INTEREST = EnumSet.of(DATA_ADDED);
|
||||
@ -216,17 +212,17 @@ public class IngestEventsListener {
|
||||
@NbBundle.Messages({"IngestEventsListener.prevTaggedSet.text=Previously Tagged As Notable (Central Repository)",
|
||||
"IngestEventsListener.prevCaseComment.text=Previous Case: "})
|
||||
static private void makeAndPostPreviousNotableArtifact(BlackboardArtifact originalArtifact, List<String> caseDisplayNames) {
|
||||
|
||||
Collection<BlackboardAttribute> attributesForNewArtifact = Arrays.asList(new BlackboardAttribute(
|
||||
TSK_SET_NAME, MODULE_NAME,
|
||||
Bundle.IngestEventsListener_prevTaggedSet_text()),
|
||||
Collection<BlackboardAttribute> attributesForNewArtifact = Arrays.asList(
|
||||
new BlackboardAttribute(
|
||||
TSK_SET_NAME, MODULE_NAME,
|
||||
Bundle.IngestEventsListener_prevTaggedSet_text()),
|
||||
new BlackboardAttribute(
|
||||
TSK_COMMENT, MODULE_NAME,
|
||||
Bundle.IngestEventsListener_prevCaseComment_text() + caseDisplayNames.stream().distinct().collect(Collectors.joining(","))),
|
||||
new BlackboardAttribute(
|
||||
TSK_ASSOCIATED_ARTIFACT, MODULE_NAME,
|
||||
originalArtifact.getArtifactID()));
|
||||
makeAndPostInterestingArtifact(originalArtifact, attributesForNewArtifact);
|
||||
makeAndPostInterestingArtifact(originalArtifact, attributesForNewArtifact, Bundle.IngestEventsListener_prevTaggedSet_text());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -251,31 +247,28 @@ public class IngestEventsListener {
|
||||
new BlackboardAttribute(
|
||||
TSK_ASSOCIATED_ARTIFACT, MODULE_NAME,
|
||||
originalArtifact.getArtifactID()));
|
||||
makeAndPostInterestingArtifact(originalArtifact, attributesForNewArtifact);
|
||||
makeAndPostInterestingArtifact(originalArtifact, attributesForNewArtifact, Bundle.IngestEventsListener_prevExists_text());
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Make an interesting item artifact to flag the passed in artifact.
|
||||
*
|
||||
* @param originalArtifact Artifact in current case we want to flag
|
||||
* @param attributesForNewArtifact Attributes to assign to the new
|
||||
* Interesting items artifact
|
||||
* @param configuration The configuration to be specified for the new interesting artifact hit
|
||||
*/
|
||||
private static void makeAndPostInterestingArtifact(BlackboardArtifact originalArtifact, Collection<BlackboardAttribute> attributesForNewArtifact) {
|
||||
private static void makeAndPostInterestingArtifact(BlackboardArtifact originalArtifact, Collection<BlackboardAttribute> attributesForNewArtifact, String configuration) {
|
||||
try {
|
||||
SleuthkitCase tskCase = originalArtifact.getSleuthkitCase();
|
||||
AbstractFile abstractFile = tskCase.getAbstractFileById(originalArtifact.getObjectID());
|
||||
Blackboard blackboard = tskCase.getBlackboard();
|
||||
// Create artifact if it doesn't already exist.
|
||||
if (!blackboard.artifactExists(abstractFile, TSK_INTERESTING_ARTIFACT_HIT, attributesForNewArtifact)) {
|
||||
String conclusion = TBD;
|
||||
String configuration = TBD;
|
||||
String justification = TBD;
|
||||
|
||||
BlackboardArtifact newInterestingArtifact = abstractFile.newAnalysisResult(
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_ARTIFACT_HIT, INTERESTING_HIT_SCORE,
|
||||
conclusion, configuration, justification,
|
||||
attributesForNewArtifact)
|
||||
BlackboardArtifact newInterestingArtifact = abstractFile.newAnalysisResult(
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_ARTIFACT_HIT, LIKELY_NOTABLE_SCORE,
|
||||
null, configuration, null, attributesForNewArtifact)
|
||||
.getAnalysisResult();
|
||||
|
||||
try {
|
||||
|
@ -67,7 +67,7 @@ import org.sleuthkit.datamodel.Score;
|
||||
final class CentralRepoIngestModule implements FileIngestModule {
|
||||
|
||||
private static final String MODULE_NAME = CentralRepoIngestModuleFactory.getModuleName();
|
||||
|
||||
private static final Score LIKELY_NOTABLE_SCORE = new Score(Score.Significance.LIKELY_NOTABLE, Score.MethodCategory.AUTO);
|
||||
static final boolean DEFAULT_FLAG_TAGGED_NOTABLE_ITEMS = false;
|
||||
static final boolean DEFAULT_FLAG_PREVIOUS_DEVICES = false;
|
||||
static final boolean DEFAULT_CREATE_CR_PROPERTIES = true;
|
||||
@ -334,7 +334,6 @@ final class CentralRepoIngestModule implements FileIngestModule {
|
||||
* @param caseDisplayNames Case names to be added to a TSK_COMMON attribute.
|
||||
*/
|
||||
private void postCorrelatedBadFileToBlackboard(AbstractFile abstractFile, List<String> caseDisplayNames) {
|
||||
|
||||
Collection<BlackboardAttribute> attributes = Arrays.asList(
|
||||
new BlackboardAttribute(
|
||||
TSK_SET_NAME, MODULE_NAME,
|
||||
@ -346,14 +345,9 @@ final class CentralRepoIngestModule implements FileIngestModule {
|
||||
|
||||
// Create artifact if it doesn't already exist.
|
||||
if (!blackboard.artifactExists(abstractFile, TSK_INTERESTING_FILE_HIT, attributes)) {
|
||||
String conclusion = TBD;
|
||||
String configuration = TBD;
|
||||
String justification = TBD;
|
||||
|
||||
BlackboardArtifact tifArtifact = abstractFile.newAnalysisResult(
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_FILE_HIT, INTERESTING_HIT_SCORE,
|
||||
conclusion, configuration, justification,
|
||||
attributes)
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_FILE_HIT, LIKELY_NOTABLE_SCORE,
|
||||
null, Bundle.CentralRepoIngestModule_prevTaggedSet_text(), null, attributes)
|
||||
.getAnalysisResult();
|
||||
try {
|
||||
// index the artifact for keyword search
|
||||
|
@ -29,7 +29,6 @@ import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@ -37,7 +36,6 @@ import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import javax.annotation.concurrent.GuardedBy;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.openide.util.Exceptions;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
@ -102,8 +100,8 @@ final class AddLogicalImageTask implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
private final static BlackboardArtifact.Type INTERESTING_FILE_TYPE = new BlackboardArtifact.Type(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT);
|
||||
|
||||
private static final Score LIKELY_NOTABLE_SCORE = new Score(Score.Significance.LIKELY_NOTABLE, Score.MethodCategory.AUTO);
|
||||
|
||||
private final static Logger LOGGER = Logger.getLogger(AddLogicalImageTask.class.getName());
|
||||
private final static String SEARCH_RESULTS_TXT = "SearchResults.txt"; //NON-NLS
|
||||
private final static String USERS_TXT = "_users.txt"; //NON-NLS
|
||||
@ -445,21 +443,11 @@ final class AddLogicalImageTask implements Runnable {
|
||||
|
||||
private void addInterestingFileToArtifacts(long fileId, long dataSourceId, String ruleSetName, String ruleName, List<BlackboardArtifact> artifacts) throws TskCoreException {
|
||||
BlackboardArtifact artifact;
|
||||
|
||||
|
||||
String conclusion = TBD;
|
||||
String configuration = TBD;
|
||||
String justification = TBD;
|
||||
|
||||
try {
|
||||
artifact = this.blackboard.newAnalysisResult(
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_FILE_HIT,
|
||||
fileId,
|
||||
dataSourceId,
|
||||
INTERESTING_HIT_SCORE,
|
||||
conclusion,
|
||||
configuration,
|
||||
justification,
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_FILE_HIT, fileId, dataSourceId,
|
||||
LIKELY_NOTABLE_SCORE,
|
||||
null, ruleSetName, null,
|
||||
Arrays.asList(
|
||||
new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME, MODULE_NAME, ruleSetName),
|
||||
new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_CATEGORY, MODULE_NAME, ruleName)
|
||||
|
@ -51,6 +51,7 @@ import org.sleuthkit.datamodel.TskDataException;
|
||||
*/
|
||||
public class DataSourceIntegrityIngestModule implements DataSourceIngestModule {
|
||||
|
||||
private static final Score NOTABLE_SCORE = new Score(Score.Significance.NOTABLE, Score.MethodCategory.AUTO);
|
||||
private static final Logger logger = Logger.getLogger(DataSourceIntegrityIngestModule.class.getName());
|
||||
private static final long DEFAULT_CHUNK_SIZE = 32 * 1024;
|
||||
private static final IngestServices services = IngestServices.getInstance();
|
||||
@ -294,10 +295,10 @@ public class DataSourceIntegrityIngestModule implements DataSourceIngestModule {
|
||||
if (!verified) {
|
||||
try {
|
||||
BlackboardArtifact verificationFailedArtifact = Case.getCurrentCase().getSleuthkitCase().getBlackboard().newAnalysisResult(
|
||||
new BlackboardArtifact.Type(BlackboardArtifact.ARTIFACT_TYPE.TSK_VERIFICATION_FAILED),
|
||||
BlackboardArtifact.Type.TSK_VERIFICATION_FAILED,
|
||||
img.getId(), img.getId(),
|
||||
Score.SCORE_UNKNOWN,
|
||||
null, null, null,
|
||||
NOTABLE_SCORE,
|
||||
null, null, artifactComment,
|
||||
Arrays.asList(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_COMMENT,
|
||||
DataSourceIntegrityModuleFactory.getModuleName(), artifactComment)))
|
||||
.getAnalysisResult();
|
||||
|
@ -89,7 +89,9 @@ class SevenZipExtractor {
|
||||
private static final Logger logger = Logger.getLogger(SevenZipExtractor.class.getName());
|
||||
|
||||
private static final String MODULE_NAME = EmbeddedFileExtractorModuleFactory.getModuleName();
|
||||
|
||||
private static final Score LIKELY_NOTABLE_SCORE = new Score(Score.Significance.LIKELY_NOTABLE, Score.MethodCategory.AUTO);
|
||||
private static final Score NOTABLE_SCORE = new Score(Score.Significance.NOTABLE, Score.MethodCategory.AUTO);
|
||||
|
||||
//encryption type strings
|
||||
private static final String ENCRYPTION_FILE_LEVEL = NbBundle.getMessage(EmbeddedFileExtractorIngestModule.class,
|
||||
"EmbeddedFileExtractorIngestModule.ArchiveExtractor.encryptionFileLevel");
|
||||
@ -302,11 +304,13 @@ class SevenZipExtractor {
|
||||
private void flagRootArchiveAsZipBomb(Archive rootArchive, AbstractFile archiveFile, String details, String escapedFilePath) {
|
||||
rootArchive.flagAsZipBomb();
|
||||
logger.log(Level.INFO, details);
|
||||
|
||||
String setName = "Possible Zip Bomb";
|
||||
try {
|
||||
Collection<BlackboardAttribute> attributes = Arrays.asList(
|
||||
new BlackboardAttribute(
|
||||
TSK_SET_NAME, MODULE_NAME,
|
||||
"Possible Zip Bomb"),
|
||||
setName),
|
||||
new BlackboardAttribute(
|
||||
TSK_DESCRIPTION, MODULE_NAME,
|
||||
Bundle.SevenZipExtractor_zipBombArtifactCreation_text(archiveFile.getName())),
|
||||
@ -315,13 +319,10 @@ class SevenZipExtractor {
|
||||
details));
|
||||
|
||||
if (!blackboard.artifactExists(archiveFile, TSK_INTERESTING_FILE_HIT, attributes)) {
|
||||
String conclusion = TBD;
|
||||
String configuration = TBD;
|
||||
String justification = TBD;
|
||||
|
||||
BlackboardArtifact artifact = rootArchive.newAnalysisResult(
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_FILE_HIT, INTERESTING_HIT_SCORE,
|
||||
conclusion, configuration, justification,
|
||||
|
||||
BlackboardArtifact artifact = archiveFile.newAnalysisResult(
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_FILE_HIT, LIKELY_NOTABLE_SCORE,
|
||||
null, setName, null,
|
||||
attributes)
|
||||
.getAnalysisResult();
|
||||
|
||||
@ -862,8 +863,9 @@ class SevenZipExtractor {
|
||||
String encryptionType = fullEncryption ? ENCRYPTION_FULL : ENCRYPTION_FILE_LEVEL;
|
||||
try {
|
||||
BlackboardArtifact artifact = archiveFile.newAnalysisResult(
|
||||
new BlackboardArtifact.Type(BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED), Score.SCORE_UNKNOWN,
|
||||
null, null, null,
|
||||
new BlackboardArtifact.Type(BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED),
|
||||
NOTABLE_SCORE,
|
||||
null, null, encryptionType,
|
||||
Arrays.asList(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_COMMENT, MODULE_NAME, encryptionType)))
|
||||
.getAnalysisResult();
|
||||
|
||||
|
@ -47,6 +47,8 @@ import org.sleuthkit.datamodel.VolumeSystem;
|
||||
*/
|
||||
final class EncryptionDetectionDataSourceIngestModule implements DataSourceIngestModule {
|
||||
|
||||
private static final Score LIKELY_NOTABLE_SCORE = new Score(Score.Significance.LIKELY_NOTABLE, Score.MethodCategory.AUTO);
|
||||
private static final Score NOTABLE_SCORE = new Score(Score.Significance.NOTABLE, Score.MethodCategory.AUTO);
|
||||
private final IngestServices services = IngestServices.getInstance();
|
||||
private final Logger logger = services.getLogger(EncryptionDetectionModuleFactory.getModuleName());
|
||||
private Blackboard blackboard;
|
||||
@ -104,14 +106,16 @@ final class EncryptionDetectionDataSourceIngestModule implements DataSourceInges
|
||||
return ProcessResult.OK;
|
||||
}
|
||||
if (BitlockerDetection.isBitlockerVolume(volume)) {
|
||||
return flagVolume(volume, BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED, Bundle.EncryptionDetectionDataSourceIngestModule_artifactComment_bitlocker());
|
||||
return flagVolume(volume, BlackboardArtifact.Type.TSK_ENCRYPTION_DETECTED, NOTABLE_SCORE,
|
||||
Bundle.EncryptionDetectionDataSourceIngestModule_artifactComment_bitlocker());
|
||||
}
|
||||
|
||||
if (context.dataSourceIngestIsCancelled()) {
|
||||
return ProcessResult.OK;
|
||||
}
|
||||
if (isVolumeEncrypted(volume)) {
|
||||
return flagVolume(volume, BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_SUSPECTED, String.format(Bundle.EncryptionDetectionDataSourceIngestModule_artifactComment_suspected(), calculatedEntropy));
|
||||
return flagVolume(volume, BlackboardArtifact.Type.TSK_ENCRYPTION_SUSPECTED, LIKELY_NOTABLE_SCORE,
|
||||
String.format(Bundle.EncryptionDetectionDataSourceIngestModule_artifactComment_suspected(), calculatedEntropy));
|
||||
}
|
||||
}
|
||||
// Update progress bar
|
||||
@ -148,19 +152,20 @@ final class EncryptionDetectionDataSourceIngestModule implements DataSourceInges
|
||||
* @param volume The volume to be processed.
|
||||
* @param artifactType The type of artifact to create. This is assumed to be
|
||||
* an analysis result type.
|
||||
* @param score The score of the analysis result.
|
||||
* @param comment A comment to be attached to the artifact.
|
||||
*
|
||||
* @return 'OK' if the volume was processed successfully, or 'ERROR' if
|
||||
* there was a problem.
|
||||
*/
|
||||
private IngestModule.ProcessResult flagVolume(Volume volume, BlackboardArtifact.ARTIFACT_TYPE artifactType, String comment) {
|
||||
private IngestModule.ProcessResult flagVolume(Volume volume, BlackboardArtifact.Type artifactType, Score score, String comment) {
|
||||
|
||||
if (context.dataSourceIngestIsCancelled()) {
|
||||
return ProcessResult.OK;
|
||||
}
|
||||
|
||||
try {
|
||||
BlackboardArtifact artifact = volume.newAnalysisResult(new BlackboardArtifact.Type(artifactType), Score.SCORE_UNKNOWN, null, null, null,
|
||||
BlackboardArtifact artifact = volume.newAnalysisResult(artifactType, score, null, null, comment,
|
||||
Arrays.asList(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_COMMENT, EncryptionDetectionModuleFactory.getModuleName(), comment)))
|
||||
.getAnalysisResult();
|
||||
|
||||
|
@ -28,7 +28,6 @@ import com.healthmarketscience.jackcess.util.MemFileChannel;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.BufferUnderflowException;
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
import org.apache.tika.exception.EncryptedDocumentException;
|
||||
@ -65,7 +64,9 @@ import org.xml.sax.SAXException;
|
||||
final class EncryptionDetectionFileIngestModule extends FileIngestModuleAdapter {
|
||||
|
||||
private static final int FILE_SIZE_MODULUS = 512;
|
||||
|
||||
private static final Score LIKELY_NOTABLE_SCORE = new Score(Score.Significance.LIKELY_NOTABLE, Score.MethodCategory.AUTO);
|
||||
private static final Score NOTABLE_SCORE = new Score(Score.Significance.NOTABLE, Score.MethodCategory.AUTO);
|
||||
|
||||
private static final String DATABASE_FILE_EXTENSION = "db";
|
||||
private static final int MINIMUM_DATABASE_FILE_SIZE = 65536; //64 KB
|
||||
|
||||
@ -157,10 +158,11 @@ final class EncryptionDetectionFileIngestModule extends FileIngestModuleAdapter
|
||||
*/
|
||||
String mimeType = fileTypeDetector.getMIMEType(file);
|
||||
if (mimeType.equals("application/octet-stream") && isFileEncryptionSuspected(file)) {
|
||||
return flagFile(file, BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_SUSPECTED,
|
||||
return flagFile(file, BlackboardArtifact.Type.TSK_ENCRYPTION_SUSPECTED, LIKELY_NOTABLE_SCORE,
|
||||
String.format(Bundle.EncryptionDetectionFileIngestModule_artifactComment_suspected(), calculatedEntropy));
|
||||
} else if (isFilePasswordProtected(file)) {
|
||||
return flagFile(file, BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED, Bundle.EncryptionDetectionFileIngestModule_artifactComment_password());
|
||||
return flagFile(file, BlackboardArtifact.Type.TSK_ENCRYPTION_DETECTED, NOTABLE_SCORE,
|
||||
Bundle.EncryptionDetectionFileIngestModule_artifactComment_password());
|
||||
}
|
||||
}
|
||||
} catch (ReadContentInputStreamException | SAXException | TikaException | UnsupportedCodecException ex) {
|
||||
@ -191,18 +193,19 @@ final class EncryptionDetectionFileIngestModule extends FileIngestModuleAdapter
|
||||
* @param file The file to be processed.
|
||||
* @param artifactType The type of artifact to create. Assumed to be an
|
||||
* analysis result type.
|
||||
* @param score The score of the analysis result.
|
||||
* @param comment A comment to be attached to the artifact.
|
||||
*
|
||||
* @return 'OK' if the file was processed successfully, or 'ERROR' if there
|
||||
* was a problem.
|
||||
*/
|
||||
private IngestModule.ProcessResult flagFile(AbstractFile file, BlackboardArtifact.ARTIFACT_TYPE artifactType, String comment) {
|
||||
private IngestModule.ProcessResult flagFile(AbstractFile file, BlackboardArtifact.Type artifactType, Score score, String comment) {
|
||||
try {
|
||||
if (context.fileIngestIsCancelled()) {
|
||||
return IngestModule.ProcessResult.OK;
|
||||
}
|
||||
|
||||
BlackboardArtifact artifact = file.newAnalysisResult(new BlackboardArtifact.Type(artifactType), Score.SCORE_UNKNOWN, null, null, null,
|
||||
BlackboardArtifact artifact = file.newAnalysisResult(artifactType, score, null, null, comment,
|
||||
Arrays.asList(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_COMMENT,
|
||||
EncryptionDetectionModuleFactory.getModuleName(), comment)))
|
||||
.getAnalysisResult();
|
||||
|
@ -52,7 +52,8 @@ import org.sleuthkit.datamodel.TskException;
|
||||
"FileExtMismatchIngestModule.readError.message=Could not read settings."
|
||||
})
|
||||
public class FileExtMismatchIngestModule implements FileIngestModule {
|
||||
|
||||
private static final Score LIKELY_NOTABLE_SCORE = new Score(Score.Significance.LIKELY_NOTABLE, Score.MethodCategory.AUTO);
|
||||
|
||||
private static final Logger logger = Logger.getLogger(FileExtMismatchIngestModule.class.getName());
|
||||
private final IngestServices services = IngestServices.getInstance();
|
||||
private final FileExtMismatchDetectorModuleSettings settings;
|
||||
@ -143,7 +144,7 @@ public class FileExtMismatchIngestModule implements FileIngestModule {
|
||||
if (mismatchDetected) {
|
||||
// add artifact
|
||||
BlackboardArtifact bart = abstractFile.newAnalysisResult(
|
||||
new BlackboardArtifact.Type(ARTIFACT_TYPE.TSK_EXT_MISMATCH_DETECTED), Score.SCORE_UNKNOWN, null, null, null, Collections.emptyList())
|
||||
BlackboardArtifact.Type.TSK_EXT_MISMATCH_DETECTED, LIKELY_NOTABLE_SCORE, null, null, null, Collections.emptyList())
|
||||
.getAnalysisResult();
|
||||
|
||||
try {
|
||||
|
@ -49,7 +49,8 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
*/
|
||||
@NbBundle.Messages({"CannotRunFileTypeDetection=Unable to run file type detection."})
|
||||
public class FileTypeIdIngestModule implements FileIngestModule {
|
||||
|
||||
private static final Score LIKELY_NOTABLE_SCORE = new Score(Score.Significance.LIKELY_NOTABLE, Score.MethodCategory.AUTO);
|
||||
|
||||
private static final Logger logger = Logger.getLogger(FileTypeIdIngestModule.class.getName());
|
||||
private static final HashMap<Long, IngestJobTotals> totalsForIngestJobs = new HashMap<>();
|
||||
private static final IngestModuleReferenceCounter refCounter = new IngestModuleReferenceCounter();
|
||||
@ -163,13 +164,9 @@ public class FileTypeIdIngestModule implements FileIngestModule {
|
||||
Blackboard tskBlackboard = currentCase.getSleuthkitCase().getBlackboard();
|
||||
// Create artifact if it doesn't already exist.
|
||||
if (!tskBlackboard.artifactExists(file, TSK_INTERESTING_FILE_HIT, attributes)) {
|
||||
String conclusion = TBD;
|
||||
String configuration = TBD;
|
||||
String justification = TBD;
|
||||
|
||||
BlackboardArtifact artifact = file.newAnalysisResult(
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_FILE_HIT, INTERESTING_HIT_SCORE,
|
||||
conclusion, configuration, justification,
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_FILE_HIT, LIKELY_NOTABLE_SCORE,
|
||||
null, fileType.getInterestingFilesSetName(), null,
|
||||
attributes)
|
||||
.getAnalysisResult();
|
||||
try {
|
||||
|
@ -539,15 +539,11 @@ public class HashDbIngestModule implements FileIngestModule {
|
||||
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_HASH_MD5, moduleName, md5Hash),
|
||||
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_COMMENT, moduleName, comment)
|
||||
);
|
||||
|
||||
String conclusion = TBD;
|
||||
String configuration = TBD;
|
||||
String justification = TBD;
|
||||
|
||||
// BlackboardArtifact.Type artifactType, Score score, String conclusion, String configuration, String justification, Collection<BlackboardAttribute> attributesList
|
||||
BlackboardArtifact badFile = abstractFile.newAnalysisResult(
|
||||
BlackboardArtifact.Type.TSK_HASHSET_HIT, getScore(db.getKnownFilesType()),
|
||||
conclusion, configuration, justification,
|
||||
null, db.getDisplayName(), null,
|
||||
attributes
|
||||
).getAnalysisResult();
|
||||
|
||||
|
@ -53,7 +53,8 @@ import org.sleuthkit.datamodel.TskData;
|
||||
*/
|
||||
@NbBundle.Messages({"FilesIdentifierIngestModule.getFilesError=Error getting interesting files sets from file."})
|
||||
final class FilesIdentifierIngestModule implements FileIngestModule {
|
||||
|
||||
private static final Score LIKELY_NOTABLE_SCORE = new Score(Score.Significance.LIKELY_NOTABLE, Score.MethodCategory.AUTO);
|
||||
|
||||
private static final Object sharedResourcesLock = new Object();
|
||||
private static final Logger logger = Logger.getLogger(FilesIdentifierIngestModule.class.getName());
|
||||
private static final IngestModuleReferenceCounter refCounter = new IngestModuleReferenceCounter();
|
||||
@ -143,13 +144,9 @@ final class FilesIdentifierIngestModule implements FileIngestModule {
|
||||
|
||||
// Create artifact if it doesn't already exist.
|
||||
if (!blackboard.artifactExists(file, TSK_INTERESTING_FILE_HIT, attributes)) {
|
||||
String conclusion = TBD;
|
||||
String configuration = TBD;
|
||||
String justification = TBD;
|
||||
|
||||
BlackboardArtifact artifact = file.newAnalysisResult(
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_FILE_HIT, INTERESTING_HIT_SCORE,
|
||||
conclusion, configuration, justification,
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_FILE_HIT, LIKELY_NOTABLE_SCORE,
|
||||
null, filesSet.getName(), null,
|
||||
attributes)
|
||||
.getAnalysisResult();
|
||||
try {
|
||||
|
@ -108,10 +108,10 @@ public final class LeappFileProcessor {
|
||||
* Main constructor.
|
||||
*
|
||||
* @param attributeType The BlackboardAttribute type or null if not
|
||||
* used. used.
|
||||
* @param columnName The name of the column in the tsv file.
|
||||
* @param required Whether or not this attribute is required to be
|
||||
* present.
|
||||
* used. used.
|
||||
* @param columnName The name of the column in the tsv file.
|
||||
* @param required Whether or not this attribute is required to be
|
||||
* present.
|
||||
*/
|
||||
TsvColumn(BlackboardAttribute.Type attributeType, String columnName, boolean required) {
|
||||
this.attributeType = attributeType;
|
||||
@ -275,7 +275,7 @@ public final class LeappFileProcessor {
|
||||
* Process the Leapp files that were found that match the xml mapping file
|
||||
*
|
||||
* @param LeappFilesToProcess List of files to process
|
||||
* @param LeappImageFile Abstract file to create artifact for
|
||||
* @param LeappImageFile Abstract file to create artifact for
|
||||
*
|
||||
* @throws FileNotFoundException
|
||||
* @throws IOException
|
||||
@ -308,7 +308,7 @@ public final class LeappFileProcessor {
|
||||
* Process the Leapp files that were found that match the xml mapping file
|
||||
*
|
||||
* @param LeappFilesToProcess List of files to process
|
||||
* @param dataSource The data source.
|
||||
* @param dataSource The data source.
|
||||
*
|
||||
* @throws FileNotFoundException
|
||||
* @throws IOException
|
||||
@ -318,7 +318,7 @@ public final class LeappFileProcessor {
|
||||
|
||||
for (String LeappFileName : LeappFilesToProcess) {
|
||||
String fileName = FilenameUtils.getName(LeappFileName);
|
||||
File LeappFile = new File(LeappFileName);
|
||||
File LeappFile = new File(LeappFileName);
|
||||
if (tsvFileAttributes.containsKey(fileName)) {
|
||||
List<TsvColumn> attrList = tsvFileAttributes.get(fileName);
|
||||
BlackboardArtifact.Type artifactType = tsvFileArtifacts.get(fileName);
|
||||
@ -345,7 +345,7 @@ public final class LeappFileProcessor {
|
||||
String trackpointSegmentName = null;
|
||||
GeoTrackPoints pointList = new GeoTrackPoints();
|
||||
AbstractFile geoAbstractFile = null;
|
||||
|
||||
|
||||
if (LeappFile == null || !LeappFile.exists() || fileName == null) {
|
||||
logger.log(Level.WARNING, String.format("Leap file: %s is null or does not exist", LeappFile == null ? LeappFile.toString() : "<null>"));
|
||||
return;
|
||||
@ -405,11 +405,11 @@ public final class LeappFileProcessor {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
if (ACCOUNT_RELATIONSHIPS.getOrDefault(fileName.toLowerCase(), "norelationship").toLowerCase() == "trackpoint") {
|
||||
(new GeoArtifactsHelper(Case.getCurrentCaseThrows().getSleuthkitCase(), moduleName, "", geoAbstractFile)).addTrack(trackpointSegmentName, pointList, new ArrayList<>());
|
||||
|
||||
(new GeoArtifactsHelper(Case.getCurrentCaseThrows().getSleuthkitCase(), moduleName, "", geoAbstractFile)).addTrack(trackpointSegmentName, pointList, new ArrayList<>());
|
||||
|
||||
}
|
||||
} catch (NoCurrentCaseException | TskCoreException | BlackboardException ex) {
|
||||
throw new IngestModuleException(Bundle.LeappFileProcessor_cannot_create_message_relationship() + ex.getLocalizedMessage(), ex); //NON-NLS
|
||||
@ -418,10 +418,9 @@ public final class LeappFileProcessor {
|
||||
}
|
||||
|
||||
@NbBundle.Messages({
|
||||
"LeappFileProcessor.cannot.create.waypoint.relationship=Cannot create TSK_WAYPOINT artifact.",
|
||||
})
|
||||
"LeappFileProcessor.cannot.create.waypoint.relationship=Cannot create TSK_WAYPOINT artifact.",})
|
||||
|
||||
private void createRoute (Collection<BlackboardAttribute> bbattributes, Content dataSource, String fileName) throws IngestModuleException {
|
||||
private void createRoute(Collection<BlackboardAttribute> bbattributes, Content dataSource, String fileName) throws IngestModuleException {
|
||||
|
||||
Double startLatitude = Double.valueOf(0);
|
||||
Double startLongitude = Double.valueOf(0);
|
||||
@ -435,7 +434,7 @@ public final class LeappFileProcessor {
|
||||
String sourceFile = null;
|
||||
AbstractFile absFile = null;
|
||||
String comment = "";
|
||||
|
||||
|
||||
try {
|
||||
for (BlackboardAttribute bba : bbattributes) {
|
||||
switch (bba.getAttributeType().getTypeName()) {
|
||||
@ -478,18 +477,16 @@ public final class LeappFileProcessor {
|
||||
GeoWaypoints waypointList = new GeoWaypoints();
|
||||
waypointList.addPoint(new Waypoint(startLatitude, startLongitude, zeroValue, ""));
|
||||
waypointList.addPoint(new Waypoint(endLatitude, endLongitude, zeroValue, locationName));
|
||||
(new GeoArtifactsHelper(Case.getCurrentCaseThrows().getSleuthkitCase(), moduleName, comment, absFile)).addRoute(destinationName, dateTime, waypointList, new ArrayList<>());
|
||||
|
||||
(new GeoArtifactsHelper(Case.getCurrentCaseThrows().getSleuthkitCase(), moduleName, comment, absFile)).addRoute(destinationName, dateTime, waypointList, new ArrayList<>());
|
||||
|
||||
} catch (NoCurrentCaseException | TskCoreException | BlackboardException ex) {
|
||||
throw new IngestModuleException(Bundle.LeappFileProcessor_cannot_create_waypoint_relationship() + ex.getLocalizedMessage(), ex); //NON-NLS
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@NbBundle.Messages({
|
||||
"LeappFileProcessor.cannot.create.trackpoint.relationship=Cannot create TSK_TRACK_POINT artifact.",
|
||||
})
|
||||
"LeappFileProcessor.cannot.create.trackpoint.relationship=Cannot create TSK_TRACK_POINT artifact.",})
|
||||
|
||||
private AbstractFile createTrackpoint(Collection<BlackboardAttribute> bbattributes, Content dataSource, String fileName, String trackpointSegmentName, GeoTrackPoints pointList) throws IngestModuleException {
|
||||
|
||||
@ -503,7 +500,7 @@ public final class LeappFileProcessor {
|
||||
String sourceFile = null;
|
||||
String comment = null;
|
||||
AbstractFile absFile = null;
|
||||
|
||||
|
||||
try {
|
||||
for (BlackboardAttribute bba : bbattributes) {
|
||||
switch (bba.getAttributeType().getTypeName()) {
|
||||
@ -539,28 +536,26 @@ public final class LeappFileProcessor {
|
||||
absFile = (AbstractFile) dataSource;
|
||||
}
|
||||
if ((trackpointSegmentName == null) || (trackpointSegmentName == segmentName)) {
|
||||
trackpointSegmentName = segmentName;
|
||||
pointList.addPoint(new TrackPoint(latitude, longitude, altitude, segmentName, zeroValue, zeroValue, zeroValue, dateTime));
|
||||
trackpointSegmentName = segmentName;
|
||||
pointList.addPoint(new TrackPoint(latitude, longitude, altitude, segmentName, zeroValue, zeroValue, zeroValue, dateTime));
|
||||
} else {
|
||||
(new GeoArtifactsHelper(Case.getCurrentCaseThrows().getSleuthkitCase(), moduleName, comment, absFile)).addTrack(segmentName, pointList, new ArrayList<>());
|
||||
trackpointSegmentName = segmentName;
|
||||
pointList = new GeoTrackPoints();
|
||||
pointList.addPoint(new TrackPoint(latitude, longitude, altitude, segmentName, zeroValue, zeroValue, zeroValue, dateTime));
|
||||
|
||||
(new GeoArtifactsHelper(Case.getCurrentCaseThrows().getSleuthkitCase(), moduleName, comment, absFile)).addTrack(segmentName, pointList, new ArrayList<>());
|
||||
trackpointSegmentName = segmentName;
|
||||
pointList = new GeoTrackPoints();
|
||||
pointList.addPoint(new TrackPoint(latitude, longitude, altitude, segmentName, zeroValue, zeroValue, zeroValue, dateTime));
|
||||
|
||||
}
|
||||
} catch (NoCurrentCaseException | TskCoreException | BlackboardException ex) {
|
||||
throw new IngestModuleException(Bundle.LeappFileProcessor_cannot_create_trackpoint_relationship() + ex.getLocalizedMessage(), ex); //NON-NLS
|
||||
}
|
||||
|
||||
return absFile;
|
||||
|
||||
|
||||
return absFile;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@NbBundle.Messages({
|
||||
"LeappFileProcessor.cannot.create.message.relationship=Cannot create TSK_MESSAGE Relationship.",
|
||||
})
|
||||
|
||||
"LeappFileProcessor.cannot.create.message.relationship=Cannot create TSK_MESSAGE Relationship.",})
|
||||
|
||||
private void createMessageRelationship(Collection<BlackboardAttribute> bbattributes, Content dataSource, String fileName) throws IngestModuleException {
|
||||
|
||||
String messageType = null;
|
||||
@ -614,7 +609,7 @@ public final class LeappFileProcessor {
|
||||
sourceFile = bba.getValueString();
|
||||
break;
|
||||
case "TSK_READ_STATUS":
|
||||
if (bba.getValueInt() == 1 ) {
|
||||
if (bba.getValueInt() == 1) {
|
||||
messageStatus = MessageReadStatus.READ;
|
||||
} else {
|
||||
messageStatus = MessageReadStatus.UNREAD;
|
||||
@ -638,19 +633,19 @@ public final class LeappFileProcessor {
|
||||
AbstractFile absFile = findAbstractFile(dataSource, sourceFile);
|
||||
if (absFile == null) {
|
||||
absFile = (AbstractFile) dataSource;
|
||||
}
|
||||
}
|
||||
CommunicationArtifactsHelper accountArtifact;
|
||||
Account.Type accountType = getAccountType(fileName);
|
||||
Account.Type accountType = getAccountType(fileName);
|
||||
if (alternateId == null) {
|
||||
accountArtifact = new CommunicationArtifactsHelper(Case.getCurrentCaseThrows().getSleuthkitCase(),
|
||||
moduleName, absFile, accountType);
|
||||
moduleName, absFile, accountType);
|
||||
} else {
|
||||
accountArtifact = new CommunicationArtifactsHelper(Case.getCurrentCaseThrows().getSleuthkitCase(),
|
||||
moduleName, absFile, accountType, accountType, alternateId);
|
||||
moduleName, absFile, accountType, accountType, alternateId);
|
||||
}
|
||||
BlackboardArtifact messageArtifact = accountArtifact.addMessage(messageType, communicationDirection, senderId,
|
||||
receipentId, dateTime, messageStatus, subject,
|
||||
messageText, threadId, otherAttributes);
|
||||
receipentId, dateTime, messageStatus, subject,
|
||||
messageText, threadId, otherAttributes);
|
||||
if (!fileAttachments.isEmpty()) {
|
||||
messageAttachments = new MessageAttachments(fileAttachments, new ArrayList<>());
|
||||
accountArtifact.addAttachments(messageArtifact, messageAttachments);
|
||||
@ -662,8 +657,7 @@ public final class LeappFileProcessor {
|
||||
}
|
||||
|
||||
@NbBundle.Messages({
|
||||
"LeappFileProcessor.cannot.create.contact.relationship=Cannot create TSK_CONTACT Relationship.",
|
||||
})
|
||||
"LeappFileProcessor.cannot.create.contact.relationship=Cannot create TSK_CONTACT Relationship.",})
|
||||
private void createContactRelationship(Collection<BlackboardAttribute> bbattributes, Content dataSource, String fileName) throws IngestModuleException {
|
||||
|
||||
String alternateId = null;
|
||||
@ -715,14 +709,14 @@ public final class LeappFileProcessor {
|
||||
}
|
||||
Account.Type accountType = getAccountType(fileName);
|
||||
if (accountType != null) {
|
||||
|
||||
|
||||
CommunicationArtifactsHelper accountArtifact;
|
||||
if (alternateId == null) {
|
||||
accountArtifact = new CommunicationArtifactsHelper(Case.getCurrentCaseThrows().getSleuthkitCase(),
|
||||
moduleName, absFile, accountType);
|
||||
moduleName, absFile, accountType);
|
||||
} else {
|
||||
accountArtifact = new CommunicationArtifactsHelper(Case.getCurrentCaseThrows().getSleuthkitCase(),
|
||||
moduleName, absFile, accountType, accountType, alternateId);
|
||||
moduleName, absFile, accountType, accountType, alternateId);
|
||||
}
|
||||
BlackboardArtifact messageArtifact = accountArtifact.addContact(contactName, phoneNumber, homePhoneNumber, mobilePhoneNumber, emailAddr, otherAttributes);
|
||||
}
|
||||
@ -732,14 +726,13 @@ public final class LeappFileProcessor {
|
||||
}
|
||||
|
||||
@NbBundle.Messages({
|
||||
"LeappFileProcessor.cannot.create.calllog.relationship=Cannot create TSK_CALLLOG Relationship.",
|
||||
})
|
||||
"LeappFileProcessor.cannot.create.calllog.relationship=Cannot create TSK_CALLLOG Relationship.",})
|
||||
|
||||
private void createCalllogRelationship(Collection<BlackboardAttribute> bbattributes, Content dataSource, String fileName) throws IngestModuleException {
|
||||
|
||||
String callerId = null;
|
||||
String alternateId = null;
|
||||
List<String> calleeId = Arrays.asList();
|
||||
List<String> calleeId = Arrays.asList();
|
||||
CommunicationDirection communicationDirection = CommunicationDirection.UNKNOWN;
|
||||
Long startDateTime = Long.valueOf(0);
|
||||
Long endDateTime = Long.valueOf(0);
|
||||
@ -751,14 +744,14 @@ public final class LeappFileProcessor {
|
||||
for (BlackboardAttribute bba : bbattributes) {
|
||||
switch (bba.getAttributeType().getTypeName()) {
|
||||
case "TSK_TEXT_FILE":
|
||||
sourceFile = bba.getValueString();
|
||||
break;
|
||||
sourceFile = bba.getValueString();
|
||||
break;
|
||||
case "TSK_DATETIME_START":
|
||||
startDateTime = bba.getValueLong();
|
||||
break;
|
||||
startDateTime = bba.getValueLong();
|
||||
break;
|
||||
case "TSK_DATETIME_END":
|
||||
startDateTime = bba.getValueLong();
|
||||
break;
|
||||
startDateTime = bba.getValueLong();
|
||||
break;
|
||||
case "TSK_DIRECTION":
|
||||
if (bba.getValueString().toLowerCase().equals("outgoing")) {
|
||||
communicationDirection = CommunicationDirection.OUTGOING;
|
||||
@ -773,8 +766,8 @@ public final class LeappFileProcessor {
|
||||
break;
|
||||
case "TSK_PHONE_NUMBER_TO":
|
||||
if (!bba.getValueString().isEmpty()) {
|
||||
String [] calleeTempList = bba.getValueString().split(",", 0);
|
||||
calleeId = Arrays.asList(calleeTempList);
|
||||
String[] calleeTempList = bba.getValueString().split(",", 0);
|
||||
calleeId = Arrays.asList(calleeTempList);
|
||||
}
|
||||
break;
|
||||
case "TSK_ID":
|
||||
@ -786,12 +779,12 @@ public final class LeappFileProcessor {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (calleeId.isEmpty() && communicationDirection == CommunicationDirection.OUTGOING) {
|
||||
String [] calleeTempList = callerId.split(",", 0);
|
||||
calleeId = Arrays.asList(calleeTempList);
|
||||
callerId = null;
|
||||
}
|
||||
String[] calleeTempList = callerId.split(",", 0);
|
||||
calleeId = Arrays.asList(calleeTempList);
|
||||
callerId = null;
|
||||
}
|
||||
AbstractFile absFile = findAbstractFile(dataSource, sourceFile);
|
||||
if (absFile == null) {
|
||||
absFile = (AbstractFile) dataSource;
|
||||
@ -800,10 +793,10 @@ public final class LeappFileProcessor {
|
||||
CommunicationArtifactsHelper accountArtifact;
|
||||
if (accountType != null) {
|
||||
accountArtifact = new CommunicationArtifactsHelper(Case.getCurrentCaseThrows().getSleuthkitCase(),
|
||||
moduleName, absFile, accountType);
|
||||
moduleName, absFile, accountType);
|
||||
} else {
|
||||
accountArtifact = new CommunicationArtifactsHelper(Case.getCurrentCaseThrows().getSleuthkitCase(),
|
||||
moduleName, absFile, accountType, accountType, alternateId);
|
||||
moduleName, absFile, accountType, accountType, alternateId);
|
||||
}
|
||||
BlackboardArtifact callLogArtifact = accountArtifact.addCalllog(communicationDirection, callerId, calleeId, startDateTime, endDateTime, mediaType, otherAttributes);
|
||||
} catch (NoCurrentCaseException | TskCoreException | BlackboardException ex) {
|
||||
@ -811,7 +804,7 @@ public final class LeappFileProcessor {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private Account.Type getAccountType(String AccountTypeName) {
|
||||
switch (AccountTypeName.toLowerCase()) {
|
||||
case "zapya.tsv":
|
||||
@ -849,7 +842,7 @@ public final class LeappFileProcessor {
|
||||
case "whatsapp - contacts.tsv":
|
||||
return Account.Type.WHATSAPP;
|
||||
case "tangomessages messages.tsv":
|
||||
return Account.Type.TANGO;
|
||||
return Account.Type.TANGO;
|
||||
case "shareit file transfer.tsv":
|
||||
return Account.Type.SHAREIT;
|
||||
case "line - calllogs.tsv":
|
||||
@ -880,20 +873,22 @@ public final class LeappFileProcessor {
|
||||
return Account.Type.PHONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Process the line read and create the necessary attributes for it.
|
||||
*
|
||||
* @param lineValues List of column values.
|
||||
* @param lineValues List of column values.
|
||||
* @param columnIndexes Mapping of column headers (trimmed; to lower case)
|
||||
* to column index. All header columns and only all header columns should be
|
||||
* present.
|
||||
* @param attrList The list of attributes as specified for the schema of
|
||||
* this file.
|
||||
* @param fileName The name of the file being processed.
|
||||
* @param lineNum The line number in the file.
|
||||
* to column index. All header columns and only all
|
||||
* header columns should be present.
|
||||
* @param attrList The list of attributes as specified for the schema
|
||||
* of this file.
|
||||
* @param fileName The name of the file being processed.
|
||||
* @param lineNum The line number in the file.
|
||||
*
|
||||
* @return The collection of blackboard attributes for the artifact created
|
||||
* from this line.
|
||||
* from this line.
|
||||
*
|
||||
* @throws IngestModuleException
|
||||
*/
|
||||
private Collection<BlackboardAttribute> processReadLine(List<String> lineValues, Map<String, Integer> columnIndexes,
|
||||
@ -949,9 +944,10 @@ public final class LeappFileProcessor {
|
||||
* Check type of attribute and possibly format string based on it.
|
||||
*
|
||||
* @param colAttr Column Attribute information
|
||||
* @param value string to be formatted
|
||||
* @param value string to be formatted
|
||||
*
|
||||
* @return formatted string based on attribute type if no attribute type
|
||||
* found then return original string
|
||||
* found then return original string
|
||||
*/
|
||||
private String formatValueBasedOnAttrType(TsvColumn colAttr, String value) {
|
||||
if (colAttr.getAttributeType().getTypeName().equals("TSK_DOMAIN")) {
|
||||
@ -971,9 +967,10 @@ public final class LeappFileProcessor {
|
||||
* value.
|
||||
*
|
||||
* @param attrType The attribute type.
|
||||
* @param value The string value to be converted to the appropriate data
|
||||
* type for the attribute type.
|
||||
* @param value The string value to be converted to the appropriate data
|
||||
* type for the attribute type.
|
||||
* @param fileName The file name that the value comes from.
|
||||
*
|
||||
* @return The generated blackboard attribute.
|
||||
*/
|
||||
private BlackboardAttribute getAttribute(BlackboardAttribute.Type attrType, String value, String fileName) {
|
||||
@ -1022,7 +1019,9 @@ public final class LeappFileProcessor {
|
||||
* Handles converting a string value to a blackboard attribute.
|
||||
*
|
||||
* @param orig The original string value.
|
||||
*
|
||||
* @return The generated blackboard attribute.
|
||||
*
|
||||
* @throws ParseException
|
||||
* @throws NumberFormatException
|
||||
*/
|
||||
@ -1033,13 +1032,15 @@ public final class LeappFileProcessor {
|
||||
* Runs parsing function on string value to convert to right data type and
|
||||
* generates a blackboard attribute for that converted data type.
|
||||
*
|
||||
* @param value The string value.
|
||||
* @param attrType The blackboard attribute type.
|
||||
* @param fileName The name of the file from which the value comes.
|
||||
* @param blankIsNull If string is blank return null attribute.
|
||||
* @param zeroIsNull If string is some version of 0, return null attribute.
|
||||
* @param value The string value.
|
||||
* @param attrType The blackboard attribute type.
|
||||
* @param fileName The name of the file from which the value comes.
|
||||
* @param blankIsNull If string is blank return null attribute.
|
||||
* @param zeroIsNull If string is some version of 0, return null
|
||||
* attribute.
|
||||
* @param valueConverter The means of converting the string value to an
|
||||
* appropriate blackboard attribute.
|
||||
* appropriate blackboard attribute.
|
||||
*
|
||||
* @return The generated blackboard attribute or null if not determined.
|
||||
*/
|
||||
private BlackboardAttribute parseAttrValue(String value, BlackboardAttribute.Type attrType, String fileName, boolean blankIsNull, boolean zeroIsNull, ParseExceptionFunction valueConverter) {
|
||||
@ -1157,7 +1158,7 @@ public final class LeappFileProcessor {
|
||||
for (int k = 0; k < attributeNlist.getLength(); k++) {
|
||||
NamedNodeMap nnm = attributeNlist.item(k).getAttributes();
|
||||
String attributeName = nnm.getNamedItem("attributename").getNodeValue();
|
||||
|
||||
|
||||
if (!attributeName.toLowerCase().matches("null")) {
|
||||
String columnName = nnm.getNamedItem("columnName").getNodeValue();
|
||||
String required = nnm.getNamedItem("required").getNodeValue();
|
||||
@ -1207,13 +1208,19 @@ public final class LeappFileProcessor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic method for creating a blackboard artifact with attributes
|
||||
* Generic method for creating a blackboard artifact with attributes
|
||||
*
|
||||
* NOTE:
|
||||
* Handles Analysis results in a generic manner. If special handling for
|
||||
* score, conclusion, configuration, justification is needed for an analysis
|
||||
* result type, this will need to be updated.
|
||||
*
|
||||
* @param artType The artifact type.
|
||||
* @param dataSource is the Content object that needs to have the artifact
|
||||
* added for it
|
||||
* @param artType The artifact type.
|
||||
* @param dataSource is the Content object that needs to have the artifact
|
||||
* added for it
|
||||
* @param bbattributes is the collection of blackboard attributes that need
|
||||
* to be added to the artifact after the artifact has been created
|
||||
* to be added to the artifact after the artifact has
|
||||
* been created
|
||||
*
|
||||
* @return The newly-created artifact, or null on error
|
||||
*/
|
||||
@ -1238,7 +1245,7 @@ public final class LeappFileProcessor {
|
||||
* Method to post a list of BlackboardArtifacts to the blackboard.
|
||||
*
|
||||
* @param artifacts A list of artifacts. IF list is empty or null, the
|
||||
* function will return.
|
||||
* function will return.
|
||||
*/
|
||||
void postArtifacts(Collection<BlackboardArtifact> artifacts) {
|
||||
if (artifacts == null || artifacts.isEmpty()) {
|
||||
@ -1259,7 +1266,7 @@ public final class LeappFileProcessor {
|
||||
*/
|
||||
private void configExtractor() throws IOException {
|
||||
PlatformUtil.extractResourceToUserConfigDir(LeappFileProcessor.class,
|
||||
xmlFile, true);
|
||||
xmlFile, true);
|
||||
}
|
||||
|
||||
private static final Set<String> ALLOWED_EXTENSIONS = new HashSet<>(Arrays.asList("zip", "tar", "tgz"));
|
||||
@ -1316,14 +1323,14 @@ public final class LeappFileProcessor {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private AbstractFile findAbstractFile(Content dataSource, String fileNamePath) {
|
||||
if (fileNamePath == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
List<AbstractFile> files;
|
||||
|
||||
|
||||
String fileName = FilenameUtils.getName(fileNamePath);
|
||||
String filePath = FilenameUtils.normalize(FilenameUtils.getPath(fileNamePath), true);
|
||||
|
||||
@ -1347,4 +1354,4 @@ public final class LeappFileProcessor {
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ public class EXIFProcessor implements PictureProcessor {
|
||||
final BlackboardArtifact exifArtifact = file.newDataArtifact(new BlackboardArtifact.Type(TSK_METADATA_EXIF), attributes);
|
||||
|
||||
final BlackboardArtifact userSuspectedArtifact = file.newAnalysisResult(
|
||||
new BlackboardArtifact.Type(TSK_USER_CONTENT_SUSPECTED), Score.SCORE_UNKNOWN, null, null, null,
|
||||
BlackboardArtifact.Type.TSK_USER_CONTENT_SUSPECTED, Score.SCORE_UNKNOWN, null, null, null,
|
||||
Arrays.asList(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_COMMENT, MODULE_NAME, Bundle.ExifProcessor_userContent_description())))
|
||||
.getAnalysisResult();
|
||||
|
||||
|
@ -35,7 +35,6 @@ import org.sleuthkit.autopsy.yara.YaraJNIWrapper;
|
||||
import org.sleuthkit.autopsy.yara.YaraWrapperException;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import static org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE.TSK_YARA_HIT;
|
||||
import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME;
|
||||
import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_RULE;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
@ -46,7 +45,8 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
* Methods for scanning files for yara rule matches.
|
||||
*/
|
||||
final class YaraIngestHelper {
|
||||
|
||||
|
||||
private static final Score NOTABLE_SCORE = new Score(Score.Significance.NOTABLE, Score.MethodCategory.AUTO);
|
||||
private static final String YARA_DIR = "yara";
|
||||
private static final String YARA_C_EXE = "yarac64.exe";
|
||||
private static final String MODULE_NAME = YaraIngestModuleFactory.getModuleName();
|
||||
@ -207,7 +207,7 @@ final class YaraIngestHelper {
|
||||
attributes.add(new BlackboardAttribute(TSK_SET_NAME, MODULE_NAME, ruleSetName));
|
||||
attributes.add(new BlackboardAttribute(TSK_RULE, MODULE_NAME, rule));
|
||||
|
||||
BlackboardArtifact artifact = abstractFile.newAnalysisResult(new BlackboardArtifact.Type(TSK_YARA_HIT), Score.SCORE_UNKNOWN, null, null, null, attributes)
|
||||
BlackboardArtifact artifact = abstractFile.newAnalysisResult(BlackboardArtifact.Type.TSK_YARA_HIT, NOTABLE_SCORE, null, ruleSetName, rule, attributes)
|
||||
.getAnalysisResult();
|
||||
|
||||
artifacts.add(artifact);
|
||||
|
@ -42,7 +42,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
*
|
||||
*/
|
||||
class StixArtifactData {
|
||||
|
||||
private static final Score LIKELY_NOTABLE_SCORE = new Score(Score.Significance.LIKELY_NOTABLE, Score.MethodCategory.AUTO);
|
||||
private static final String MODULE_NAME = "Stix";
|
||||
|
||||
private AbstractFile file;
|
||||
@ -88,13 +88,9 @@ class StixArtifactData {
|
||||
|
||||
// Create artifact if it doesn't already exist.
|
||||
if (!blackboard.artifactExists(file, TSK_INTERESTING_FILE_HIT, attributes)) {
|
||||
String conclusion = TBD;
|
||||
String configuration = TBD;
|
||||
String justification = TBD;
|
||||
|
||||
BlackboardArtifact bba = file.newAnalysisResult(
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_FILE_HIT, INTERESTING_HIT_SCORE,
|
||||
conclusion, configuration, justification,
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_FILE_HIT, LIKELY_NOTABLE_SCORE,
|
||||
null, setName, null,
|
||||
attributes)
|
||||
.getAnalysisResult();
|
||||
|
||||
|
@ -171,7 +171,7 @@ public class ObjectDetectectionFileIngestModule extends FileIngestModuleAdapter
|
||||
);
|
||||
|
||||
BlackboardArtifact artifact = file.newAnalysisResult(
|
||||
new BlackboardArtifact.Type(TSK_OBJECT_DETECTED), Score.SCORE_UNKNOWN, null, null, null, attributes)
|
||||
BlackboardArtifact.Type.TSK_OBJECT_DETECTED, Score.SCORE_UNKNOWN, null, null, null, attributes)
|
||||
.getAnalysisResult();
|
||||
|
||||
try {
|
||||
|
@ -56,7 +56,8 @@ import org.sleuthkit.datamodel.TskData.TSK_DB_FILES_TYPE_ENUM;
|
||||
* artifacts.
|
||||
*/
|
||||
class VolatilityProcessor {
|
||||
|
||||
private static final Score LIKELY_NOTABLE_SCORE = new Score(Score.Significance.LIKELY_NOTABLE, Score.MethodCategory.AUTO);
|
||||
|
||||
private static final Logger logger = Logger.getLogger(VolatilityProcessor.class.getName());
|
||||
private static final String VOLATILITY = "Volatility"; //NON-NLS
|
||||
private static final String VOLATILITY_EXECUTABLE = "volatility_2.6_win64_standalone.exe"; //NON-NLS
|
||||
@ -377,21 +378,14 @@ class VolatilityProcessor {
|
||||
}
|
||||
try {
|
||||
|
||||
Collection<BlackboardAttribute> attributes = singleton(
|
||||
new BlackboardAttribute(
|
||||
TSK_SET_NAME, VOLATILITY,
|
||||
Bundle.VolatilityProcessor_artifactAttribute_interestingFileSet(pluginName))
|
||||
);
|
||||
String setName = Bundle.VolatilityProcessor_artifactAttribute_interestingFileSet(pluginName);
|
||||
Collection<BlackboardAttribute> attributes = singleton(new BlackboardAttribute(TSK_SET_NAME, VOLATILITY, setName));
|
||||
|
||||
// Create artifact if it doesn't already exist.
|
||||
if (!blackboard.artifactExists(resolvedFile, BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT, attributes)) {
|
||||
String conclusion = TBD;
|
||||
String configuration = TBD;
|
||||
String justification = TBD;
|
||||
|
||||
BlackboardArtifact volArtifact = resolvedFile.newAnalysisResult(
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_FILE_HIT, INTERESTING_HIT_SCORE,
|
||||
conclusion, configuration, justification,
|
||||
BlackboardArtifact.Type.TSK_INTERESTING_FILE_HIT, LIKELY_NOTABLE_SCORE,
|
||||
null, setName, null,
|
||||
attributes)
|
||||
.getAnalysisResult();
|
||||
|
||||
|
@ -262,15 +262,11 @@ class LuceneQuery implements KeywordSearchQuery {
|
||||
hit.getArtifactID().ifPresent(artifactID
|
||||
-> attributes.add(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ASSOCIATED_ARTIFACT, MODULE_NAME, artifactID))
|
||||
);
|
||||
|
||||
String conclusion = TBD;
|
||||
String configuration = TBD;
|
||||
String justification = TBD;
|
||||
|
||||
try {
|
||||
return content.newAnalysisResult(
|
||||
BlackboardArtifact.Type.TSK_KEYWORD_HIT, KEYWORD_SEARCH_SCORE,
|
||||
conclusion, configuration, justification,
|
||||
null, listName, null,
|
||||
attributes)
|
||||
.getAnalysisResult();
|
||||
} catch (TskCoreException e) {
|
||||
|
@ -48,13 +48,10 @@ import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.Account;
|
||||
import org.sleuthkit.datamodel.AccountFileInstance;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.Score;
|
||||
import org.sleuthkit.datamodel.Score.MethodCategory;
|
||||
import org.sleuthkit.datamodel.Score.Significance;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.datamodel.TskData;
|
||||
|
||||
@ -75,8 +72,8 @@ import org.sleuthkit.datamodel.TskData;
|
||||
final class RegexQuery implements KeywordSearchQuery {
|
||||
|
||||
public static final Logger LOGGER = Logger.getLogger(RegexQuery.class.getName());
|
||||
private static final Score KEYWORD_SEARCH_SCORE = new Score(Significance.LIKELY_NOTABLE, MethodCategory.AUTO);
|
||||
|
||||
private static final Score LIKELY_NOTABLE_SCORE = new Score(Score.Significance.LIKELY_NOTABLE, Score.MethodCategory.AUTO);
|
||||
|
||||
/**
|
||||
* Lucene regular expressions do not support the following Java predefined
|
||||
* and POSIX character classes. There are other valid Java character classes
|
||||
@ -616,14 +613,10 @@ final class RegexQuery implements KeywordSearchQuery {
|
||||
attributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_KEYWORD_SEARCH_TYPE, MODULE_NAME, KeywordSearch.QueryType.REGEX.ordinal()));
|
||||
}
|
||||
|
||||
String conclusion = TBD;
|
||||
String configuration = TBD;
|
||||
String justification = TBD;
|
||||
|
||||
try {
|
||||
return content.newAnalysisResult(
|
||||
BlackboardArtifact.Type.TSK_KEYWORD_HIT, KEYWORD_SEARCH_SCORE,
|
||||
conclusion, configuration, justification, attributes)
|
||||
BlackboardArtifact.Type.TSK_KEYWORD_HIT, LIKELY_NOTABLE_SCORE,
|
||||
null, listName, null, attributes)
|
||||
.getAnalysisResult();
|
||||
} catch (TskCoreException e) {
|
||||
LOGGER.log(Level.SEVERE, "Error adding bb attributes for terms search artifact", e); //NON-NLS
|
||||
|
@ -41,6 +41,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
@ -59,6 +60,7 @@ import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.ReadContentInputStream.ReadContentInputStreamException;
|
||||
import org.sleuthkit.datamodel.Score;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.datamodel.TskData;
|
||||
import org.sleuthkit.datamodel.blackboardutils.WebBrowserArtifactsHelper;
|
||||
@ -67,7 +69,8 @@ import org.sleuthkit.datamodel.blackboardutils.WebBrowserArtifactsHelper;
|
||||
* Chromium recent activity extraction
|
||||
*/
|
||||
class Chromium extends Extract {
|
||||
|
||||
private static final Score NOTABLE_SCORE = new Score(Score.Significance.NOTABLE, Score.MethodCategory.AUTO);
|
||||
|
||||
private static final String HISTORY_QUERY = "SELECT urls.url, urls.title, urls.visit_count, urls.typed_count, " //NON-NLS
|
||||
+ "last_visit_time, urls.hidden, visits.visit_time, (SELECT urls.url FROM urls WHERE urls.id=visits.url) AS from_visit, visits.transition FROM urls, visits WHERE urls.id = visits.url"; //NON-NLS
|
||||
private static final String COOKIE_QUERY = "SELECT name, value, host_key, expires_utc,last_access_utc, creation_utc FROM cookies"; //NON-NLS
|
||||
@ -823,11 +826,15 @@ class Chromium extends Extract {
|
||||
// get form address atifacts
|
||||
getFormAddressArtifacts(webDataFile, tempFilePath, isSchemaV8X);
|
||||
if (databaseEncrypted) {
|
||||
Collection<BlackboardAttribute> bbattributes = new ArrayList<>();
|
||||
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_COMMENT,
|
||||
RecentActivityExtracterModuleFactory.getModuleName(),
|
||||
String.format("%s Autofill Database Encryption Detected", browser)));
|
||||
bbartifacts.add(createArtifactWithAttributes(ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED, webDataFile, bbattributes));
|
||||
String comment = String.format("%s Autofill Database Encryption Detected", browser);
|
||||
Collection<BlackboardAttribute> bbattributes = Arrays.asList(
|
||||
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_COMMENT,
|
||||
RecentActivityExtracterModuleFactory.getModuleName(), comment));
|
||||
|
||||
bbartifacts.add(
|
||||
webDataFile.newAnalysisResult(
|
||||
BlackboardArtifact.Type.TSK_ENCRYPTION_DETECTED, NOTABLE_SCORE,
|
||||
null, null, comment, bbattributes).getAnalysisResult());
|
||||
}
|
||||
} catch (NoCurrentCaseException | TskCoreException | Blackboard.BlackboardException ex) {
|
||||
logger.log(Level.SEVERE, String.format("Error adding artifacts to the case database "
|
||||
|
@ -34,7 +34,6 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.logging.Level;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
@ -51,7 +50,6 @@ import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import static org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE.TSK_ASSOCIATED_OBJECT;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.OsAccount;
|
||||
import org.sleuthkit.datamodel.Score;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
@ -37,6 +37,7 @@ from java.lang import System
|
||||
from java.util.logging import Level
|
||||
from org.sleuthkit.datamodel import SleuthkitCase
|
||||
from org.sleuthkit.datamodel import AbstractFile
|
||||
from org.sleuthkit.datamodel import Score
|
||||
from org.sleuthkit.datamodel import ReadContentInputStream
|
||||
from org.sleuthkit.datamodel import BlackboardArtifact
|
||||
from org.sleuthkit.datamodel import BlackboardAttribute
|
||||
@ -85,6 +86,7 @@ class SampleJythonDataSourceIngestModuleFactory(IngestModuleFactoryAdapter):
|
||||
# Data Source-level ingest module. One gets created per data source.
|
||||
# TODO: Rename this to something more specific. Could just remove "Factory" from above name.
|
||||
class SampleJythonDataSourceIngestModule(DataSourceIngestModule):
|
||||
LIKELY_NOTABLE_SCORE = Score(Score.Significance.LIKELY_NOTABLE, Score.MethodCategory.AUTO)
|
||||
|
||||
_logger = Logger.getLogger(SampleJythonDataSourceIngestModuleFactory.moduleName)
|
||||
|
||||
@ -142,7 +144,7 @@ class SampleJythonDataSourceIngestModule(DataSourceIngestModule):
|
||||
# artfiact. Refer to the developer docs for other examples.
|
||||
attrs = ArrayList()
|
||||
attrs.add(BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME, SampleJythonDataSourceIngestModuleFactory.moduleName, "Test file"))
|
||||
art = file.newAnalysisResult(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT, Score.SCORE_UNKNOWN, None, None, None, attrs)
|
||||
art = file.newAnalysisResult(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT, self.LIKELY_NOTABLE_SCORE, None, "Test file", None, attrs)
|
||||
|
||||
try:
|
||||
# index the artifact for keyword search
|
||||
|
@ -35,6 +35,7 @@ import jarray
|
||||
import inspect
|
||||
from java.lang import System
|
||||
from java.util.logging import Level
|
||||
from org.sleuthkit.datamodel import Score
|
||||
from org.sleuthkit.datamodel import SleuthkitCase
|
||||
from org.sleuthkit.datamodel import AbstractFile
|
||||
from org.sleuthkit.datamodel import ReadContentInputStream
|
||||
@ -88,6 +89,7 @@ class SampleJythonFileIngestModuleFactory(IngestModuleFactoryAdapter):
|
||||
# TODO: Rename this to something more specific. Could just remove "Factory" from above name.
|
||||
# Looks at the attributes of the passed in file.
|
||||
class SampleJythonFileIngestModule(FileIngestModule):
|
||||
LIKELY_NOTABLE_SCORE = Score(Score.Significance.LIKELY_NOTABLE, Score.MethodCategory.AUTO)
|
||||
|
||||
_logger = Logger.getLogger(SampleJythonFileIngestModuleFactory.moduleName)
|
||||
|
||||
@ -130,7 +132,7 @@ class SampleJythonFileIngestModule(FileIngestModule):
|
||||
attrs = ArrayList()
|
||||
attrs.add(BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME,
|
||||
SampleJythonFileIngestModuleFactory.moduleName, "Text Files"))
|
||||
art = file.newAnalysisResult(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT, Score.SCORE_UNKNOWN, None, None, None, attrs)
|
||||
art = file.newAnalysisResult(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT, self.LIKELY_NOTABLE_SCORE, None, "Text Files", None, attrs)
|
||||
|
||||
|
||||
try:
|
||||
|
@ -75,6 +75,7 @@ import org.sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments.Fil
|
||||
* structure and metadata.
|
||||
*/
|
||||
public final class ThunderbirdMboxFileIngestModule implements FileIngestModule {
|
||||
private static final Score NOTABLE_SCORE = new Score(Score.Significance.NOTABLE, Score.MethodCategory.AUTO);
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ThunderbirdMboxFileIngestModule.class.getName());
|
||||
private final IngestServices services = IngestServices.getInstance();
|
||||
@ -242,13 +243,14 @@ public final class ThunderbirdMboxFileIngestModule implements FileIngestModule {
|
||||
// encrypted pst: Add encrypted file artifact
|
||||
try {
|
||||
|
||||
String encryptionFileLevel = NbBundle.getMessage(this.getClass(),
|
||||
"ThunderbirdMboxFileIngestModule.encryptionFileLevel");
|
||||
BlackboardArtifact artifact = abstractFile.newAnalysisResult(
|
||||
new BlackboardArtifact.Type(BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED),
|
||||
Score.SCORE_UNKNOWN, null, null, null, Arrays.asList(
|
||||
BlackboardArtifact.Type.TSK_ENCRYPTION_DETECTED,
|
||||
NOTABLE_SCORE, null, null, encryptionFileLevel, Arrays.asList(
|
||||
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME,
|
||||
EmailParserModuleFactory.getModuleName(),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"ThunderbirdMboxFileIngestModule.encryptionFileLevel"))
|
||||
encryptionFileLevel)
|
||||
))
|
||||
.getAnalysisResult();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user