Volatility - CheatSheet

Lernen Sie AWS-Hacking von Grund auf mit htARTE (HackTricks AWS Red Team Expert)!

Andere Möglichkeiten, HackTricks zu unterstützen:

​​RootedCON ist die relevanteste Cybersicherheitsveranstaltung in Spanien und eine der wichtigsten in Europa. Mit dem Ziel, technisches Wissen zu fördern, ist dieser Kongress ein brodelnder Treffpunkt für Technologie- und Cybersicherheitsfachleute in jeder Disziplin.

Wenn Sie etwas Schnelles und Verrücktes wollen, das mehrere Volatility-Plugins parallel startet, können Sie dies verwenden: https://github.com/carlospolop/autoVolatility

python autoVolatility.py -f MEMFILE -d OUT_DIRECTORY -e /home/user/tools/volatility/vol.py # It will use the most important plugins (could use a lot of space depending on the size of the memory)

Installation

volatility3

git clone https://github.com/volatilityfoundation/volatility3.git
cd volatility3
python3 setup.py install
python3 vol.py —h

Methode 1: Prozessliste anzeigen

Verwenden Sie den Befehl pslist, um eine Liste aller laufenden Prozesse im Speicherabbild anzuzeigen.

volatility -f memory_dump.raw --profile=PROFILE pslist

Ersetzen Sie memory_dump.raw durch den Pfad zum Speicherabbild und PROFILE durch das Profil, das für das Speicherabbild geeignet ist.

Dieser Befehl zeigt Informationen wie PID (Prozess-ID), Name, Elternprozess-ID, Startzeit und Speicherbereich des Prozesses an.

Beispiel:

volatility -f memory_dump.raw --profile=Win7SP1x64 pslist
Download the executable from https://www.volatilityfoundation.org/26
git clone https://github.com/volatilityfoundation/volatility.git
cd volatility
python setup.py install

Volatility-Befehle

Greifen Sie auf die offizielle Dokumentation unter Volatility-Befehlsreferenz zu.

Hinweis zu "list"- und "scan"-Plugins

Volatility hat zwei Hauptansätze für Plugins, die sich manchmal in ihren Namen widerspiegeln. "List"-Plugins versuchen, durch Windows-Kernel-Strukturen zu navigieren, um Informationen wie Prozesse (Suchen und Durchlaufen der verketteten Liste der _EPROCESS-Strukturen im Speicher), Betriebssystem-Handles (Suchen und Auflisten der Handle-Tabelle, Dereferenzieren von gefundenen Zeigern usw.) abzurufen. Sie verhalten sich mehr oder weniger wie die Windows-API, wenn sie beispielsweise Prozesse auflistet.

Das macht "List"-Plugins ziemlich schnell, aber genauso anfällig für Manipulationen durch Malware wie die Windows-API. Wenn beispielsweise Malware DKOM verwendet, um einen Prozess aus der verketteten Liste _EPROCESS zu trennen, wird er nicht im Task-Manager angezeigt und auch nicht in der pslist.

"Scan"-Plugins hingegen verwenden einen Ansatz ähnlich dem Herausschneiden des Speichers nach Dingen, die Sinn ergeben könnten, wenn sie als bestimmte Strukturen dereferenziert werden. psscan liest beispielsweise den Speicher und versucht, _EPROCESS-Objekte daraus zu erstellen (es verwendet Pool-Tag-Scanning, bei dem nach 4-Byte-Zeichenketten gesucht wird, die auf das Vorhandensein einer interessanten Struktur hinweisen). Der Vorteil ist, dass es Prozesse ausgraben kann, die beendet wurden, und selbst wenn Malware die verkettete Liste _EPROCESS manipuliert, findet das Plugin die Struktur immer noch im Speicher (da sie für den Prozess weiterhin vorhanden sein muss). Der Nachteil ist, dass "Scan"-Plugins etwas langsamer als "List"-Plugins sind und manchmal falsch positive Ergebnisse liefern können (ein Prozess, der vor langer Zeit beendet wurde und dessen Struktur von anderen Operationen überschrieben wurde).

Quelle: http://tomchop.me/2016/11/21/tutorial-volatility-plugins-malware-analysis/

Betriebssystem-Profile

Volatility3

Wie im Readme erklärt, müssen Sie die Symboltabelle des Betriebssystems, das Sie unterstützen möchten, in volatility3/volatility/symbols platzieren. Symboltabelle-Pakete für verschiedene Betriebssysteme stehen zum Download zur Verfügung unter:

Volatility2

Externes Profil

Sie können die Liste der unterstützten Profile erhalten, indem Sie Folgendes tun:

./volatility_2.6_lin64_standalone --info | grep "Profile"

Wenn Sie ein neues Profil, das Sie heruntergeladen haben, verwenden möchten (zum Beispiel ein Linux-Profil), müssen Sie die folgende Ordnerstruktur erstellen: plugins/overlays/linux und die Zip-Datei mit dem Profil in diesen Ordner legen. Anschließend erhalten Sie die Anzahl der Profile mit dem Befehl:

./vol --plugins=/home/kali/Desktop/ctfs/final/plugins --info
Volatility Foundation Volatility Framework 2.6


Profiles
--------
LinuxCentOS7_3_10_0-123_el7_x86_64_profilex64 - A Profile for Linux CentOS7_3.10.0-123.el7.x86_64_profile x64
VistaSP0x64                                   - A Profile for Windows Vista SP0 x64
VistaSP0x86                                   - A Profile for Windows Vista SP0 x86

Sie können Linux- und Mac-Profile von https://github.com/volatilityfoundation/profiles herunterladen.

Im vorherigen Abschnitt sehen Sie, dass das Profil LinuxCentOS7_3_10_0-123_el7_x86_64_profilex64 genannt wird und Sie es verwenden können, um etwas Ähnliches auszuführen:

./vol -f file.dmp --plugins=. --profile=LinuxCentOS7_3_10_0-123_el7_x86_64_profilex64 linux_netscan

