RogueOne Sherlock Walkthrough

Solved RogueOne from Hack The Box!

Field Details
Case Reference HTB-SHRLCK-ROGUEONE
Platform Hack The Box — Sherlock
Category Memory Forensics — Masquerading C2 Implant
Difficulty —
Date Opened 2023-08-10
Severity High
Status Closed — training scenario
Host Simon Stark’s workstation (Forela)
Memory Dump 20230810.mem
Tools Volatility 3, strings/grep, VirusTotal

Scenario: Your SIEM system generated multiple alerts in less than a minute, indicating potential C2 communication from Simon Stark’s workstation. Despite Simon not noticing anything unusual, the IT team had him share screenshots of his Task Manager to check for any unusual processes. No suspicious processes were found, yet alerts about C2 communications persisted. The SOC manager then directed the immediate containment of the workstation and a memory dump for analysis. As a memory forensics expert, you are tasked with assisting the SOC team at Forela to investigate and resolve this urgent incident.


1. Executive Summary

On 2023-08-10 a masquerading svchost.exe (PID 6812) was executed from C:\Users\simon.stark\Downloads\ on Simon Stark’s workstation. The implant established a C2 channel to 13.127.155.166:8888 at 11:30:03 UTC, spawned cmd.exe (PID 4364) for interactive command execution, and was first submitted to VirusTotal at 11:58:10 UTC (~28 minutes after C2 establishment). The entire attack — from initial execution to active C2 to interactive shell — took less than one minute, indicating an automated implant with a pre-configured C2 callback. The malicious sample’s MD5 is 5bd547c6f5bfc4858fe62c8867acfbb5; its PE creation time (2010-04-14) is likely timestomped.

1.1 Incident Summary

Field Details
Incident Type Masquerading C2 implant (svchost.exe) in memory
Initial Access Automated implant execution (pre-configured C2 callback)
Discovery SIEM C2 alerts → Task Manager (no suspicious process visible) → memory dump
First Execution 2023-08-10 11:30:03 UTC (C2 channel established)
Persistence None observed — implant ran from Downloads
Overall Severity High

1.2 Key Findings

  • PID 6812 ran svchost.exe from C:\Users\simon.stark\Downloads\ instead of C:\Windows\System32\ — classic masquerading (T1036.005).
  • C2 channel established to 13.127.155.166:8888 at 11:30:03 UTC (AWS ap-south-1 range).
  • cmd.exe (PID 4364) spawned as a child of PID 6812 at 11:30:57 UTC for interactive command execution.
  • Malicious sample MD5: 5bd547c6f5bfc4858fe62c8867acfbb5 (dumped via windows.dumpfiles ImageSectionObject).
  • Memory offset of the malicious process: 0x9e8b87762080.
  • VirusTotal first submission: 2023-08-10 11:58:10 UTC (~28 min after C2 establishment).
  • PE creation time 2010-04-14 22:06:53 is likely timestomped.

2. Investigation Scope & Artifacts

2.1 Artifacts Analyzed

Artifact Format What it answers
20230810.mem Raw memory dump All questions Q1–Q7
VirusTotal record for MD5 5bd547c6…bb5 Web (Details/History) First submission time (Q7)

2.2 Tools & Methods

Tool Purpose
Volatility 3 (windows.cmdline, windows.pstree, windows.dumpfiles, windows.netscan, windows.pslist) Process, network, file and offset analysis
md5sum Hash the dumped sample
VirusTotal Hash reputation and submission history

3. Technical Analysis

3.1 Scenario

Memory forensics investigation of a masquerading C2 implant on Simon Stark’s workstation. The implant was invisible in Task Manager (process name svchost.exe) but SIEM C2 alerts persisted; a memory dump was captured for analysis.

3.2 Q1 — Please identify the malicious process and confirm the process ID of the malicious process.

Answer: 6812

We used the windows.cmdline plugin to list all running processes along with their full command-line paths:

$ vol3 -f 20230810.mem windows.cmdline

q1_svchost_malicious.png

Key indicators:

  • PID 6812 is running svchost.exe — a legitimate Windows process name
  • However, the path is C:\Users\simon.stark\Downloads\svchost.exe instead of the expected C:\Windows\System32\svchost.exe
  • This is a classic masquerading technique (MITRE T1036.005) — the attacker named the malicious binary after a legitimate system process to blend in
  • This also explains why Simon’s Task Manager didn’t raise suspicion — the process name appeared normal

