Autopsy
4.17.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
|
Inherits org.sleuthkit.autopsy.ingest.FileIngestModuleAdapter.
Public Member Functions | |
ProcessResult | process (AbstractFile file) |
void | shutDown () |
void | startUp (IngestJobContext context) throws IngestModuleException |
Protected Member Functions | |
File | createLocalCopy (AbstractFile file) throws IngestModuleException, IOException |
Private Member Functions | |
synchronized Path | getTempDirectory (long jobId) throws IngestModuleException |
Private Attributes | |
IngestJobContext | context = null |
Long | jobId |
final YaraIngestJobSettings | settings |
Static Private Attributes | |
static final int | FILE_SIZE_THRESHOLD_BYTE = FILE_SIZE_THRESHOLD_MB * 1024 * 1024 |
static final int | FILE_SIZE_THRESHOLD_MB = 100 |
static final Logger | logger = Logger.getLogger(YaraIngestModule.class.getName()) |
static final Map< Long, Path > | pathsByJobId = new ConcurrentHashMap<>() |
static final IngestModuleReferenceCounter | refCounter = new IngestModuleReferenceCounter() |
static final String | RULESET_DIR = "RuleSets" |
static final String | YARA_DIR = "yara" |
static final int | YARA_SCAN_TIMEOUT_SEC = 30 * 60 * 60 |
An ingest module that runs the yara against the given files.
Definition at line 53 of file YaraIngestModule.java.
|
protected |
Create a local copy of the given AbstractFile.
file | AbstractFile to make a copy of. |
org.sleuthkit.autopsy.ingest.IngestModule.IngestModuleException | |
IOException |
Definition at line 223 of file YaraIngestModule.java.
References org.sleuthkit.autopsy.ingest.IngestJobContext.getJobId(), org.sleuthkit.autopsy.modules.yara.YaraIngestModule.getTempDirectory(), and org.sleuthkit.autopsy.datamodel.ContentUtils.writeToFile().
Referenced by org.sleuthkit.autopsy.modules.yara.YaraIngestModule.process().
|
private |
Return the temp directory for this jobId. If the folder does not exit it will be created.
jobId | The current jobId |
Definition at line 186 of file YaraIngestModule.java.
References org.sleuthkit.autopsy.casemodule.Case.getCurrentCaseThrows(), org.sleuthkit.autopsy.casemodule.Case.getTempDirectory(), org.sleuthkit.autopsy.modules.yara.YaraIngestModule.jobId, and org.sleuthkit.autopsy.modules.yara.YaraIngestModule.YARA_DIR.
Referenced by org.sleuthkit.autopsy.modules.yara.YaraIngestModule.createLocalCopy(), org.sleuthkit.autopsy.modules.yara.YaraIngestModule.process(), and org.sleuthkit.autopsy.modules.yara.YaraIngestModule.startUp().
ProcessResult org.sleuthkit.autopsy.modules.yara.YaraIngestModule.process | ( | AbstractFile | file | ) |
Processes a file. Called between calls to startUp() and shutDown(). Will be called for each file in a data source.
file | The file to analyze. |
Implements org.sleuthkit.autopsy.ingest.FileIngestModule.
Definition at line 121 of file YaraIngestModule.java.
References org.sleuthkit.autopsy.modules.yara.YaraIngestModule.createLocalCopy(), org.sleuthkit.autopsy.ingest.IngestModule.ProcessResult.ERROR, org.sleuthkit.autopsy.modules.yara.YaraIngestModule.FILE_SIZE_THRESHOLD_BYTE, org.sleuthkit.autopsy.casemodule.Case.getCurrentCaseThrows(), org.sleuthkit.autopsy.casemodule.Case.getSleuthkitCase(), org.sleuthkit.autopsy.modules.yara.YaraIngestModule.getTempDirectory(), org.sleuthkit.autopsy.ingest.IngestModule.ProcessResult.OK, and org.sleuthkit.autopsy.modules.yara.YaraIngestJobSettings.onlyExecutableFiles.
void org.sleuthkit.autopsy.modules.yara.YaraIngestModule.shutDown | ( | ) |
Invoked by Autopsy when an ingest job is completed (either because the data has been analyzed or because the job was canceled - check IngestJobContext.fileIngestIsCancelled()), before the ingest module instance is discarded. The module should respond by doing things like releasing private resources, submitting final results, and posting a final ingest message.
Implements org.sleuthkit.autopsy.ingest.FileIngestModule.
Definition at line 109 of file YaraIngestModule.java.
References org.sleuthkit.autopsy.ingest.IngestModuleReferenceCounter.decrementAndGet().
void org.sleuthkit.autopsy.modules.yara.YaraIngestModule.startUp | ( | IngestJobContext | context | ) | throws IngestModuleException |
Invoked by Autopsy to allow an ingest module instance to set up any internal data structures and acquire any private resources it will need during an ingest job. If the module depends on loading any resources, it should do so in this method so that it can throw an exception in the case of an error and alert the user. Exceptions that are thrown from process() and shutDown() are logged, but do not stop processing of the data source.
context | Provides data and services specific to the ingest job and the ingest pipeline of which the module is a part. |
Implements org.sleuthkit.autopsy.ingest.IngestModule.
Definition at line 84 of file YaraIngestModule.java.
References org.sleuthkit.autopsy.modules.yara.YaraIngestModule.context, org.sleuthkit.autopsy.ingest.IngestJobContext.getJobId(), org.sleuthkit.autopsy.modules.yara.YaraIngestJobSettings.getSelectedRuleSetNames(), org.sleuthkit.autopsy.modules.yara.YaraIngestModule.getTempDirectory(), org.sleuthkit.autopsy.ingest.IngestModuleReferenceCounter.incrementAndGet(), org.sleuthkit.autopsy.coreutils.PlatformUtil.is64BitOS(), org.sleuthkit.autopsy.coreutils.PlatformUtil.isWindowsOS(), and org.sleuthkit.autopsy.modules.yara.YaraIngestModule.RULESET_DIR.
|
private |
Definition at line 68 of file YaraIngestModule.java.
Referenced by org.sleuthkit.autopsy.modules.yara.YaraIngestModule.startUp().
|
staticprivate |
Definition at line 57 of file YaraIngestModule.java.
Referenced by org.sleuthkit.autopsy.modules.yara.YaraIngestModule.process().
|
staticprivate |
Definition at line 56 of file YaraIngestModule.java.
|
private |
Definition at line 69 of file YaraIngestModule.java.
Referenced by org.sleuthkit.autopsy.modules.yara.YaraIngestModule.getTempDirectory().
|
staticprivate |
Definition at line 61 of file YaraIngestModule.java.
|
staticprivate |
Definition at line 63 of file YaraIngestModule.java.
|
staticprivate |
Definition at line 60 of file YaraIngestModule.java.
|
staticprivate |
Definition at line 64 of file YaraIngestModule.java.
Referenced by org.sleuthkit.autopsy.modules.yara.YaraIngestModule.startUp().
|
private |
Definition at line 66 of file YaraIngestModule.java.
|
staticprivate |
Definition at line 62 of file YaraIngestModule.java.
Referenced by org.sleuthkit.autopsy.modules.yara.YaraIngestModule.getTempDirectory().
|
staticprivate |
Definition at line 58 of file YaraIngestModule.java.
Copyright © 2012-2021 Basis Technology. Generated on: Tue Jan 19 2021
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.