4590 rename artifact and attribute for data source usage

This commit is contained in:
William Schaefer 2019-01-08 14:44:11 -05:00
parent 35b8fe44cc
commit b7be944a0b
3 changed files with 20 additions and 21 deletions

View File

@ -37,7 +37,6 @@ import org.openide.util.lookup.Lookups;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.CasePreferences; import org.sleuthkit.autopsy.casemodule.CasePreferences;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.core.UserPreferences;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.autopsy.ingest.IngestManager;
import org.sleuthkit.autopsy.ingest.ModuleDataEvent; import org.sleuthkit.autopsy.ingest.ModuleDataEvent;
@ -236,7 +235,7 @@ public class ExtractedContent implements AutopsyVisitableItem {
doNotShow.add(new BlackboardArtifact.Type(TSK_INTERESTING_FILE_HIT)); doNotShow.add(new BlackboardArtifact.Type(TSK_INTERESTING_FILE_HIT));
doNotShow.add(new BlackboardArtifact.Type(TSK_INTERESTING_ARTIFACT_HIT)); doNotShow.add(new BlackboardArtifact.Type(TSK_INTERESTING_ARTIFACT_HIT));
doNotShow.add(new BlackboardArtifact.Type(TSK_ACCOUNT)); doNotShow.add(new BlackboardArtifact.Type(TSK_ACCOUNT));
doNotShow.add(new BlackboardArtifact.Type(TSK_DATA_SOURCE_PROFILE)); doNotShow.add(new BlackboardArtifact.Type(TSK_DATA_SOURCE_USAGE));
} }
private final PropertyChangeListener pcl = (PropertyChangeEvent evt) -> { private final PropertyChangeListener pcl = (PropertyChangeEvent evt) -> {

View File

@ -32,8 +32,8 @@ import org.sleuthkit.datamodel.BlackboardAttribute;
import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.Content;
import org.sleuthkit.datamodel.TskCoreException; import org.sleuthkit.datamodel.TskCoreException;
@Messages({"DataSourceProfiler.parentModuleName=Recent Activity"}) @Messages({"DataSourceUsageAnalyzer.parentModuleName=Recent Activity"})
public class DataSourceProfiler extends Extract { public class DataSourceUsageAnalyzer extends Extract {
private static final Logger logger = Logger.getLogger(Firefox.class.getName()); private static final Logger logger = Logger.getLogger(Firefox.class.getName());
private Content dataSource; private Content dataSource;
@ -62,10 +62,10 @@ public class DataSourceProfiler extends Extract {
List<AbstractFile> files = fileManager.findFilesByParentPath(dataSource.getId(), "/windows/system32"); List<AbstractFile> files = fileManager.findFilesByParentPath(dataSource.getId(), "/windows/system32");
//create an artifact if any files with the windows/system32 path were found //create an artifact if any files with the windows/system32 path were found
if (!files.isEmpty()) { if (!files.isEmpty()) {
bbattributes.add(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATA_SOURCE_DESCRIPTOR, bbattributes.add(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATA_SOURCE_USE_DETAILS,
Bundle.DataSourceProfiler_parentModuleName(), Bundle.DataSourceProfiler_parentModuleName(),
"Windows volume")); //NON-NLS "Windows volume")); //NON-NLS
addArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_DATA_SOURCE_PROFILE, dataSource, bbattributes); addArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_DATA_SOURCE_USAGE, dataSource, bbattributes);
} }
} }

View File

@ -45,7 +45,7 @@ import org.sleuthkit.autopsy.ingest.IngestJobContext;
public final class RAImageIngestModule implements DataSourceIngestModule { public final class RAImageIngestModule implements DataSourceIngestModule {
private static final Logger logger = Logger.getLogger(RAImageIngestModule.class.getName()); private static final Logger logger = Logger.getLogger(RAImageIngestModule.class.getName());
private final List<Extract> extracters = new ArrayList<>(); private final List<Extract> extractors = new ArrayList<>();
private final List<Extract> browserExtracters = new ArrayList<>(); private final List<Extract> browserExtracters = new ArrayList<>();
private IngestServices services = IngestServices.getInstance(); private IngestServices services = IngestServices.getInstance();
private IngestJobContext context; private IngestJobContext context;
@ -70,21 +70,21 @@ public final class RAImageIngestModule implements DataSourceIngestModule {
Extract chrome = new Chrome(); Extract chrome = new Chrome();
Extract firefox = new Firefox(); Extract firefox = new Firefox();
Extract SEUQA = new SearchEngineURLQueryAnalyzer(); Extract SEUQA = new SearchEngineURLQueryAnalyzer();
Extract dataSourceProfiler = new DataSourceProfiler(); Extract dataSourceProfiler = new DataSourceUsageAnalyzer();
extracters.add(chrome); extractors.add(chrome);
extracters.add(firefox); extractors.add(firefox);
extracters.add(iexplore); extractors.add(iexplore);
extracters.add(recentDocuments); extractors.add(recentDocuments);
extracters.add(dataSourceProfiler); extractors.add(dataSourceProfiler);
extracters.add(SEUQA); // this needs to run after the web browser modules extractors.add(SEUQA); // this needs to run after the web browser modules
extracters.add(registry); // this runs last because it is slowest extractors.add(registry); // this runs last because it is slowest
browserExtracters.add(chrome); browserExtracters.add(chrome);
browserExtracters.add(firefox); browserExtracters.add(firefox);
browserExtracters.add(iexplore); browserExtracters.add(iexplore);
for (Extract extracter : extracters) { for (Extract extracter : extractors) {
extracter.init(); extracter.init();
} }
} }
@ -96,12 +96,12 @@ public final class RAImageIngestModule implements DataSourceIngestModule {
"RAImageIngestModule.process.started", "RAImageIngestModule.process.started",
dataSource.getName()))); dataSource.getName())));
progressBar.switchToDeterminate(extracters.size()); progressBar.switchToDeterminate(extractors.size());
ArrayList<String> errors = new ArrayList<>(); ArrayList<String> errors = new ArrayList<>();
for (int i = 0; i < extracters.size(); i++) { for (int i = 0; i < extractors.size(); i++) {
Extract extracter = extracters.get(i); Extract extracter = extractors.get(i);
if (context.dataSourceIngestIsCancelled()) { if (context.dataSourceIngestIsCancelled()) {
logger.log(Level.INFO, "Recent Activity has been canceled, quitting before {0}", extracter.getName()); //NON-NLS logger.log(Level.INFO, "Recent Activity has been canceled, quitting before {0}", extracter.getName()); //NON-NLS
break; break;
@ -174,8 +174,8 @@ public final class RAImageIngestModule implements DataSourceIngestModule {
return ProcessResult.OK; return ProcessResult.OK;
} }
for (int i = 0; i < extracters.size(); i++) { for (int i = 0; i < extractors.size(); i++) {
Extract extracter = extracters.get(i); Extract extracter = extractors.get(i);
try { try {
extracter.complete(); extracter.complete();
} catch (Exception ex) { } catch (Exception ex) {