Detection angle. windows.cmdline showing svchost.exe outside C:\Windows\System32\ — masquerading detection via path anomaly.

3.3 Q2 — The SOC team believe the malicious process may have spawned another process which enabled the threat actor to execute commands. What is the process ID of that child process?

Answer: 4364

We used the windows.pstree plugin filtered by the malicious PID to view its child processes:

$ vol3 -f 20230810.mem windows.pstree --pid 6812

q2_pstree_child.png

Key indicators:

  • PID 4364 — cmd.exe with PPID 6812 (our malicious svchost.exe) — the child process used to execute commands
  • PID 9204 — conhost.exe with PPID 4364 — Console Window Host automatically spawned by cmd.exe (expected)
  • Both created at 2023-08-10 11:30:57 UTC — cmd.exe spawned immediately by the C2 implant
  • A C2 agent spawning cmd.exe is a common post-exploitation pattern for interactive command execution

Detection angle. windows.pstree --pid <malicious> revealing cmd.exe child — C2 implant spawning an interactive shell.

3.4 Q3 — The reverse engineering team need the malicious file sample. What is the MD5 hash of the malicious file?

Answer: 5bd547c6f5bfc4858fe62c8867acfbb5

We used the windows.dumpfiles plugin to extract the malicious binary from memory, then hashed it:

$ vol3 -f 20230810.mem windows.dumpfiles --pid 6812
$ md5sum file.0x9e8b91ec0140.0x9e8b957f24c0.ImageSectionObject.svchost.exe.img
5bd547c6f5bfc4858fe62c8867acfbb5

q3_md5hash.png

Key indicators:

  • The --pid 6812 flag dumps all files associated with the malicious process, including loaded DLLs and the main executable
  • We hash the ImageSectionObject (svchost.exe.img), not the DataSectionObject (svchost.exe.dat) — the ImageSectionObject represents the actual PE executable as loaded into memory, closest to the original binary on disk
  • The DataSectionObject is a data-level file mapping used for caching and may be incomplete or modified

Detection angle. windows.dumpfiles --pid <PID> then hash the ImageSectionObject — reliable sample recovery from memory.

3.5 Q4 — Confirm the C2 IP address and ports so the threat hunting team can sweep.

Answer: 13.127.155.166:8888

We used the windows.netscan plugin to extract network connections and filtered for the malicious PID:

$ vol3 -f 20230810.mem windows.netscan > exported_files/netscan.txt
$ cat netscan.txt | grep 6812

q4_netscan_c2.png

Key indicators:

  • PID 6812 (svchost.exe) has an ESTABLISHED TCP connection to 13.127.155.166 on port 8888
  • The local machine IP is 172.17.79.131 using ephemeral port 64254
  • Port 8888 is a common port used by C2 frameworks (Metasploit, Cobalt Strike, custom implants)
  • The connection was established at 2023-08-10 11:30:03 UTC
  • The 13.127.x.x range belongs to AWS ap-south-1 (Mumbai) — could indicate attacker-controlled cloud infrastructure

Detection angle. windows.netscan filtered by malicious PID — reveals C2 IP:port and connection establishment time.

3.6 Q5 — Can you confirm the time the process was executed and the C2 channel was established?

Answer: 10/08/2023 11:30:03

The answer was already visible from the netscan output used in Q4:

$ cat netscan.txt | grep 6812

q5_timeline_c2.png

Key indicators:

  • The netscan output shows the C2 connection was ESTABLISHED at 2023-08-10 11:30:03 UTC
  • This timestamp represents when the malicious svchost.exe (PID 6812) first connected to the C2 server at 13.127.155.166:8888
  • This correlates with the SIEM alerts that triggered the investigation
  • Note: the cmd.exe child process (PID 4364) was spawned at 11:30:57 UTC — roughly 54 seconds after the C2 channel was established, suggesting the attacker took nearly a minute to begin interactive command execution

Detection angle. Netscan ESTABLISHED timestamp anchors the initial compromise time.

3.7 Q6 — What is the memory offset of the malicious process?

Answer: 0x9e8b87762080

We used the previously exported windows.pslist output and filtered for the malicious PID:

$ cat exported_files/psslist.txt | grep 6812

q6_memory_offset.png