Profil entdecken

volatility -f <memory_dump> imageinfo
volatility -f <memory_dump> kdbgscan
volatility -f <memory_dump> hivelist
volatility -f <memory_dump> printkey -K <registry_key>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=html -D <output_directory>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=csv -D <output_directory>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=json -D <output_directory>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm> --output-encryption-key=<output_encryption_key>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm> --output-encryption-key=<output_encryption_key> --output-encryption-iv=<output_encryption_iv>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm> --output-encryption-key=<output_encryption_key> --output-encryption-iv=<output_encryption_iv> --output-encryption-salt=<output_encryption_salt>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm> --output-encryption-key=<output_encryption_key> --output-encryption-iv=<output_encryption_iv> --output-encryption-salt=<output_encryption_salt> --output-encryption-iterations=<output_encryption_iterations>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm> --output-encryption-key=<output_encryption_key> --output-encryption-iv=<output_encryption_iv> --output-encryption-salt=<output_encryption_salt> --output-encryption-iterations=<output_encryption_iterations> --output-encryption-mode=<output_encryption_mode>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm> --output-encryption-key=<output_encryption_key> --output-encryption-iv=<output_encryption_iv> --output-encryption-salt=<output_encryption_salt> --output-encryption-iterations=<output_encryption_iterations> --output-encryption-mode=<output_encryption_mode> --output-encryption-padding=<output_encryption_padding>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm> --output-encryption-key=<output_encryption_key> --output-encryption-iv=<output_encryption_iv> --output-encryption-salt=<output_encryption_salt> --output-encryption-iterations=<output_encryption_iterations> --output-encryption-mode=<output_encryption_mode> --output-encryption-padding=<output_encryption_padding> --output-encryption-authentication=<output_encryption_authentication>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm> --output-encryption-key=<output_encryption_key> --output-encryption-iv=<output_encryption_iv> --output-encryption-salt=<output_encryption_salt> --output-encryption-iterations=<output_encryption_iterations> --output-encryption-mode=<output_encryption_mode> --output-encryption-padding=<output_encryption_padding> --output-encryption-authentication=<output_encryption_authentication> --output-encryption-authentication-key=<output_encryption_authentication_key>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm> --output-encryption-key=<output_encryption_key> --output-encryption-iv=<output_encryption_iv> --output-encryption-salt=<output_encryption_salt> --output-encryption-iterations=<output_encryption_iterations> --output-encryption-mode=<output_encryption_mode> --output-encryption-padding=<output_encryption_padding> --output-encryption-authentication=<output_encryption_authentication> --output-encryption-authentication-key=<output_encryption_authentication_key> --output-encryption-authentication-iv=<output_encryption_authentication_iv>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm> --output-encryption-key=<output_encryption_key> --output-encryption-iv=<output_encryption_iv> --output-encryption-salt=<output_encryption_salt> --output-encryption-iterations=<output_encryption_iterations> --output-encryption-mode=<output_encryption_mode> --output-encryption-padding=<output_encryption_padding> --output-encryption-authentication=<output_encryption_authentication> --output-encryption-authentication-key=<output_encryption_authentication_key> --output-encryption-authentication-iv=<output_encryption_authentication_iv> --output-encryption-authentication-tag=<output_encryption_authentication_tag>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm> --output-encryption-key=<output_encryption_key> --output-encryption-iv=<output_encryption_iv> --output-encryption-salt=<output_encryption_salt> --output-encryption-iterations=<output_encryption_iterations> --output-encryption-mode=<output_encryption_mode> --output-encryption-padding=<output_encryption_padding> --output-encryption-authentication=<output_encryption_authentication> --output-encryption-authentication-key=<output_encryption_authentication_key> --output-encryption-authentication-iv=<output_encryption_authentication_iv> --output-encryption-authentication-tag=<output_encryption_authentication_tag> --output-encryption-authentication-aad=<output_encryption_authentication_aad>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm> --output-encryption-key=<output_encryption_key> --output-encryption-iv=<output_encryption_iv> --output-encryption-salt=<output_encryption_salt> --output-encryption-iterations=<output_encryption_iterations> --output-encryption-mode=<output_encryption_mode> --output-encryption-padding=<output_encryption_padding> --output-encryption-authentication=<output_encryption_authentication> --output-encryption-authentication-key=<output_encryption_authentication_key> --output-encryption-authentication-iv=<output_encryption_authentication_iv> --output-encryption-authentication-tag=<output_encryption_authentication_tag> --output-encryption-authentication-aad=<output_encryption_authentication_aad> --output-encryption-authentication-tag-length=<output_encryption_authentication_tag_length>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm> --output-encryption-key=<output_encryption_key> --output-encryption-iv=<output_encryption_iv> --output-encryption-salt=<output_encryption_salt> --output-encryption-iterations=<output_encryption_iterations> --output-encryption-mode=<output_encryption_mode> --output-encryption-padding=<output_encryption_padding> --output-encryption-authentication=<output_encryption_authentication> --output-encryption-authentication-key=<output_encryption_authentication_key> --output-encryption-authentication-iv=<output_encryption_authentication_iv> --output-encryption-authentication-tag=<output_encryption_authentication_tag> --output-encryption-authentication-aad=<output_encryption_authentication_aad> --output-encryption-authentication-tag-length=<output_encryption_authentication_tag_length> --output-encryption-authentication-tag-iv=<output_encryption_authentication_tag_iv>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm> --output-encryption-key=<output_encryption_key> --output-encryption-iv=<output_encryption_iv> --output-encryption-salt=<output_encryption_salt> --output-encryption-iterations=<output_encryption_iterations> --output-encryption-mode=<output_encryption_mode> --output-encryption-padding=<output_encryption_padding> --output-encryption-authentication=<output_encryption_authentication> --output-encryption-authentication-key=<output_encryption_authentication_key> --output-encryption-authentication-iv=<output_encryption_authentication_iv> --output-encryption-authentication-tag=<output_encryption_authentication_tag> --output-encryption-authentication-aad=<output_encryption_authentication_aad> --output-encryption-authentication-tag-length=<output_encryption_authentication_tag_length> --output-encryption-authentication-tag-iv=<output_encryption_authentication_tag_iv> --output-encryption-authentication-tag-iv-length=<output_encryption_authentication_tag_iv_length>
volatility -f <memory_dump> printkey -K <registry_key> -o <offset> --output=sqlite -D <output_directory> --output-file=<output_file> --output-format=<output_format> --output-encoding=<output_encoding> --output-compression=<output_compression> --output-compression-level=<output_compression_level> --output-encryption=<output_encryption> --output-password=<output_password> --output-encryption-algorithm=<output_encryption_algorithm> --output-encryption-key=<output_encryption_key> --output-encryption-iv=<output_encryption_iv> --output-encryption-salt=<output_encryption_salt> --output-encryption-iterations=<output_encryption_iterations> --output-encryption-mode=<output_encryption_mode> --output-encryption-padding=<output_encryption_padding> --output-encryption-authentication=<output_encryption_authentication> --output-encryption-authentication-key=<output_encryption_authentication_key> --output-encryption-authentication-iv=<output_encryption_authentication_iv> --output-encryption-authentication-tag=<output_encryption_authentication_tag> --output-encryption-authentication-aad=<output_encryption_authentication_aad> --output-encryption-authentication-tag-length=<output_encryption_authentication_tag_length> --output-encryption-authentication-tag-iv=<output_encryption_authentication_tag_iv> --output-encryption-authentication-tag-iv-length=<output_encryption_authentication_tag_iv_length> --output

