> 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/writeups-and-walkthroughs/tryhackme-thm/memory-forensics-writeup.md).

# Memory Forensics Writeup

Perform memory forensics to find the flags

<figure><img src="https://tryhackme-images.s3.amazonaws.com/room-icons/2f9dce95cf880c6d070d4a7ac92d4cfb.png" alt="" width="188"><figcaption></figcaption></figure>

{% embed url="<https://tryhackme.com/room/memoryforensics>" %}

## Task 2: Login

#### What is John's password?

Sebelum menjalankan modul forensik, kami harus mengidentifikasi profil OS yang benar.

```shellscript
./volatility_2.6_win64_standalone.exe -f Snapshot6_1609157562389.vmem imageinfo
```

<figure><img src="https://3379135436-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pfT5vR8uE4ISAa7XuPV%2Fuploads%2FF6tknm8eVXKDCqIq9hQI%2F1.%20memory.png?alt=media&amp;token=54934fc4-4d62-4d42-8307-c80ab3b9a6c0" alt=""><figcaption></figcaption></figure>

**Profil yang Dipilih:** `Win7SP1x64`

Menggunakan modul `hashdump` untuk mengekstrak *hash* kredensial dari *Registry* SAM *hive* di memori. Kami mem-*filter* *output* untuk mencari *hash* pengguna 'John'.

```shellscript
./volatility_2.6_win64_standalone.exe -f Snapshot6_1609157562389.vmem --profile=Win7SP1x64 hashdu
```

<figure><img src="https://3379135436-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pfT5vR8uE4ISAa7XuPV%2Fuploads%2F3hJs2rAdMnMcamTeQTBO%2F2.%20memory.png?alt=media&amp;token=b8e58686-7d4f-42f7-b14b-1a7718ff5974" alt=""><figcaption></figcaption></figure>

**Hash NTLM John:** `47fbd6536d7868c873d5ea455f2fc0c9 (`disimpan ke `john_hash.txt)`

Memecahkan *hash* NTLM menggunakan *tool* John the Ripper (dengan format `NT`) dan *wordlist* `rockyou.txt`.

```shellscript
john --format=NT --wordlist=/usr/share/wordlists/rockyou.txt john_hash.txt
```

<figure><img src="https://3379135436-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pfT5vR8uE4ISAa7XuPV%2Fuploads%2FHAw2LUVbk92ky3dgAYoM%2F3.%20memory.png?alt=media&amp;token=7497b98b-8adc-4a32-a6f2-aa1d58583754" alt=""><figcaption></figcaption></figure>

```
John's password is: charmander999
```

## Task 3: Analysis

#### 3.1 When was the machine last shutdown?

Sebelum menjalankan modul forensik, kami harus mengidentifikasi profil OS yang benar.

```shellscript
./volatility_2.6_win64_standalone.exe -f Snapshot19_1609159453792.vmem imageinfo
```

<figure><img src="https://3379135436-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pfT5vR8uE4ISAa7XuPV%2Fuploads%2FGDM9C859ZXWcu2rTzmQg%2F1.%20vol.png?alt=media&amp;token=e2d308cf-2254-4991-a3bf-07d80acb001e" alt=""><figcaption></figcaption></figure>

**Profil yang Dipilih**: `Win7SP1x64`

Menggunakan plugin `shutdowntime` untuk mengekstrak informasi waktu dari *Registry System hive* di memori. Kami akan menampilkan *timestamp* yang berhubungan dengan waktu *shutdown* terakhir yang tercatat oleh sistem operasi.

```shellscript
./volatility_2.6_win64_standalone.exe -f Snapshot19_1609159453792.vmem --profile=Win7SP1x64 shutdowntime
```

<figure><img src="https://3379135436-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pfT5vR8uE4ISAa7XuPV%2Fuploads%2F13Igeav3yFMEpHab6z5t%2F2.%20vol.png?alt=media&amp;token=15daa694-f1b3-497f-9970-7419834db736" alt=""><figcaption></figcaption></figure>

```
2020-12-27 22:50:12
```

#### 3.2 What did John write?

Menggunakan plugin `consoles` untuk mengekstrak riwayat *output* layar dan *command* dari sesi konsol (CMD/PowerShell) yang masih ada di memori.

```shellscript
./volatility_2.6_win64_standalone.exe -f Snapshot19_1609159453792.vmem --profile=Win7SP1x64 consoles
```

<figure><img src="https://3379135436-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pfT5vR8uE4ISAa7XuPV%2Fuploads%2FA1785wEGZ6t7yrADXwoa%2F3.%20vol.png?alt=media&amp;token=e31a3975-5a6a-4889-a7e4-2abf727e9769" alt=""><figcaption></figcaption></figure>

```
You_found_me
```

## Task 4: TrueCrypt

#### What is the TrueCrypt passphrase?

Sebelum menjalankan modul forensik, kami harus mengidentifikasi profil OS yang benar.

```shellscript
./volatility_2.6_win64_standalone.exe -f Snapshot14_1609164553061.vmem imageinfo
```

<figure><img src="https://3379135436-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pfT5vR8uE4ISAa7XuPV%2Fuploads%2FgWdShpTT4p1RStvxcKTi%2F4.%20vol.png?alt=media&amp;token=94662907-0d1f-40e3-89b5-8f9578c79b0c" alt=""><figcaption></figcaption></figure>

**Profil yang Dipilih**: `Win7SP1x64`

Menggunakan plugin `truecryptprhase` untuk menemukan dan mengekstrak *passphrase* TrueCrypt yang tersimpan di memori. Plugin ini dirancang untuk mencari struktur data yang berisi kunci dan kata sandi dari *volume* TrueCrypt yang sedang aktif.

```shellscript
./volatility_2.6_win64_standalone.exe -f Snapshot14_1609164553061.vmem --profile=Win7SP1x64 hashdu
```

<figure><img src="https://3379135436-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pfT5vR8uE4ISAa7XuPV%2Fuploads%2FLO4tw5CzvZHFuqD9yK8P%2F5.%20vol.png?alt=media&amp;token=5de4bbe4-ac2d-4a0f-8b1d-5560f2dea4bc" alt=""><figcaption></figcaption></figure>

```
forgetmenot
```

***
