> For the complete documentation index, see [llms.txt](https://dika-maulidal.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dika-maulidal.gitbook.io/home/digital-forensics/memory-forensics/volatility3.md).

# Volatility3

## Volatility 3 - Windows Memory Forensics Cheatsheet

Volatility 3 adalah framework standar industri untuk analisis **memory dump (RAM)**.\
Versi ini tidak lagi menggunakan *profile*, melainkan **symbol otomatis (ISF)**.

### Metadata & Overview

| Detail             | Deskripsi                                                            |
| ------------------ | -------------------------------------------------------------------- |
| **Kategori**       | Memory Forensics                                                     |
| **Supported OS**   | Windows, Linux, macOS                                                |
| **Input Files**    | `.raw`, `.mem`, `.dmp`, `.vmem`, `.aff4`                             |
| **Forensic Value** | Fileless malware, code injection, credential theft, network artifact |

### System Identification

{% tabs %}
{% tab title="Command" %}

#### windows.info

```bash
python3 vol.py -f <memory.raw> windows.info
```

{% endtab %}

{% tab title="Explain" %}
Menampilkan informasi dasar sistem:

* OS Version
* Kernel Base Address
* Architecture
* Build Number

{% hint style="info" %}
Wajib dijalankan pertama. Jika gagal, plugin lain biasanya ikut gagal karena simbol tidak cocok.
{% endhint %}
{% endtab %}
{% endtabs %}

### Process Enumeration

{% tabs %}
{% tab title="Command" %}

#### windows.pslist

```bash
python3 vol.py -f <memory.raw> windows.pslist
```

Filter PID:

```bash
python3 vol.py -f <memory.raw> windows.pslist --pid 1234
```

{% endtab %}

{% tab title="Explain" %}
Menampilkan proses aktif berdasarkan kernel linked list.

{% hint style="info" %}
Bandingkan dengan `psscan`.\
Proses yang tidak muncul di `pslist` tapi ada di `psscan` → indikasi proses tersembunyi.
{% endhint %}
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Command" %}

#### windows.pstree

```bash
python3 vol.py -f <memory.raw> windows.pstree
```

Filter PID:

```bash
python3 vol.py -f <memory.raw> windows.pstree --pid 1234
```

{% endtab %}

{% tab title="Explain" %}
Menampilkan hubungan Parent–Child process.

{% hint style="warning" %}
Red flag:

* `cmd.exe` / `powershell.exe` child dari `winword.exe`
* `lsass.exe` bukan child `wininit.exe`
  {% endhint %}
  {% endtab %}
  {% endtabs %}

{% tabs %}
{% tab title="Command" %}

#### windows.psscan

```bash
python3 vol.py -f <memory.raw> windows.psscan
```

{% endtab %}

{% tab title="Explain" %}
Melakukan scan struktur `_EPROCESS` di seluruh RAM.

{% hint style="danger" %}
Proses hanya muncul di `psscan` → indikasi rootkit / DKOM.
{% endhint %}
{% endtab %}
{% endtabs %}

### Command Line & Privilege

{% tabs %}
{% tab title="Command" %}

#### windows.cmdline

```bash
python3 vol.py -f <memory.raw> windows.cmdline
```

{% endtab %}

{% tab title="Explain" %}
Menampilkan argumen command line tiap proses.

{% hint style="danger" %}
Cari:

* `powershell -enc`
* `cmd /c`
* `rundll32`
* `net user`
  {% endhint %}
  {% endtab %}
  {% endtabs %}

{% tabs %}
{% tab title="Command" %}

#### windows.handles

```bash
python3 vol.py -f <memory.raw> windows.handles
```

Filter PID:

```bash
python3 vol.py -f <memory.raw> windows.handles --pid 1234
```

{% endtab %}

{% tab title="Explain" %}
Menampilkan handle ke file, registry, mutex, dan proses lain.

{% hint style="info" %}
Proses non-system punya handle ke `lsass.exe` → credential access.
{% endhint %}
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Command" %}

#### windows.getsids

```bash
python3 vol.py -f <memory.raw> windows.getsids
```

{% endtab %}

{% tab title="Explain" %}
Menampilkan SID dan privilege token.

{% hint style="warning" %}
Cari privilege tinggi seperti `SeDebugPrivilege`.
{% endhint %}
{% endtab %}
{% endtabs %}

### Network Forensics

{% tabs %}
{% tab title="Command" %}

#### windows.netscan

```bash
python3 vol.py -f <memory.raw> windows.netscan
```

{% endtab %}

{% tab title="Explain" %}
Memindai koneksi TCP/UDP aktif dan closed.

{% hint style="danger" %}
Red flag:

* Port C2 (4444, 1337, 8080)
* Proses sistem melakukan koneksi keluar
  {% endhint %}
  {% endtab %}
  {% endtabs %}

{% tabs %}
{% tab title="Command" %}

#### windows.netstat

```bash
python3 vol.py -f <memory.raw> windows.netstat
```

{% endtab %}

{% tab title="Explain" %}
Melihat socket aktif berbasis netstat.

{% hint style="info" %}
Gunakan sebagai pelengkap `netscan`.
{% endhint %}
{% endtab %}
{% endtabs %}

### Registry Forensics (Memory-Based)

{% tabs %}
{% tab title="Command" %}

#### windows.registry.hivelist

```bash
python3 vol.py -f <memory.raw> windows.registry.hivelist
```

{% endtab %}

{% tab title="Explain" %}
Menampilkan registry hive yang ter-link secara normal oleh sistem.

{% hint style="info" %}
Hive umum:

* SYSTEM
* SOFTWARE
* SAM
* SECURITY
* NTUSER.DAT
*

{% endhint %}
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Command" %}

#### windows.registry.hivescan

```bash
python3 vol.py -f <memory.raw> windows.registry.hivescan
```

{% endtab %}

{% tab title="Explain" %}
Melakukan scan fisik terhadap struktur registry hive di RAM.

{% hint style="danger" %}
Hive yang muncul di `hivescan` tapi tidak di `hivelist` → indikasi registry disembunyikan atau dimanipulasi malware.
{% endhint %}
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Command" %}

#### windows.registry.printkey

```bash
python3 vol.py -f <memory.raw> windows.registry.printkey \
--key "HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run"
```

{% endtab %}

{% tab title="Explain" %}
Membaca key dan value registry langsung dari RAM.

{% hint style="warning" %}
Key penting untuk dicek:

* Run / RunOnce
* Services
* Image File Execution Options
* Winlogon
  {% endhint %}
  {% endtab %}
  {% endtabs %}

### DLL & Module Analysis

{% tabs %}
{% tab title="Command" %}

#### windows.dlllist

```bash
python3 vol.py -f <memory.raw> windows.dlllist --pid 1234
```

{% endtab %}

{% tab title="Explain" %}
Menampilkan DLL yang dimuat proses tertentu.

{% hint style="warning" %}
DLL dari `%TEMP%` atau `%APPDATA%` patut dicurigai.
{% endhint %}
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Command" %}

#### windows.ldrmodules

```bash
python3 vol.py -f <memory.raw> windows.ldrmodules --pid 1234
```

{% endtab %}

{% tab title="Explain" %}
Mendeteksi DLL yang tidak terdaftar di load order.

{% hint style="danger" %}
Exclude:

* System32
* SysWOW64
* WinSxS
  {% endhint %}
  {% endtab %}
  {% endtabs %}

### Kernel Modules & Driver Analysis

{% tabs %}
{% tab title="Command" %}

#### windows.modules

```bash
python3 vol.py -f <memory.raw> windows.modules
```

{% endtab %}

{% tab title="Explain" %}
Menampilkan kernel module yang terdaftar melalui linked list kernel.

{% hint style="info" %}
Module normal biasanya berada di:

* System32\drivers
  {% endhint %}
  {% endtab %}
  {% endtabs %}

{% tabs %}
{% tab title="Command" %}

#### windows.modscan

```bash
python3 vol.py -f <memory.raw> windows.modscan
```

{% endtab %}

{% tab title="Explain" %}
Melakukan scan mentah terhadap struktur kernel module di RAM.

{% hint style="danger" %}
Module yang muncul di `modscan` tapi tidak di `modules` → indikasi kernel rootkit atau driver tersembunyi.
{% endhint %}
{% endtab %}
{% endtabs %}

### Process Memory Analysis

{% tabs %}
{% tab title="Command" %}

#### windows.memmap

```bash
python3 vol.py -f <memory.raw> windows.memmap --pid 1234
```

{% endtab %}

{% tab title="Explain" %}
Menampilkan peta memori proses beserta permission setiap region.

{% hint style="info" %}
Kolom penting:

* Protection
* Base Address
* Size
  {% endhint %}

{% hint style="warning" %}
Region dengan permission:

* PAGE\_EXECUTE\_READWRITE (RWX) → sangat jarang pada aplikasi normal.
  {% endhint %}
  {% endtab %}
  {% endtabs %}

### Malware Detection

{% tabs %}
{% tab title="Command" %}

#### windows.malfind

```bash
python3 vol.py -f <memory.raw> windows.malfind
```

{% endtab %}

{% tab title="Explain" %}
Mendeteksi region memori dengan izin RWX.

{% hint style="danger" %}
Cari signature `4D 5A` (MZ Header) → executable tersembunyi.
{% endhint %}
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Command" %}

#### windows.ssdt

```bash
python3 vol.py -f <memory.raw> windows.ssdt
```

{% endtab %}

{% tab title="Explain" %}
Mendeteksi SSDT hook (kernel rootkit).

{% hint style="warning" %}
Exclude:

* ntoskrnl.exe
* win32k.sys
  {% endhint %}
  {% endtab %}
  {% endtabs %}

### File & Memory Extraction

{% tabs %}
{% tab title="Command" %}

#### windows.filescan

```bash
python3 vol.py -f <memory.raw> windows.filescan
```

{% endtab %}

{% tab title="Explain" %}
Menemukan file object di RAM.

{% hint style="info" %}
Gunakan offset hasil filescan untuk dumpfiles.
{% endhint %}
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Command" %}

#### windows.dumpfiles

```bash
python3 vol.py -f <memory.raw> windows.dumpfiles --pid 1234 --dump
```

{% endtab %}

{% tab title="Explain" %}
Mengekstrak file dari memori.

{% hint style="danger" %}
Sering dipakai untuk payload fileless malware.
{% endhint %}
{% endtab %}
{% endtabs %}

### YARA Hunting

{% tabs %}
{% tab title="Command" %}

#### windows.vadyarascan

```bash
python3 vol.py -f <memory.raw> windows.vadyarascan --yara-file rule.yar
```

{% endtab %}

{% tab title="Explain" %}
Scan YARA berbasis VAD (Virtual Address Descriptor).

{% hint style="info" %}
Lebih presisi untuk shellcode dan injected payload.
{% endhint %}
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Command" %}

#### windows.yara.YaraScan

```bash
python3 vol.py -f <memory.raw> windows.yara.YaraScan --yara-file rule.yar
```

{% endtab %}

{% tab title="Explain" %}
Full memory YARA scan.

{% hint style="warning" %}
Lebih lambat tapi cakupan lebih luas.
{% endhint %}
{% endtab %}
{% endtabs %}
