HTB: Seized Challenge
Seized - HackTheBox Challenge Writeup
Challenge Information
| Field | Value |
|---|---|
| Name | Seized |
| Category | Forensics |
| Difficulty | Medium |
| Author | d3vn0mi |
Description
Miyuki and her team are investigating a newly formed ransomware division working for Longhir, targeting critical infrastructure with no intent to restore encrypted files even after ransom payment. This case is top priority. A hard drive has been seized from one of the members, and intelligence suggests it contains credentials for the Ransomware Dashboard hidden within the AppData folder. Your task is to retrieve these credentials from the provided forensic image.
Solution Overview
This forensics challenge requires analyzing a Windows AppData folder to locate and extract credentials for a ransomware dashboard. The solution involves:
- Extracting and examining the AppData directory structure
- Identifying credential storage locations in Windows (browser cache, password managers, application config files)
- Parsing relevant files for plaintext or encoded credentials
- Recovering the dashboard credentials
Key Steps
Step 1: Examine AppData Structure
# List the AppData directory to identify interesting locationsls -la AppData/
# Common credential storage locations in Windows:# - Roaming/Microsoft/Credentials/# - Local/Google/Chrome/User Data/# - Roaming/FileZilla/# - Local/Discord/# - Browser caches and databasesStep 2: Search for Configuration Files
# Recursively search for configuration files that might contain credentialsfind AppData/ -type f \( -name "*.conf" -o -name "*.config" -o -name "*.ini" \)
# Look for credential-related filesgrep -r "password\|credential\|dashboard" AppData/ 2>/dev/nullStep 3: Check Browser Data
# Examine Chrome/Chromium user datals -la AppData/Local/Google/Chrome/User\ Data/Default/
# Check for stored login data (typically SQLite database)# Extract from Login Data filesqlite3 AppData/Local/Google/Chrome/User\ Data/Default/Login\ Data \ "SELECT origin_url, username_value, password_value FROM logins;"Step 4: Decode Encrypted Credentials
# Chrome passwords on Windows are encrypted with DPAPI# Extract the encrypted password blob and decrypt using Windows APIs# or identify plaintext credentials in other locations
# Check for unencrypted config filescat AppData/Roaming/*/config.txtcat AppData/Local/*/credentials.txtStep 5: Extract the Flag
Once credentials are recovered from the forensic image, the flag will be in the format:
HTB{<redacted>}Tools Used
- File System Analysis:
find,ls,grep - Database Inspection:
sqlite3 - Text Processing:
cat,strings,xxd - Archive Extraction:
7z,unzip(if AppData is compressed)
Key Learnings
-
Windows AppData Structure: Understanding the Windows user profile structure is essential for forensics. The AppData folder contains three main directories:
Roaming/- User profile data synced across machinesLocal/- Machine-specific application dataLocalLow/- Low-privilege application data
-
Credential Storage: Attackers often store dashboard credentials in:
- Browser autofill databases (Login Data)
- Application config files
- Unencrypted text files within application directories
- Temporary files and caches
-
Chrome Password Extraction: Chrome stores passwords in an SQLite database, but they’re encrypted with DPAPI on Windows. However, plaintext credentials or base64-encoded values may exist in other application folders.
-
Forensic Approach: Always start with the most accessible locations before attempting complex encryption breaking. Many system administrators and users store credentials in plaintext in config files, especially in development or testing environments.
-
File Carving: If credentials are deleted, file carving techniques and unallocated space analysis may recover remnants of credential files.