volatility imageinfo -f file.dmp volatility kdbgscan -f file.dmp

#### **Unterschiede zwischen imageinfo und kdbgscan**

[**Von hier**](https://www.andreafortuna.org/2017/06/25/volatility-my-own-cheatsheet-part-1-image-identification/): Im Gegensatz zu imageinfo, das nur Profilvorschläge liefert, ist **kdbgscan** darauf ausgelegt, das richtige Profil und die richtige KDBG-Adresse (falls mehrere vorhanden sind) positiv zu identifizieren. Dieses Plugin sucht nach den mit Volatility-Profilen verknüpften KDBGHeader-Signaturen und wendet Integritätsprüfungen an, um falsche positive Ergebnisse zu reduzieren. Die Ausführlichkeit der Ausgabe und die Anzahl der durchgeführten Integritätsprüfungen hängen davon ab, ob Volatility eine DTB finden kann. Wenn Sie also bereits das richtige Profil kennen (oder wenn Sie einen Profilvorschlag von imageinfo haben), stellen Sie sicher, dass Sie es verwenden.

Werfen Sie immer einen Blick auf die **Anzahl der Prozesse, die kdbgscan gefunden hat**. Manchmal können imageinfo und kdbgscan **mehr als ein geeignetes Profil finden**, aber nur das **gültige Profil wird einige prozessbezogene Informationen enthalten** (Dies liegt daran, dass zur Extraktion von Prozessen die richtige KDBG-Adresse benötigt wird).
```bash
# GOOD
PsActiveProcessHead           : 0xfffff800011977f0 (37 processes)
PsLoadedModuleList            : 0xfffff8000119aae0 (116 modules)
# BAD
PsActiveProcessHead           : 0xfffff800011947f0 (0 processes)
PsLoadedModuleList            : 0xfffff80001197ac0 (0 modules)

KDBG

Der Kernel Debugger Block, von Volatility als KDBG bezeichnet, ist für forensische Aufgaben, die von Volatility und verschiedenen Debuggern durchgeführt werden, entscheidend. Er wird als KdDebuggerDataBlock identifiziert und hat den Typ _KDDEBUGGER_DATA64. Er enthält wichtige Verweise wie PsActiveProcessHead. Dieser spezifische Verweis zeigt auf den Anfang der Prozessliste und ermöglicht die Auflistung aller Prozesse, was für eine gründliche Speicheranalyse unerlässlich ist.

Betriebssysteminformationen

#vol3 has a plugin to give OS information (note that imageinfo from vol2 will give you OS info)
./vol.py -f file.dmp windows.info.Info

Das Plugin banners.Banners kann in vol3 verwendet werden, um Linux-Banner im Dump zu finden.

Hashes/Passwörter

Extrahiere SAM-Hashes, zwischengespeicherte Anmeldeinformationen der Domäne und lsa secrets.

./vol.py -f file.dmp windows.hashdump.Hashdump #Grab common windows hashes (SAM+SYSTEM)
./vol.py -f file.dmp windows.cachedump.Cachedump #Grab domain cache hashes inside the registry
./vol.py -f file.dmp windows.lsadump.Lsadump #Grab lsa secrets

Speicherabbild

Das Speicherabbild eines Prozesses extrahiert alles zum aktuellen Status des Prozesses. Das Modul procdump extrahiert nur den Code.

volatility -f file.dmp --profile=Win7SP1x86 memdump -p 2168 -D conhost/

RootedCON ist die relevanteste Cybersicherheitsveranstaltung in Spanien und eine der wichtigsten in Europa. Mit der Mission, technisches Wissen zu fördern, ist dieser Kongress ein brodelnder Treffpunkt für Technologie- und Cybersicherheitsprofis in jeder Disziplin.

Prozesse

Prozesse auflisten

Versuchen Sie, verdächtige Prozesse (nach Namen) oder unerwartete Kindprozesse zu finden (zum Beispiel eine cmd.exe als Kind von iexplorer.exe). Es könnte interessant sein, das Ergebnis von pslist mit dem von psscan zu vergleichen, um versteckte Prozesse zu identifizieren.

python3 vol.py -f file.dmp windows.pstree.PsTree # Get processes tree (not hidden)
python3 vol.py -f file.dmp windows.pslist.PsList # Get process list (EPROCESS)
python3 vol.py -f file.dmp windows.psscan.PsScan # Get hidden process list(malware)

Dump proc

./vol.py -f file.dmp windows.dumpfiles.DumpFiles --pid <pid> #Dump the .exe and dlls of the process in the current directory

Befehlszeile

Wurde etwas Verdächtiges ausgeführt?

python3 vol.py -f file.dmp windows.cmdline.CmdLine #Display process command-line arguments

Volatility Cheat Sheet

Volatility Installation

To install Volatility, follow these steps:

  1. Download the latest version of Volatility from the official GitHub repository: https://github.com/volatilityfoundation/volatility

  2. Extract the downloaded file to a directory of your choice.

  3. Open a terminal and navigate to the directory where you extracted Volatility.

  4. Run the command python setup.py install to install Volatility.

Basic Volatility Commands

  • volatility -f <memory_dump_file> imageinfo: This command displays information about the memory dump file, such as the operating system version and architecture.

  • volatility -f <memory_dump_file> --profile=<profile_name> pslist: This command lists all running processes in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile_name> psscan: This command scans the memory dump for hidden or terminated processes.

  • volatility -f <memory_dump_file> --profile=<profile_name> dlllist -p <process_id>: This command lists all loaded DLLs for a specific process.

  • volatility -f <memory_dump_file> --profile=<profile_name> cmdline -p <process_id>: This command displays the command line arguments for a specific process.

  • volatility -f <memory_dump_file> --profile=<profile_name> filescan: This command scans the memory dump for file objects.

  • volatility -f <memory_dump_file> --profile=<profile_name> dumpfiles -Q <file_object_address> -D <output_directory>: This command dumps a specific file from the memory dump.

Advanced Volatility Commands

  • volatility -f <memory_dump_file> --profile=<profile_name> malfind: This command scans the memory dump for injected or modified code.

  • volatility -f <memory_dump_file> --profile=<profile_name> apihooks: This command lists all API hooks in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile_name> handles -p <process_id>: This command lists all open handles for a specific process.

  • volatility -f <memory_dump_file> --profile=<profile_name> netscan: This command scans the memory dump for network connections.

  • volatility -f <memory_dump_file> --profile=<profile_name> connscan: This command scans the memory dump for TCP and UDP connections.

  • volatility -f <memory_dump_file> --profile=<profile_name> timeliner: This command creates a timeline of events based on timestamps in the memory dump.

Memory Analysis Plugins

Volatility provides a wide range of plugins for analyzing different aspects of memory dumps. Some of the most commonly used plugins include:

  • pslist: Lists all running processes.

  • psscan: Scans for hidden or terminated processes.

  • dlllist: Lists loaded DLLs for a specific process.

  • cmdline: Displays command line arguments for a specific process.

  • filescan: Scans for file objects.

  • dumpfiles: Dumps specific files from the memory dump.

  • malfind: Scans for injected or modified code.

  • apihooks: Lists API hooks.

  • handles: Lists open handles for a specific process.

  • netscan: Scans for network connections.

  • connscan: Scans for TCP and UDP connections.

  • timeliner: Creates a timeline of events based on timestamps.

Additional Resources

volatility --profile=PROFILE cmdline -f file.dmp #Display process command-line arguments
volatility --profile=PROFILE consoles -f file.dmp #command history by scanning for _CONSOLE_INFORMATION

Befehle, die in cmd.exe ausgeführt werden, werden von conhost.exe (oder csrss.exe in Systemen vor Windows 7) verwaltet. Das bedeutet, dass, wenn cmd.exe von einem Angreifer beendet wird, bevor ein Memory-Dump erhalten wird, es immer noch möglich ist, die Befehlshistorie der Sitzung aus dem Speicher von conhost.exe wiederherzustellen. Um dies zu tun, sollte bei ungewöhnlicher Aktivität innerhalb der Konsolenmodule der Speicher des zugehörigen conhost.exe-Prozesses gedumpt werden. Anschließend können durch die Suche nach Strings in diesem Dump potenziell verwendete Befehlszeilen der Sitzung extrahiert werden.

Umgebung

Erhalten Sie die Umgebungsvariablen jedes laufenden Prozesses. Es könnten einige interessante Werte vorhanden sein.

python3 vol.py -f file.dmp windows.envars.Envars [--pid <pid>] #Display process environment variables

Token-Berechtigungen

Überprüfen Sie Berechtigungstoken in unerwarteten Diensten. Es könnte interessant sein, die Prozesse aufzulisten, die ein privilegiertes Token verwenden.

#Get enabled privileges of some processes
python3 vol.py -f file.dmp windows.privileges.Privs [--pid <pid>]
#Get all processes with interesting privileges
python3 vol.py -f file.dmp windows.privileges.Privs | grep "SeImpersonatePrivilege\|SeAssignPrimaryPrivilege\|SeTcbPrivilege\|SeBackupPrivilege\|SeRestorePrivilege\|SeCreateTokenPrivilege\|SeLoadDriverPrivilege\|SeTakeOwnershipPrivilege\|SeDebugPrivilege"
#Get enabled privileges of some processes
volatility --profile=Win7SP1x86_23418 privs --pid=3152 -f file.dmp | grep Enabled
#Get all processes with interesting privileges
volatility --profile=Win7SP1x86_23418 privs -f file.dmp | grep "SeImpersonatePrivilege\|SeAssignPrimaryPrivilege\|SeTcbPrivilege\|SeBackupPrivilege\|SeRestorePrivilege\|SeCreateTokenPrivilege\|SeLoadDriverPrivilege\|SeTakeOwnershipPrivilege\|SeDebugPrivilege"

SIDs

Überprüfen Sie jede SSID, die von einem Prozess verwendet wird. Es könnte interessant sein, die Prozesse aufzulisten, die eine privilegierte SSID verwenden (und die Prozesse, die eine bestimmte Dienst-SSID verwenden).

./vol.py -f file.dmp windows.getsids.GetSIDs [--pid <pid>] #Get SIDs of processes
./vol.py -f file.dmp windows.getservicesids.GetServiceSIDs #Get the SID of services

Volatility Cheat Sheet

Volatility Installation

To install Volatility, follow these steps:

  1. Download the latest version of Volatility from the official GitHub repository: https://github.com/volatilityfoundation/volatility

  2. Extract the downloaded file to a directory of your choice.

  3. Open a terminal and navigate to the directory where you extracted Volatility.

  4. Run the command python setup.py install to install Volatility.

Basic Volatility Commands

  • volatility -f <memory_dump_file> imageinfo: This command displays information about the memory dump file, such as the profile and operating system version.

  • volatility -f <memory_dump_file> --profile=<profile> <command>: This command runs a specific Volatility command using the specified profile.

  • volatility -f <memory_dump_file> --profile=<profile> --output-file=<output_file> <command>: This command runs a specific Volatility command and saves the output to a file.

Memory Analysis

  • volatility -f <memory_dump_file> --profile=<profile> pslist: This command lists all running processes in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> psscan: This command scans for hidden processes in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> pstree: This command displays the process tree in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> dlllist -p <pid>: This command lists the DLLs loaded by a specific process.

  • volatility -f <memory_dump_file> --profile=<profile> handles -p <pid>: This command lists the handles opened by a specific process.

Network Analysis

  • volatility -f <memory_dump_file> --profile=<profile> connections: This command lists the network connections in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> connscan: This command scans for hidden network connections in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> netscan: This command scans for network artifacts in the memory dump.

File Analysis

  • volatility -f <memory_dump_file> --profile=<profile> filescan: This command scans for file objects in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> dumpfiles -Q <address_range>: This command dumps files from the memory dump based on the specified address range.

Registry Analysis

  • volatility -f <memory_dump_file> --profile=<profile> hivelist: This command lists the registry hives in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> printkey -K <key_path>: This command displays the contents of a specific registry key.

Malware Analysis

  • volatility -f <memory_dump_file> --profile=<profile> malfind: This command scans for injected code and suspicious processes in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> malprocfind: This command scans for malicious processes in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> malsysproc: This command lists the system processes associated with malware in the memory dump.

Plugin Usage

  • volatility -f <memory_dump_file> --profile=<profile> --plugins=<plugin_directory> <plugin_name>: This command runs a specific Volatility plugin using the specified profile and plugin directory.

Additional Resources

References

volatility --profile=Win7SP1x86_23418 getsids -f file.dmp #Get the SID owned by each process
volatility --profile=Win7SP1x86_23418 getservicesids -f file.dmp #Get the SID of each service

Handles

Nützlich zu wissen, zu welchen anderen Dateien, Schlüsseln, Threads, Prozessen... ein Prozess einen Handle hat (geöffnet hat)

vol.py -f file.dmp windows.handles.Handles [--pid <pid>]

Volatility Cheat Sheet

Introduction

This cheat sheet provides a quick reference guide for using Volatility, a popular open-source memory forensics framework. It includes commands and techniques for analyzing memory dumps to extract valuable information during forensic investigations.

Installation

To install Volatility, follow these steps:

  1. Install Python 2.7 or Python 3.x.

  2. Install the required dependencies using pip: pip install -r requirements.txt.

  3. Download the latest release of Volatility from the official GitHub repository: git clone https://github.com/volatilityfoundation/volatility.git.

  4. Navigate to the Volatility directory: cd volatility.

  5. Run Volatility using the command python vol.py.

Basic Usage

To analyze a memory dump with Volatility, use the following command:

python vol.py -f <memory_dump> <plugin_name>

Replace <memory_dump> with the path to the memory dump file and <plugin_name> with the name of the plugin you want to use for analysis.

Common Plugins

Here are some commonly used plugins in Volatility:

  • pslist: Lists running processes.

  • pstree: Displays a process tree.

  • dlllist: Lists loaded DLLs.

  • handles: Lists open handles.

  • cmdline: Displays command-line arguments.

  • filescan: Scans for file objects in memory.

  • malfind: Finds hidden and injected code.

  • svcscan: Lists Windows services.

  • connscan: Scans for network connections.

  • netscan: Lists network connections.

  • printkey: Prints registry keys.

  • hivelist: Lists registry hives.

Advanced Techniques

Volatility also supports advanced techniques for memory analysis, such as:

  • Process Memory Analysis: Analyzing the memory of a specific process.

  • Kernel Memory Analysis: Analyzing the kernel memory.

  • Network Analysis: Analyzing network connections and traffic.

  • Registry Analysis: Analyzing the Windows registry.

  • Malware Analysis: Analyzing malware artifacts in memory.

Additional Resources

For more information on using Volatility and memory forensics, refer to the following resources:

Happy memory analysis!

volatility --profile=Win7SP1x86_23418 -f file.dmp handles [--pid=<pid>]

DLLs

./vol.py -f file.dmp windows.dlllist.DllList [--pid <pid>] #List dlls used by each
./vol.py -f file.dmp windows.dumpfiles.DumpFiles --pid <pid> #Dump the .exe and dlls of the process in the current directory process

Strings pro Prozess

Volatility ermöglicht es uns zu überprüfen, welchem Prozess eine Zeichenkette gehört.

strings file.dmp > /tmp/strings.txt
./vol.py -f /tmp/file.dmp windows.strings.Strings --strings-file /tmp/strings.txt

Es ermöglicht auch die Suche nach Zeichenketten innerhalb eines Prozesses mithilfe des yarascan-Moduls:

./vol.py -f file.dmp windows.vadyarascan.VadYaraScan --yara-rules "https://" --pid 3692 3840 3976 3312 3084 2784
./vol.py -f file.dmp yarascan.YaraScan --yara-rules "https://"

UserAssist

Windows speichert Informationen über die von Ihnen ausgeführten Programme mithilfe eines Features namens UserAssist-Schlüssel in der Registrierung. Diese Schlüssel protokollieren, wie oft jedes Programm ausgeführt wurde und wann es zuletzt ausgeführt wurde.

./vol.py -f file.dmp windows.registry.userassist.UserAssist
volatility --profile=Win7SP1x86_23418 -f file.dmp userassist

​​​​RootedCON ist die relevanteste Cybersicherheitsveranstaltung in Spanien und eine der wichtigsten in Europa. Mit dem Ziel, technisches Wissen zu fördern, ist dieser Kongress ein brodelnder Treffpunkt für Technologie- und Cybersicherheitsprofis in jeder Disziplin.

Dienstleistungen

./vol.py -f file.dmp windows.svcscan.SvcScan #List services
./vol.py -f file.dmp windows.getservicesids.GetServiceSIDs #Get the SID of services

Autoruns

Laden Sie es von https://github.com/tomchop/volatility-autoruns herunter

volatility --plugins=volatility-autoruns/ --profile=WinXPSP2x86 -f file.dmp autoruns

Mutexe

./vol.py -f file.dmp windows.mutantscan.MutantScan
./vol.py -f file.dmp windows.symlinkscan.SymlinkScan

Volatility Cheat Sheet

Volatility Installation

To install Volatility, follow these steps:

  1. Download the latest version of Volatility from the official GitHub repository: https://github.com/volatilityfoundation/volatility

  2. Extract the downloaded file to a directory of your choice.

  3. Open a terminal and navigate to the directory where you extracted Volatility.

  4. Run the command python setup.py install to install Volatility.

Basic Volatility Commands

  • volatility -f <memory_dump_file> imageinfo: This command displays information about the memory dump file, such as the profile and the operating system version.

  • volatility -f <memory_dump_file> --profile=<profile> <command>: This command runs a specific Volatility command using the specified profile.

  • volatility -f <memory_dump_file> --profile=<profile> --output-file=<output_file> <command>: This command runs a specific Volatility command and saves the output to a file.

Memory Analysis

  • volatility -f <memory_dump_file> --profile=<profile> pslist: This command lists all running processes in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> psscan: This command scans for hidden or terminated processes in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> pstree: This command displays the process tree in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> dlllist -p <pid>: This command lists the loaded DLLs for a specific process.

  • volatility -f <memory_dump_file> --profile=<profile> handles -p <pid>: This command lists the open handles for a specific process.

Network Analysis

  • volatility -f <memory_dump_file> --profile=<profile> connections: This command lists the network connections in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> connscan: This command scans for hidden or terminated network connections in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> netscan: This command scans for network artifacts in the memory dump.

File Analysis

  • volatility -f <memory_dump_file> --profile=<profile> filescan: This command scans for file objects in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> dumpfiles -Q <address_range>: This command dumps files from the memory dump based on the specified address range.

Registry Analysis

  • volatility -f <memory_dump_file> --profile=<profile> hivelist: This command lists the registry hives in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> printkey -K <key_path>: This command prints the values and subkeys of a specific registry key.

Malware Analysis

  • volatility -f <memory_dump_file> --profile=<profile> malfind: This command scans for injected or hidden code in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile> malprocfind: This command scans for processes associated with known malware in the memory dump.

Plugin Usage

  • volatility -f <memory_dump_file> --profile=<profile> --plugins=<plugin_directory> <plugin_name>: This command runs a specific Volatility plugin using the specified profile and plugin directory.

Additional Resources

volatility --profile=Win7SP1x86_23418 -f file.dmp symlinkscan

Bash

Es ist möglich, die Bash-History aus dem Speicher auszulesen. Sie könnten auch die Datei .bash_history dumpen, aber wenn sie deaktiviert wurde, werden Sie froh sein, dass Sie dieses Volatility-Modul verwenden können.

./vol.py -f file.dmp linux.bash.Bash

Volatility Cheat Sheet

Dieses Cheat Sheet enthält eine Liste der häufig verwendeten Volatility-Befehle und deren Verwendung.

Volatility-Befehle

Allgemeine Befehle

  • volatility -f <dumpfile> imageinfo: Zeigt Informationen über das Speicherabbild an.

  • volatility -f <dumpfile> --profile=<profile> <command>: Führt einen Befehl unter Verwendung eines bestimmten Profils aus.

  • volatility -f <dumpfile> --profile=<profile> --output-file=<outputfile> <command>: Speichert die Ausgabe eines Befehls in einer Datei.

Prozesse und Threads

  • volatility -f <dumpfile> --profile=<profile> pslist: Listet alle aktiven Prozesse auf.

  • volatility -f <dumpfile> --profile=<profile> psscan: Scannt den Speicher nach Prozessen.

  • volatility -f <dumpfile> --profile=<profile> pstree: Zeigt die Prozesshierarchie an.

  • volatility -f <dumpfile> --profile=<profile> psxview: Zeigt versteckte Prozesse an.

  • volatility -f <dumpfile> --profile=<profile> threads: Listet alle Threads auf.

Netzwerk

  • volatility -f <dumpfile> --profile=<profile> connections: Zeigt aktive Netzwerkverbindungen an.

  • volatility -f <dumpfile> --profile=<profile> connscan: Scannt den Speicher nach Netzwerkverbindungen.

  • volatility -f <dumpfile> --profile=<profile> sockets: Zeigt offene Sockets an.

Dateisystem

  • volatility -f <dumpfile> --profile=<profile> filescan: Scannt den Speicher nach Dateien.

  • volatility -f <dumpfile> --profile=<profile> mftparser: Analysiert die Master File Table (MFT).

  • volatility -f <dumpfile> --profile=<profile> mftparser --output=csv --output-file=<outputfile>: Speichert die MFT-Analyseergebnisse in einer CSV-Datei.

  • volatility -f <dumpfile> --profile=<profile> filescan | grep -i <keyword>: Sucht nach Dateien, die ein bestimmtes Schlüsselwort enthalten.

Registry

  • volatility -f <dumpfile> --profile=<profile> hivelist: Listet die geladenen Registrierungshives auf.

  • volatility -f <dumpfile> --profile=<profile> printkey -K <key>: Zeigt den Inhalt eines bestimmten Registrierungsschlüssels an.

  • volatility -f <dumpfile> --profile=<profile> printkey -K <key> --output-file=<outputfile>: Speichert den Inhalt eines bestimmten Registrierungsschlüssels in einer Datei.

Benutzer und Anmeldeinformationen

  • volatility -f <dumpfile> --profile=<profile> hivescan: Scannt den Speicher nach Registrierungshives.

  • volatility -f <dumpfile> --profile=<profile> hashdump: Dumpert die Passwort-Hashes.

  • volatility -f <dumpfile> --profile=<profile> hashdump --output-file=<outputfile>: Speichert die Passwort-Hashes in einer Datei.

  • volatility -f <dumpfile> --profile=<profile> getsids: Zeigt die Sicherheits-IDs (SIDs) der Benutzer an.

DLLs und Treiber

  • volatility -f <dumpfile> --profile=<profile> dlllist: Listet alle geladenen DLLs auf.

  • volatility -f <dumpfile> --profile=<profile> driverirp: Zeigt Informationen über die Treiber-IRPs an.

Systeminformationen

  • volatility -f <dumpfile> --profile=<profile> getservicesids: Zeigt die Sicherheits-IDs (SIDs) der Dienste an.

  • volatility -f <dumpfile> --profile=<profile> getsids: Zeigt die Sicherheits-IDs (SIDs) der Benutzer an.

  • volatility -f <dumpfile> --profile=<profile> getsids -U: Zeigt die Sicherheits-IDs (SIDs) der Benutzer und Gruppen an.

  • volatility -f <dumpfile> --profile=<profile> getsids -G: Zeigt die Sicherheits-IDs (SIDs) der Gruppen an.

Weitere Ressourcen

volatility --profile=Win7SP1x86_23418 -f file.dmp linux_bash

Zeitachse

./vol.py -f file.dmp timeLiner.TimeLiner

Volatility Cheat Sheet

Volatility Installation

To install Volatility, follow these steps:

  1. Download the latest version of Volatility from the official GitHub repository: https://github.com/volatilityfoundation/volatility

  2. Extract the downloaded file to a directory of your choice.

  3. Open a terminal and navigate to the directory where you extracted Volatility.

  4. Run the command python setup.py install to install Volatility.

Basic Volatility Commands

  • volatility -f <memory_dump_file> imageinfo: This command displays information about the memory dump file, such as the operating system version and architecture.

  • volatility -f <memory_dump_file> --profile=<profile_name> pslist: This command lists all running processes in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile_name> psscan: This command scans the memory dump for hidden or terminated processes.

  • volatility -f <memory_dump_file> --profile=<profile_name> dlllist -p <process_id>: This command lists all loaded DLLs for a specific process.

  • volatility -f <memory_dump_file> --profile=<profile_name> cmdline -p <process_id>: This command displays the command line arguments for a specific process.

  • volatility -f <memory_dump_file> --profile=<profile_name> filescan: This command scans the memory dump for file objects.

  • volatility -f <memory_dump_file> --profile=<profile_name> dumpfiles -Q <file_object_address> -D <output_directory>: This command dumps a specific file from the memory dump.

Advanced Volatility Commands

  • volatility -f <memory_dump_file> --profile=<profile_name> malfind: This command scans the memory dump for injected or modified code.

  • volatility -f <memory_dump_file> --profile=<profile_name> apihooks: This command lists all API hooks in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile_name> handles -p <process_id>: This command lists all open handles for a specific process.

  • volatility -f <memory_dump_file> --profile=<profile_name> netscan: This command scans the memory dump for network connections.

  • volatility -f <memory_dump_file> --profile=<profile_name> connscan: This command scans the memory dump for TCP and UDP connections.

  • volatility -f <memory_dump_file> --profile=<profile_name> timeliner: This command creates a timeline of events based on timestamps in the memory dump.

Memory Analysis Plugins

Volatility provides a wide range of plugins for analyzing different aspects of memory dumps. Some of the most commonly used plugins include:

  • pslist: Lists all running processes.

  • psscan: Scans for hidden or terminated processes.

  • dlllist: Lists loaded DLLs for a specific process.

  • cmdline: Displays command line arguments for a specific process.

  • filescan: Scans for file objects.

  • dumpfiles: Dumps specific files from the memory dump.

  • malfind: Scans for injected or modified code.

  • apihooks: Lists API hooks.

  • handles: Lists open handles for a specific process.

  • netscan: Scans for network connections.

  • connscan: Scans for TCP and UDP connections.

  • timeliner: Creates a timeline of events based on timestamps.

Additional Resources

volatility --profile=Win7SP1x86_23418 -f timeliner

Treiber

./vol.py -f file.dmp windows.driverscan.DriverScan

Volatility Cheat Sheet

Volatility Installation

To install Volatility, follow these steps:

  1. Download the latest version of Volatility from the official GitHub repository: https://github.com/volatilityfoundation/volatility

  2. Extract the downloaded file to a directory of your choice.

  3. Open a terminal and navigate to the directory where you extracted Volatility.

  4. Run the command python setup.py install to install Volatility.

Basic Volatility Commands

  • volatility -f <memory_dump_file> imageinfo: This command displays information about the memory dump file, such as the operating system version and architecture.

  • volatility -f <memory_dump_file> --profile=<profile_name> pslist: This command lists all running processes in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile_name> psscan: This command scans the memory dump for hidden or terminated processes.

  • volatility -f <memory_dump_file> --profile=<profile_name> dlllist -p <process_id>: This command lists all loaded DLLs for a specific process.

  • volatility -f <memory_dump_file> --profile=<profile_name> cmdline -p <process_id>: This command displays the command line arguments for a specific process.

  • volatility -f <memory_dump_file> --profile=<profile_name> filescan: This command scans the memory dump for file objects.

  • volatility -f <memory_dump_file> --profile=<profile_name> dumpfiles -Q <file_object_address> -D <output_directory>: This command dumps a specific file from the memory dump.

Advanced Volatility Commands

  • volatility -f <memory_dump_file> --profile=<profile_name> malfind: This command scans the memory dump for injected or modified code.

  • volatility -f <memory_dump_file> --profile=<profile_name> apihooks: This command lists all API hooks in the memory dump.

  • volatility -f <memory_dump_file> --profile=<profile_name> handles -p <process_id>: This command lists all open handles for a specific process.

  • volatility -f <memory_dump_file> --profile=<profile_name> netscan: This command scans the memory dump for network connections.

  • volatility -f <memory_dump_file> --profile=<profile_name> connscan: This command scans the memory dump for TCP and UDP connections.

  • volatility -f <memory_dump_file> --profile=<profile_name> timeliner: This command creates a timeline of events based on timestamps in the memory dump.

Additional Resources

References

volatility --profile=Win7SP1x86_23418 -f file.dmp driverscan

Zwischenablage abrufen

#Just vol2
volatility --profile=Win7SP1x86_23418 clipboard -f file.dmp

IE-Verlauf abrufen

Um den Internet Explorer-Verlauf abzurufen, können Sie den folgenden Befehl verwenden:

volatility -f <memory_dump> iehistory

Ersetzen Sie <memory_dump> durch den Pfad zur Speicherabbilddatei, die Sie analysieren möchten.

Dieser Befehl extrahiert den Verlauf des Internet Explorers aus dem Speicherabbild und zeigt Informationen wie besuchte URLs, Titel der besuchten Seiten, Zeitstempel und andere relevante Daten an.

#Just vol2
volatility --profile=Win7SP1x86_23418 iehistory -f file.dmp

Notizbuchtext abrufen

volatility -f <memory_dump> notepad

Dieser Befehl extrahiert den Text, der in der Anwendung Notepad im Speicherdump gespeichert ist.

#Just vol2
volatility --profile=Win7SP1x86_23418 notepad -f file.dmp

Screenshot

#Just vol2
volatility --profile=Win7SP1x86_23418 screenshot -f file.dmp

Master Boot Record (MBR)

Der Master Boot Record (MBR) ist ein spezieller Bereich auf einer Festplatte, der Informationen über die Partitionierung und das Starten des Betriebssystems enthält. Er befindet sich im ersten Sektor der Festplatte und besteht aus einem Bootloader und einer Partitionstabelle.

Analyse des MBR

Um den MBR zu analysieren, können Sie die folgenden Volatility-Befehle verwenden:

  • mbrparser: Dieser Befehl analysiert den MBR und gibt Informationen über die Partitionstabelle und den Bootloader aus.

Beispiel:

volatility -f memory_dump.raw mbrparser

Verdächtige Aktivitäten im MBR

Einige verdächtige Aktivitäten im MBR können auf eine Malware-Infektion oder eine Manipulation hinweisen. Hier sind einige Anzeichen für verdächtige Aktivitäten:

  • Änderungen in der Partitionstabelle: Wenn sich die Partitionstabelle plötzlich ändert oder unbekannte Partitionen hinzugefügt werden, kann dies auf eine Malware-Infektion hinweisen.

  • Modifizierter Bootloader: Wenn der Bootloader im MBR verändert wurde, kann dies darauf hindeuten, dass ein Angreifer versucht hat, das Betriebssystem zu manipulieren oder eine Hintertür einzurichten.

  • Bootkit-Infektion: Ein Bootkit ist eine Art von Malware, die den Bootloader infiziert und es Angreifern ermöglicht, Kontrolle über das System zu erlangen. Wenn verdächtige Aktivitäten im MBR festgestellt werden, sollten Sie nach Anzeichen für eine Bootkit-Infektion suchen.

Gegenmaßnahmen

Um den MBR vor Angriffen zu schützen, können Sie die folgenden Maßnahmen ergreifen:

  • Aktualisieren Sie Ihr Betriebssystem und Ihre Sicherheitssoftware regelmäßig, um bekannte Schwachstellen zu beheben.

  • Verwenden Sie eine zuverlässige Antivirensoftware, um Malware-Infektionen zu erkennen und zu entfernen.

  • Seien Sie vorsichtig beim Herunterladen und Öffnen von Dateien aus unsicheren Quellen.

  • Überprüfen Sie regelmäßig den MBR auf verdächtige Aktivitäten und führen Sie gegebenenfalls eine forensische Analyse durch.

Fazit

Die Analyse des MBR kann wichtige Informationen über die Partitionierung und das Starten des Betriebssystems liefern. Durch die Überwachung und Untersuchung verdächtiger Aktivitäten im MBR können Sie potenzielle Bedrohungen erkennen und geeignete Gegenmaßnahmen ergreifen, um Ihr System zu schützen.

volatility --profile=Win7SP1x86_23418 mbrparser -f file.dmp

Der Master Boot Record (MBR) spielt eine entscheidende Rolle bei der Verwaltung der logischen Partitionen eines Speichermediums, die mit unterschiedlichen Dateisystemen strukturiert sind. Er enthält nicht nur Informationen zur Partitionslayout, sondern enthält auch ausführbaren Code, der als Bootloader fungiert. Dieser Bootloader initiiert entweder direkt den OS-Zweistufen-Ladevorgang (siehe Zweistufiger Bootloader) oder arbeitet in Harmonie mit dem Volume Boot Record (VBR) jeder Partition. Für vertiefte Kenntnisse siehe die MBR Wikipedia-Seite.

Referenzen

RootedCON ist die relevanteste Cybersicherheitsveranstaltung in Spanien und eine der wichtigsten in Europa. Mit der Mission, technisches Wissen zu fördern, ist dieser Kongress ein brodelnder Treffpunkt für Technologie- und Cybersicherheitsprofis in jeder Disziplin.

Lernen Sie AWS-Hacking von Grund auf mit htARTE (HackTricks AWS Red Team Expert)!

Andere Möglichkeiten, HackTricks zu unterstützen:

Last updated