-
Notifications
You must be signed in to change notification settings - Fork 595
/
modMobile.dox
72 lines (54 loc) · 3.61 KB
/
modMobile.dox
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
/*! \page mod_mobile_page Mobile Forensics
\section mod_mobile_overview Overview
Smart phones are basically small computers and Autopsy can parse and analyze the contents of Android and iOS devices. This includes both the official databases and third-party app databaes. This page provides some basic pointers for doing so. It assumes that you have already read \ref mod_ingest_page and know the basics of writing ingest modules.
The basic idea is that you need an ingest module. We've typically written mobile forensics modules as data source-level ingest modules, which means they are passed in a reference to the entire data source and not passed in individual files. We do this because we typically know the path where we expect to find the files and databases of interest.
The ingest module has a basic flow of
- Query for files using the org.sleuthkit.autopsy.casemodule.services.FileManager service
- Parse them or open them with SQLite (you'll need to bring along a SQLite JAR file)
- Create Blackboard Artifacts (see \ref platform_blackboard)
The BlackBoard has standard artifacts for the standard cell phone forensics data types, such as BlackboardArtifact.TSK_CALLLOG.
There are a couple of classes that can help streamline processing mobile databases. The org.sleuthkit.autopsy.coreutils.AppSQLiteDB class has methods for opening and querying SQLite databases. For example, to find and open a database named "transfer20.db" in the "com.dewmobile.kuaiya.play" package, you can simply use the following method (examples in Python):
\verbatim
transferDbs = AppSQLiteDB.findAppDatabases(dataSource, "transfer20.db", True, "com.dewmobile.kuaiya.play")
\endverbatim
Once you have your databases, you can run easily run queries on them:
\code
queryString = "SELECT device, name, direction, createtime, path, title FROM transfer"
transfersResultSet = transferDb.runQuery(queryString)
\endcode
You can make Blackboard Artifacts using the org.sleuthkit.datamodel.blackboardutils.CommunicationArtifactsHelper class. This gives you methods to make contacts, messages, and call log entries. The following is sample code in Python to set up the CommunicationArtifactsHelper and then use it to make artifacts.
\code
transferDbHelper = CommunicationArtifactsHelper(current_case.getSleuthkitCase(),
"Zapya Analyzer", transferDb.getDBFile(),
Account.Type.ZAPYA)
\endcode
\code
direction = CommunicationDirection.UNKNOWN
fromAddress = None
toAddress = None
if (transfersResultSet.getInt("direction") == 1):
direction = CommunicationDirection.OUTGOING
toAddress = Account.Address(transfersResultSet.getString("device"), transfersResultSet.getString("name") )
else:
direction = CommunicationDirection.INCOMING
fromAddress = Account.Address(transfersResultSet.getString("device"), transfersResultSet.getString("name") )
msgBody = "" # there is no body.
attachments = [transfersResultSet.getString("path")]
msgBody = general.appendAttachmentList(msgBody, attachments)
timeStamp = transfersResultSet.getLong("createtime") / 1000
messageArtifact = transferDbHelper.addMessage(
self._MESSAGE_TYPE,
direction,
fromAddress,
toAddress,
timeStamp,
MessageReadStatus.UNKNOWN,
None, # subject
msgBody,
None ) # thread id
\endcode
Look in the <tt>autopsy\\InternalPythonModules\\android\\</tt> folder for additional examples.
\section mod_mobile_std Android Module
Autopsy comes with an Android module, as defined in various classes in the org.sleuthkit.autopsy.modules.android package. You can use those classes as a reference example.
Submit pull requests with any additions that you have to these modules.
*/