This repository has been archived by the owner on May 9, 2024. It is now read-only.
forked from labcif/FAMA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autopsy.py
106 lines (76 loc) · 3.21 KB
/
autopsy.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import os
import sys
import logging
sys.path.append(os.path.dirname(__file__)) #include this path to module autopsy
from org.sleuthkit.autopsy.ingest import GenericIngestModuleJobSettings
from org.sleuthkit.autopsy.report import GeneralReportModuleAdapter
from org.sleuthkit.autopsy.ingest import IngestModuleFactoryAdapter
from org.sleuthkit.autopsy.corecomponentinterfaces import DataSourceProcessor
from org.sleuthkit.autopsy.casemodule import Case
from psy.ingest import ProjectIngestModule
from psy.report import ReportOutput
from psy.processor import DataSourcesPanelSettings
from psy.settings import ProjectIngestSettingsPanel, ProjectReportSettingsPanel
#3 Modules - Ingest, Report, DatasourceProcessor
class ProjectIngestModuleFactory(IngestModuleFactoryAdapter):
moduleName = "LabCif - Android Forensics"
def __init__(self):
self.settings = None
#Module Settings
def getModuleDisplayName(self):
return self.moduleName
def getModuleDescription(self):
return "Android forensics framework. Extract, analyze and generate reports based on user data."
def getModuleVersionNumber(self):
return "1.0"
#Data Source Ingest
def isDataSourceIngestModuleFactory(self):
return True
def createDataSourceIngestModule(self, ingestOptions):
return ProjectIngestModule(self.settings)
#Settings
def getDefaultIngestJobSettings(self):
return GenericIngestModuleJobSettings()
def hasIngestJobSettingsPanel(self):
return True
def getIngestJobSettingsPanel(self, settings):
if not isinstance(settings, GenericIngestModuleJobSettings):
raise IllegalArgumentException("Expected settings argument to be instanceof GenericIngestModuleJobSettings")
self.settings = settings
return ProjectIngestSettingsPanel(self.settings)
class ProjectIngestModuleReport(GeneralReportModuleAdapter):
moduleName = "LabCif - Android Forensics Report"
def __init__(self):
self.settings = None
self.report = ReportOutput()
def getName(self):
return self.moduleName
def getDescription(self):
return "Android Forensics Framework Report Generator"
def generateReport(self, baseReportDir, progressBar):
self.report.generateReport(baseReportDir, progressBar)
def getConfigurationPanel(self):
self.configPanel = ProjectReportSettingsPanel()
return self.configPanel
def getRelativeFilePath(self):
return "index.html"
class ProjectDSProcessor(DataSourceProcessor):
configPanel = None
moduleName = "Live extraction with ADB (Android)"
def __init__(self):
self.configPanel = DataSourcesPanelSettings()
@staticmethod
def getType():
return ProjectDSProcessor.moduleName
def getDataSourceType(self):
return self.moduleName
def getPanel(self):
return self.configPanel
def isPanelValid(self):
return self.configPanel.validatePanel()
def run(self, progressMonitor, callback):
self.configPanel.run(progressMonitor, callback)
def cancel(self):
logging.info("cancel") #implement? #cancel thread
def reset(self):
pass