HTB: One Of Us Challenge
One Of Us - HackTheBox Challenge Writeup
Challenge Information
| Field | Value |
|---|---|
| Name | One Of Us |
| Category | Forensics |
| Difficulty | Medium |
| Author | d3vn0mi |
Challenge Description
Dark Pointy Hats are causing trouble again. This time, they have targeted Invisible Shields and the protectors of the forbidden spells. They developed a specific spyware that aims to get access to the forbidden spells server.
The challenge provides:
- A sample of the spyware
- Suspicious mail that appears to be produced by the spyware
Your objective is to analyze these files and determine what happened during the attack.
Approach & Analysis Strategy
This forensics challenge requires a systematic approach to malware and artifact analysis:
- File Examination - Begin by identifying file types and metadata
- Spyware Analysis - Examine the malware sample for indicators of compromise (IOCs)
- Email Forensics - Parse the suspicious mail for headers, content, and embedded artifacts
- Correlation - Link findings from both the spyware and mail samples
- Timeline Reconstruction - Establish the sequence of malicious activities
Key Steps
Step 1: Initial File Reconnaissance
# List all provided challenge filesls -la
# Identify file typesfile *
# Check for file signatures and magic byteshexdump -C <file> | head -20Step 2: Spyware Sample Analysis
# Extract strings from the malware binarystrings <spyware_sample> | grep -i "http\|ftp\|cmd\|exec\|shell"
# Look for suspicious patternsstrings <spyware_sample> | grep -E "smtp|mail|exfil|command"
# Check for embedded configurationstrings <spyware_sample> | sort | uniqStep 3: Email Analysis
# Examine email headers for source trackinghead -50 <suspicious_mail>
# Extract sender, recipient, and timestamp informationgrep -E "^From:|^To:|^Date:|^Subject:" <suspicious_mail>
# Look for embedded payloads or attachmentsfile <suspicious_mail>
# Parse email structure (if MIME encoded)strings <suspicious_mail> | grep -i "boundary\|attachment\|content-type"Step 4: Correlation and IOC Extraction
# Cross-reference domains/IPs found in both filesgrep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' <spyware_sample> <suspicious_mail>
# Extract command and control (C2) infrastructurestrings <spyware_sample> | grep -i "callback\|beacon\|c2"Tools Used
- strings - Extract readable text from binary files
- file - Identify file types and formats
- hexdump - Examine binary data at the byte level
- grep - Pattern matching and IOC hunting
- Standard Linux utilities - For file analysis and correlation
Key Learnings
- Multi-file Correlation - Spyware challenges often require connecting artifacts from multiple sources (binaries and communications)
- Metadata Analysis - Email headers and file timestamps provide critical context for timeline reconstruction
- String Extraction - Malware often contains readable strings that reveal C2 addresses, commands, and capabilities
- Forensic Rigor - Document all findings with file paths and hash values when possible
- Indicator of Compromise (IOC) Hunting - Focus on identifying domains, IPs, process names, and registry keys that indicate malicious activity
Flag Format
When you identify the vulnerability or secret data exfiltrated by the spyware, submit it in the format:
HTB{<redacted>}Note: This challenge emphasizes the importance of thorough forensic analysis when dealing with targeted malware campaigns. The connection between the spyware sample and the suspicious mail likely reveals the attack vector and objectives of the threat actors.