TryHackMe // Write-up
Boogeyman 2.
Phishing, memory forensics, and persistence: reconstructing an attack from a phishing email and a Windows memory dump.
- DFIR
- Phishing Analysis
- Memory Forensics
- Volatility 3
- Persistence
01 Scenario
The investigation focused on a phishing email sent to an employee at Quick Logistics. The email contained a malicious Microsoft Word document disguised as a job application. The document used a VBA macro to download and execute a JavaScript payload, which led to further malware execution, command-and-control (C2) activity, and scheduled-task persistence.
My objective was to reconstruct the attack using the email artifact and a Windows memory dump.
02 Analyze the Phishing Email
The first artifact was Resume - Application for Junior IT Analyst Role.eml. I inspected the email headers and extracted the attached Word document using Python's email parsing functionality.
| Field | Value |
|---|---|
| Sender | westaylor23@outlook.com |
| Recipient | maxine.beck@quicklogisticsorg.onmicrosoft.com |
| Subject | Resume - Application for Junior IT Analyst Role |
| Attachment | Resume_WesleyTaylor.doc |
| Attachment MD5 | 52c4384a0b9e248b95804352ebec6c5b |
The resume-themed subject was intended to make the attachment appear legitimate. The external sender and unexpected document attachment warranted further investigation.
03 Analyze the Malicious Word Document
I used olevba to inspect the document for embedded VBA macros.
olevba Resume_WesleyTaylor.doc
The macro contained an AutoOpen() routine that executed when the document was opened. It used Microsoft.XMLHTTP to retrieve a remote file and ADODB.Stream to write the response to disk. The important indicators were:
| Indicator | Value |
|---|---|
| Remote payload | https://files.boogeymanisback.lol/aa2a9c53cbb80416d3b47d85538d9971/update.png |
| Destination | C:\ProgramData\update.js |
| Execution | wscript.exe C:\ProgramData\update.js |
Despite the .png extension in the download URL, the response was saved with a .js extension and executed as a script. The extension of the remote resource alone did not establish its actual file type.
This established the initial execution chain: opening the document triggered the macro, which downloaded a remote payload and launched it through Windows Script Host.
04 Investigate the Windows Memory Dump
The next artifact was WKSTN-2961.raw, a Windows memory image. I used Volatility 3 to identify the operating system and investigate the running and recently exited processes.
vol -f WKSTN-2961.raw windows.info
The system information identified a 64-bit Windows 10 environment running build 18362.
Process tree
I examined the process tree:
vol -f WKSTN-2961.raw windows.pstree
The relevant process chain was:
OUTLOOK.EXE (PID 1440)
└── WINWORD.EXE (PID 1124)
├── WINWORD.EXE (PID 4336, exited)
└── wscript.exe (PID 4260)
└── updater.exe (PID 6216)
└── conhost.exe (PID 4464)
This process relationship connected the phishing document to script execution and the subsequent malware process. The relevant findings were:
| Item | Value |
|---|---|
| Stage-two script process | wscript.exe |
| PID | 4260 |
| Parent PID | 1124 |
| Script path | C:\ProgramData\update.js |
| Malicious executable | updater.exe |
| Executable PID | 6216 |
| Executable path | C:\Windows\Tasks\updater.exe |
I also examined process command lines:
vol -f WKSTN-2961.raw windows.cmdline
The command-line evidence supported the execution of C:\ProgramData\update.js by Windows Script Host and identified the path of updater.exe.
05 Identify the Download URL and C2 Endpoint
During the memory investigation, I searched for strings associated with the malicious activity. To find HTTPS URLs stored as little-endian UTF-16 strings, I used:
strings -a -el WKSTN-2961.raw | grep -i 'https://files'
This recovered the initial payload URL:
https://files.boogeymanisback.lol/aa2a9c53cbb80416d3b47d85538d9971/update.png
The -el option was important because Windows commonly stores strings in UTF-16LE encoding. Searching only standard ASCII strings can miss relevant artifacts.
Further memory-string analysis identified:
http://128.199.95.189:8080/admin/get.php
This was a separate URL associated with the later malware activity, not the answer to the initial payload-download question.
The identified C2 endpoint was 128.199.95.189:8080. These findings helped distinguish the initial phishing payload delivery from subsequent malware communications.
06 Locate the Original Attachment in Memory
I used Volatility's file-object scanning functionality to locate cached files and other filesystem artifacts:
vol -f WKSTN-2961.raw windows.filescan | grep -i -E 'updater|update.js|Resume_WesleyTaylor|\.doc'
This revealed a cached copy of the Word attachment at:
\Users\maxine.beck\AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\WQHGZCFI\Resume_WesleyTaylor (002).doc
The file scan also identified artifacts associated with the malicious executable and its scheduled task:
\Windows\Tasks\updater.exe\Windows\System32\Tasks\Updater\Windows\Prefetch\UPDATER.EXE-F25601BD.pf
These artifacts provided additional evidence of execution and persistence.
07 Recover the Scheduled-Task Persistence Command
The final stage of the investigation was to determine how the attacker maintained access after establishing C2. The task file was identified as \Windows\System32\Tasks\Updater. I dumped the relevant file object with Volatility:
vol -f WKSTN-2961.raw windows.dumpfiles --virtaddr 0xe58f89295990
The recovered artifact was:
file.0xe58f89295990.0xe58f838dcbe0.DataSectionObject.Updater.dat
Further investigation led to the full scheduled-task creation command:
schtasks /Create /F /SC DAILY /ST 09:00 /TN Updater /TR 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NonI -W hidden -c \"IEX ([Text.Encoding]::UNICODE.GetString([Convert]::FromBase64String((gp HKCU:\Software\Microsoft\Windows\CurrentVersion debug).debug)))\"'
Understanding the command
| Element | Meaning |
|---|---|
| /Create | Creates a scheduled task. |
| /F | Forces creation or overwrites an existing task with the same name. |
| /SC DAILY | Configures a daily schedule. |
| /ST 09:00 | Sets the scheduled start time to 9:00 AM. |
| /TN Updater | Names the task Updater. |
| /TR | Defines the command executed by the task. |
| -NonI | Runs PowerShell non-interactively. |
| -W hidden | Hides the PowerShell window. |
| FromBase64String | Decodes a Base64-encoded value. |
| Text.Encoding::UNICODE.GetString | Converts the decoded bytes to a Unicode string. |
| IEX (Invoke-Expression) | Executes the resulting PowerShell content. |
The command retrieves a value named debug from the user's registry location and executes the decoded content. This provides a mechanism for executing stored commands or code without placing the entire payload directly in the scheduled-task definition.
The daily schedule provides recurring execution, while the hidden PowerShell invocation helps conceal the activity from the interactive user.
08 Reconstructed Attack Chain
The evidence supported the following sequence:
- The victim received a phishing email disguised as a job application.
- The victim opened the attached Word document.
- The document's
AutoOpen()macro downloaded a remote resource. - The macro saved the downloaded content as
C:\ProgramData\update.js. wscript.exeexecuted the script.- The subsequent activity launched
C:\Windows\Tasks\updater.exe. - The malware communicated with the identified C2 endpoint.
- The attacker established scheduled-task persistence through a task named
Updater, configured to run daily at 9:00 AM.
09 Indicators of Compromise
| Indicator | Value |
|---|---|
| Phishing sender | westaylor23@outlook.com |
| Recipient | maxine.beck@quicklogisticsorg.onmicrosoft.com |
| Attachment | Resume_WesleyTaylor.doc |
| Attachment MD5 | 52c4384a0b9e248b95804352ebec6c5b |
| Initial payload URL | https://files.boogeymanisback.lol/aa2a9c53cbb80416d3b47d85538d9971/update.png |
| Script path | C:\ProgramData\update.js |
| Script process | wscript.exe, PID 4260 |
| Malicious executable | C:\Windows\Tasks\updater.exe |
| Executable PID | 6216 |
| Additional URL | http://128.199.95.189:8080/admin/get.php |
| C2 endpoint | 128.199.95.189:8080 |
| Scheduled task | Updater |
| Persistence schedule | Daily at 09:00 |
10 Lessons Learned
This investigation reinforced the value of correlating multiple evidence sources instead of relying on a single indicator. The email headers and macro revealed the initial delivery mechanism. The process tree established relationships between Office, Windows Script Host, and the malicious executable. Memory-string searches uncovered network indicators, while file scanning and task artifacts helped identify persistence.
Correlate your evidence
No single artifact told the whole story. Email, macro, process tree, memory strings, and task files each filled in a different stage.
Separate the stages
The initial HTTPS download URL was not the same as the later URL found in memory, and the process that executed the script was not the process that performed the subsequent malicious activity.
Search memory in the right encoding
Windows commonly stores strings as UTF-16LE, so an ASCII-only search can miss relevant artifacts.
// Conclusion
I completed the Boogeyman 2 investigation by analyzing a phishing email, extracting and inspecting a malicious Word attachment, examining a Windows memory dump with Volatility 3, identifying network indicators, and recovering the scheduled-task persistence command.
The room provided practical experience with phishing analysis, process-tree reconstruction, memory forensics, Windows execution artifacts, and persistence investigation, skills directly relevant to SOC analysis and incident response.