Windows Registry
Appearance
Think of it as Windows’ internal brain 🧠 — tempat nyimpen semua config dan setting dari:
- Hardware (printer, USB, network)
- Software (program terinstall)
- User info (akun, recent files, preferences)
- System settings (startup apps, drivers, dll)
Struktur Registry
Windows Registry disusun kayak folder-folder, tapi bukan file biasa. Ada 3 komponen penting:
| Komponen | Deskripsi |
|---|---|
| 🗂️ Keys | Mirip folder — tempat nyimpen "subkey" dan "values" |
| 🧾 Values | Data di dalam Key. Bisa angka, string, path, atau binary |
| 📦 Hives | Sekumpulan keys + values, disimpen sebagai file fisik di disk (kayak NTUSER.DAT, SYSTEM, dll) |
5 Root Keys Penting
- HKEY_CURRENT_USER (HKCU)
- Config spesifik buat user yang lagi login sekarang.
- Isinya:
- Folder user (Desktop, Documents, dsb)
- Warna tema, wallpaper, font
- Setting Control Panel
- Software preferences
- 🕵️♀️ Forensik vibes: Di sinilah biasanya malware ninggalin jejak config user (kayak autorun script user-level).
- HKEY_USERS (HKU)
- Semua user profile yang lagi loaded di sistem.
- Isinya Subkey buat tiap user, contoh:
- S-1-5-21-... ➜ ID user
- S-1-5-18 ➜ SYSTEM
- S-1-5-19 ➜ Local Service
- HKCU itu shortcut ke salah satu key di sini (user yang aktif). Gunanya bisa buat baca config user lain walau kita bukan user itu (kalau kita punya aksesnya)
- HKEY_LOCAL_MACHINE (HKLM)
- Config global buat seluruh komputer, bukan cuma satu user.
- Isinya:
- Info hardware
- Driver
- Installed software
- Startup apps (biasanya malware suka nyelip di sini 👀)
- Security policy
- Services
- Sering dianalisis saat nyari persistence malware atau settingan yang ngepengaruhi semua user.
- HKEY_CLASSES_ROOT (HKCR)
- Merged view buat file association dan class registration (alias: apa yang kebuka pas double-click file .txt).
- Isinya campuran dari:
- HKLM\Software\Classes ➜ Default untuk semua user
- HKCU\Software\Classes ➜ Override user spesifik
- Note: Kalau kita nulis ke HKCR, Windows akan milih sendiri tempatnya:
- Kalau key-nya udah ada di HKCU, dia tulis di sana
- Kalau belum, dia tulis ke HKLM
- Ini penting buat nge-track hijack file association. Contoh: malware bikin file .pdf dibuka pakai exe mereka.
- HKEY_CURRENT_CONFIG (HKCC)
- Isinya config hardware profile aktif saat ini (kayak monitor, display settings, printer). Ini bukan setting tetap, tapi kayak cache/snapshot dari HKLM pas boot. Berguna kalau kita nyari setting hardware yang cuma muncul pas kondisi tertentu (e.g. safe mode, boot pakai profil X).