Key indicators:

  • The Offset(V) column shows the virtual memory address of the process’s EPROCESS structure
  • PID 6812 (svchost.exe) resides at offset 0x9e8b87762080
  • This offset can be used to manually inspect the process’s kernel structure in memory, or as input for other Volatility plugins that accept a virtual offset (e.g., --offset)

Detection angle. windows.pslist Offset(V) column — virtual address of the EPROCESS structure.

3.8 Q7 — When was the sample first submitted to VirusTotal?

Answer: 10/08/2023 11:58:10

We searched the MD5 hash 5bd547c6f5bfc4858fe62c8867acfbb5 on VirusTotal and checked the Details tab under the History section:

q7_virustotal.png

Key indicators:

  • First Submission shows 2023-08-10 11:58:10 UTC — when the reverse engineering team uploaded the sample
  • This is only ~28 minutes after the C2 channel was established (11:30:03 UTC), showing a fast incident response turnaround
  • The Creation Time of 2010-04-14 22:06:53 UTC is likely a falsified PE timestamp — attackers often forge compilation timestamps to mislead analysts (a technique known as timestomping)

Detection angle. VirusTotal Details/History tab — First Submission time and forged PE Creation Time (timestomping).


4. Challenge Q&A Log

# Question Answer Method
1 Malicious process PID 6812 windows.cmdline
2 Child process PID (interactive shell) 4364 windows.pstree --pid 6812
3 MD5 hash of malicious file 5bd547c6f5bfc4858fe62c8867acfbb5 windows.dumpfiles + md5sum
4 C2 IP address and port 13.127.155.166:8888 windows.netscan
5 Process execution and C2 establishment time 2023-08-10 11:30:03 windows.netscan ESTABLISHED
6 Memory offset of malicious process 0x9e8b87762080 windows.pslist Offset(V)
7 VirusTotal first submission time 2023-08-10 11:58:10 VirusTotal Details/History

5. Incident Narrative

On 2023-08-10 a masquerading svchost.exe (PID 6812) was executed from C:\Users\simon.stark\Downloads\ on Simon Stark’s workstation. The implant established a C2 channel to 13.127.155.166:8888 at 11:30:03 UTC, spawned cmd.exe (PID 4364) at 11:30:57 UTC for interactive command execution, and was first submitted to VirusTotal at 11:58:10 UTC (~28 minutes after C2 establishment). The entire attack — from initial execution to active C2 to interactive shell access — took less than one minute, indicating an automated implant with a pre-configured C2 callback, not manual exploitation.

The implant was invisible in Task Manager (process name svchost.exe) but SIEM C2 alerts persisted; the SOC contained the workstation and captured a memory dump for analysis. The malicious sample’s MD5 is 5bd547c6f5bfc4858fe62c8867acfbb5; its PE creation time (2010-04-14) is likely timestomped.


6. Attack Timeline

Timestamp (UTC) Event Artifact ATT&CK
2023-08-10 11:30:03 Malicious svchost.exe (PID 6812) executed from C:\Users\simon.stark\Downloads\; C2 channel established to 13.127.155.166:8888 windows.netscan, windows.cmdline T1036.005, T1071.001
2023-08-10 11:30:57 cmd.exe (PID 4364) spawned by malicious process for interactive command execution windows.pstree T1059.003
2023-08-10 11:30:57 conhost.exe (PID 9204) spawned automatically by cmd.exe windows.pstree —
2023-08-10 ~11:30+ SIEM generates multiple C2 communication alerts Scenario description —
2023-08-10 11:58:10 Malware sample first submitted to VirusTotal by reverse engineering team VirusTotal —

Key observation: The entire attack — from initial execution to active C2 communication to interactive shell access — took less than one minute. This indicates an automated implant with pre-configured C2 callback, not manual exploitation.


7. Indicators of Compromise (IOCs)

7.1 File IOCs

Type Value Context
File Name svchost.exe Masquerading implant (should be in System32) — Q1
File Path C:\Users\simon.stark\Downloads\svchost.exe Drop location — Q1
MD5 5bd547c6f5bfc4858fe62c8867acfbb5 Malicious sample — Q3
Memory Offset 0x9e8b87762080 EPROCESS virtual address — Q6

7.2 Network IOCs

Type Value Context
IP Address 13.127.155.166 C2 server (AWS ap-south-1) — Q4
Port 8888 C2 port — Q4
IP Address 172.17.79.131 Victim machine (local) — Q4

