
Differenzanalyse von Malware im Arbeitsspeicher
Ein Open-Source-Speicheranalyse-Tool, das auf Volatility aufbaut. Es ist als Testumgebung für interessante neue Techniken gedacht, die der Community zur Verfügung gestellt werden sollen. Diese Techniken sind ein Versuch, den Untersuchungsprozess durch Datenreduktion und die Kodierung von Expertenwissen zu beschleunigen.
NOTE: Most DAMM output looks better piped through 'less -S' (upper 'S') as in:
python damm.py -h usage: damm.py [-h] [-d DIR] [-p PLUGIN [PLUGIN ...]] [-f FILE] [-k KDBG] [--db DB] [--profile PROFILE] [--debug] [--info] [--tsv] [--grepable] [--filter FILTER] [--filtertype FILTERTYPE] [--diff BASELINE] [-u FIELD [FIELD ...]] [--warnings] [-q]
DAMM v1.0 Beta
optional arguments: -h, --help show this help message and exit -d DIR Path to additional plugin directory -p PLUGIN [PLUGIN ...] Plugin(s) to run. For a list of options use --info -f FILE Memory image file to run plugin on -k KDBG KDBG address for the images (in hex) --db DB SQLite db file, for efficient input/output --profile PROFILE Volatility profile for the images (e.g. WinXPSP2x86) --debug Print debugging statements --info Print available volatility profiles, plugins --tsv Print screen formatted output. --grepable Print in grepable text format --filter FILTER Filter results on name:value pair, e.g., pid:42 --filtertype FILTERTYPE Filter match type; either "exact" or "partial", defaults to partial --diff BASELINE Diff the imageFile|db with this db file as a baseline -u FIELD [FIELD ...] Use the specified fields to determine uniqueness of memobjs when diffing --warnings Look for suspicious objects. -q Query the supplied db (via --db).
### Supported plugins <a name="plugins"/>
Siehe #python damm.py --info
apihooks callbacks connections devicetree dlls evtlogs handles idt injections messagehooks mftentries modules mutants privileges processes services sids timers
### Example <a name="example"/>
Geben Sie wie in Volatility ein Profil, ein Speicherabbild und eine Liste der auszuführenden Plugins (oder 'all') an, um die Terminalausgabe zu erhalten:```
python damm.py --profile WinXPSP2x86 -f memory.dmp -p processes | less -S
(or python damm.py --profile WinXPSP2x86 -f memory.dmp -p processes dlls modules)
(or python damm.py --profile WinXPSP2x86 -f memory.dmp -p all)
processes
offset name pid ppid prio image_path_name create_time exit_time threads session_id handles is_wow64 pslist psscan thrdproc pspcid csrss session deskthrd command_line
0x25c8830 System 4 0 8 59 403 False True True True True False False False
0x225ada0 alg.exe 188 668 8 C:\WINDOWS\System32\alg.exe 2010-10-29 17:09:09 UTC+0000 6 0 107 False True True True True True True True C:\WINDOWS\System32\alg.exe
0x2114938 ipconfig.exe 304 968 8 2011-06-03 04:31:35 UTC+0000 2011-06-03 04:31:36 UTC+0000 0 0 False True True False True False False False
0x2086978 TSVNCache.exe 324 1196 8 C:\Program Files\TortoiseSVN\bin\TSVNCache.exe 2010-10-29 17:11:49 UTC+0000 7 0 54 False True True True True True True True "C:\Program Files\TortoiseSVN\bin\TSVNCache.exe"
0x22df020 smss.exe 376 4 11 \SystemRoot\System32\smss.exe 2010-10-29 17:08:53 UTC+0000 3 19 False True True True True False False False \SystemRoot\System32\smss.exe
...
Um diese Ergebnisse in einer SQLite-Datenbank zu speichern, geben Sie einfach einen Dateinamen für die Datenbank an:``` python damm.py --profile WinXPSP2x86 -f memory.dmp -p processes --db my_results.db
Dies wird die Ergebnisse im Terminal ausgeben und sie auch in 'my_results.db' speichern.
Um die Ergebnisse erneut zu sehen:```
python damm.py -p processes --db my_results.db
(Beachten Sie, dass Sie das Speicherabbild nicht mehr benötigen und auch kein Profil angeben müssen; die Auflistung erscheint nahezu sofort, unabhängig davon, wie lange die ursprüngliche Verarbeitung gedauert hat.)
Wenn Sie später Prozesse und andere Plugins sehen möchten:``` python damm.py --profile WinXPSP2x86 -p processes dlls modules --db my_results.db
Wird:
1. die db nach der 'processes'-Ausgabe abfragen
2. die 'dlls'- und 'modules'-Plugins ausführen
3. die Ergebnisse anzeigen
4. die neuen Ergebnisse in der db speichern
Sobald du einige Daten in einer db gespeichert hast, kannst du sie mit dem -q-Schalter abfragen```
python damm.py -q --db my_results.db
profile: WinXPSP2x86
memimg: WinXPSP2x86/stuxnet.vmem
COMPUTERNAME: JAN-DF663B3DBF1
plugins: processes dlls modules
Plugins haben Attribute, die Typen zum Filtern haben können, z. B. für Prozesse: (verwenden Sie --info, um alle Plugin-Attribute zu sehen)``` offset name : string pid : pid ppid : pid image_path_name : string command_line : string create_time exit_time threads session_id handles is_wow64 pslist psscan thrdproc pspcid csrss session deskthrd
Diese Attribute und Typen können von den Differenz- und Filterfunktionen von DAMM genutzt werden