7.3 Behavioral IOCs

Type Value Context
Process svchost.exe (PID 6812) from Downloads Masquerading — Q1
Process cmd.exe (PID 4364) with PPID 6812 C2-spawned interactive shell — Q2
Process conhost.exe (PID 9204) with PPID 4364 Console host (expected child of cmd) — Q2
Timestamp PE creation time 2010-04-14 22:06:53 Likely timestomped — Q7

8. Detection Opportunities

Source What to look for Why it matters
Volatility windows.cmdline svchost.exe running from a non-System32 path (e.g., Downloads) Masquerading detection — Q1
Volatility windows.pstree cmd.exe spawned by an unusual parent (svchost.exe from Downloads) C2 implant spawning interactive shell — Q2
Volatility windows.netscan ESTABLISHED connection from a masquerading process to an external IP:port C2 channel identification — Q4
Volatility windows.dumpfiles Dump the ImageSectionObject and hash it Reliable sample recovery from memory — Q3
VirusTotal Hash lookup for unknown executables First submission time and timestomped PE creation time — Q7

9. MITRE ATT&CK Mapping

TTP ID Tactic Technique Evidence
T1036.005 Defense Evasion Masquerading: Match Legitimate Name or Location svchost.exe from Downloads instead of System32 — Q1
T1059.003 Execution Command and Scripting Interpreter: Windows Command Shell cmd.exe spawned by the implant — Q2
T1071.001 Command and Control Application Layer Protocol: Web Protocols C2 to 13.127.155.166:8888 — Q4
T1070.006 Defense Evasion Indicator Removal: Timestomp Forged PE creation time (2010-04-14) — Q7

10. Conclusions & Recommendations

10.1 Incident Summary

What Happened A masquerading svchost.exe implant was executed from the user’s Downloads folder, established a C2 channel to 13.127.155.166:8888, spawned an interactive cmd.exe shell, and was submitted to VirusTotal ~28 minutes later. The entire attack completed in under one minute.
Root Cause An automated implant with a pre-configured C2 callback was executed on the workstation; the process name (svchost.exe) masked it from casual inspection.
Impact Assessment Confidentiality: High — C2 channel established, interactive shell access. Integrity: Medium — implant executed from user-writable path. Availability: Low — no destructive action observed.

10.2 Recommendations

Priority Timeframe Recommendation
Immediate Within 24h Isolate the workstation; block 13.127.155.166 and port 8888 at the firewall; hunt the MD5 5bd547c6…bb5 estate-wide
High Within 7 days Review how the implant was delivered (phishing? drive-by?); check for persistence mechanisms
Medium Within 30 days Alert on svchost.exe (or other system binaries) running from non-System32 paths; alert on outbound connections to port 8888
Low Within 90 days User awareness for Task Manager limitations (process name alone is insufficient)
Strategic Ongoing Memory forensics as standard triage for SIEM C2 alerts; document Volatility plugin workflow

11. Analyst Notes & Learning

11.1 What I Did Well

Pivoted from SIEM alerts to memory forensics when Task Manager showed nothing suspicious. Used windows.dumpfiles with --pid and hashed the ImageSectionObject (not the DataSectionObject) for a reliable sample hash. Cross-referenced the netscan timestamp with the SIEM alert timeline.

11.2 Key Takeaways

  • Process name alone is not a detection signal: svchost.exe from Downloads is the tell, not the name. Always check the full path.
  • Memory forensics reveals what Task Manager hides: the implant was invisible by name but visible by path and network connection.
  • windows.dumpfiles ImageSectionObject vs DataSectionObject: the ImageSectionObject is the reliable PE for hashing; the DataSectionObject may be incomplete.
  • Fast C2 establishment (~1 min) indicates an automated implant with pre-configured callback, not manual exploitation.
  • Timestomped PE creation times are a common anti-forensic technique — always cross-check with VirusTotal.

11.3 New Techniques

Volatility 3 windows.cmdline, windows.pstree, windows.dumpfiles (ImageSectionObject), windows.netscan, and windows.pslist (Offset(V)); MD5 hashing of memory-dumped samples; VirusTotal Details/History tab for submission times and timestomping detection.


12. References

HTB Sherlock · RogueOne · Memory Forensics · 2023-08-10