Richard at 13Cubed recently released another memory forensics challenge; this time involving a compromised Windows host. Watch the video below for a summary of the incident.
Per the warning on the YouTube video;
⚠️ CAUTION ⚠️
This memory sample contains a simulated ransomware for educational purposes. Although safeguards have been implemented to prevent any harm, they are not foolproof. Please treat this sample as if it contains active malware. Ensure all necessary precautions are taken to mitigate potential risks.
WALK-THROUGH BELOW
This page is just a placeholder for the moment, it should be completed by mid-July.
Bob recently accepted a position at a new company. After hearing alarming scenarios about a ransomware attack, he decided to backup all his data to the cloud. Unfortunately, something went wrong during the process.
We only have an image and a series of indicators. This scenario simulates a ransomware scenario using a custom binary.
Analysis Environment
For this challenge, we're going to use MemProcFS on a Windows machine.
We know that the sample is from a Windows machine, and we don't need to build our own kernel profiles from scratch like we do with Linux samples. We do, however, need internet connectivity to pull symbol tables from Microsoft's hosts (unless you have an airgapped repo setup).
Mount your memory image
From a command prompt, run the following;
The drive should appear as a mounted network drive, like below;
I personally like using WSL2 in combination with Explorer and other forensic tools, so I want to mount the network share inside the WSL terminal. To do that, run the following
Challenge Questions
Question 1: What is the hostname of this device?
MemProcFS provides a summary of common values in M:\sys, including computername, boot time, etc.
Validate this yourself by looking at the value stored in the following registry key;
Each entry has a GUID, so navigate to each folder and verify interface name, IP, etc.
Question 4: What was the full URL, including the file name, that the malicious program was downloaded from?
We saw connections above (PID 8240, specifically) connecting to a remote IP on port 8080. The associated process is msedge.exe (Microsoft Edge) so let's see if we can retrieve the user's browsing history.
One thing I like to do while I'm manually navigating files/folders, is run some basic strings/grep commands in the background. The above IP address looks suspicious (given the circumstances/scenario), so run;
One of the first hits is actually a Defender alert caught by the FindEvil module in MemProcFS;
Answer: hxxp://167.172.227[.]148:8080/backup.exe
Question 5: According to this execution artifact that would not be found on servers, the first execution occurred within 10 seconds of what time?
There's a clear hint in the question here. Prefetch is not enabled by default on Windows server operating systems, however it's enabled on workstation versions. Read about Prefetch files here and here
If the executable had never been executed on this system before, then a Prefetch file would not exist. We can review the Master File Table (MFT) which has been parsed for us automatically (created time first, modified time second)
We can also look at forensic\timeline\timeline_all.txt to see what was happening around that time
Answer: 2025-03-07 19:41:08 UTC
Question 6:
According to the malicious program's log file, how many files were encrypted?
Looking at events around the same timeframe, we can see the following entry in timeline_all.txt
If we try and open the file here M:\forensic\ntfs\1\Users\Robert Paulson\Desktop\encryption_log.txt we can see it's empty, but we can view its contents here;
Looks like it's corrupt. Some quick mucking around with .dump and .recover didn't yield any results, so time to just use a simple hex editor. I opened ffffe00923455400-History in HxD and reviewed the most recent URL hits. (Most recent at the top, oldest at the bottom).
Answer: free backup utility for windows 11
Bonus Question:
What folder does the "Backup Software" landing page tell users to exclude?
In the same folder, navigate to Default/Cache/Cache_Data - we're looking for page hits relating to backup software.
$ cat ntfs/ntfs_files.txt | grep -i backup.exe
447f 77d06400 7199 343 2025-03-07 19:40:36 UTC : 2025-03-07 19:41:04 UTC b49ae6 A \1\Users\Robert Paulson\Downloads\backup.exe
4480 77d06400 7199 343 2025-03-07 19:40:36 UTC : 2025-03-07 19:41:04 UTC 7 ARS \1\Users\Robert Paulson\Downloads\backup.exe:SmartScreen
4bb5 5efbc400 721d 1a33b 2025-03-07 19:41:08 UTC : 2025-03-07 19:41:09 UTC 0 A \1\Windows\Prefetch\BACKUP.EXE-AB6C9DDF.pf
Line 224: 2025-03-07 19:41:11 UTC REG MOD 0 0 0 \Root\InventoryApplicationFile\backup.exe|87931ab5a15fc7f5
Line 259: 2025-03-07 19:41:09 UTC NTFS MOD 0 0 5efbc400 \1\Windows\Prefetch\BACKUP.EXE-AB6C9DDF.pf
Line 270: 2025-03-07 19:41:08 UTC NTFS CRE 0 0 5efbc400 \1\Windows\Prefetch\BACKUP.EXE-AB6C9DDF.pf
Line 1488: 2025-03-07 19:41:04 UTC NTFS RD 0 11836134 77d06400 \1\Users\Robert Paulson\Downloads\backup.exe
Line 1489: 2025-03-07 19:41:04 UTC NTFS RD 0 7 77d06400 \1\Users\Robert Paulson\Downloads\backup.exe:SmartScreen
Line 1490: 2025-03-07 19:41:04 UTC NTFS MOD 0 11836134 77d06400 \1\Users\Robert Paulson\Downloads\backup.exe
Line 1491: 2025-03-07 19:41:04 UTC NTFS MOD 0 7 77d06400 \1\Users\Robert Paulson\Downloads\backup.exe:SmartScreen
Line 1940: 2025-03-07 19:40:36 UTC NTFS CRE 0 11836134 77d06400 \1\Users\Robert Paulson\Downloads\backup.exe
Line 1941: 2025-03-07 19:40:36 UTC NTFS CRE 0 7 77d06400 \1\Users\Robert Paulson\Downloads\backup.exe:SmartScreen
2025-03-07 19:41:09 UTC NTFS RD 0 0 5efbc000 \1\Users\Robert Paulson\Desktop\encryption_log.txt
Line 1940: 2025-03-07 19:40:36 UTC NTFS CRE 0 11836134 77d06400 \1\Users\Robert Paulson\Downloads\backup.exe
Line 1941: 2025-03-07 19:40:36 UTC NTFS CRE 0 7 77d06400 \1\Users\Robert Paulson\Downloads\backup.exe:SmartScreen
2025-03-07 19:41:08 UTC Net CRE 0 0 ffffe00922cb69f0 TCPv4 CLOSED 10.0.2.152:50079 167.172.227.148:80
2025-03-07 19:41:08 UTC NTFS CRE 0 451 5efbc800 \1\Users\Robert Paulson\AppData\Local\Temp\tmp98p1q14j
2025-03-07 19:41:08 UTC NTFS CRE 0 0 5efbc000 \1\Users\Robert Paulson\Desktop\encryption_log.txt
$ grep 'BEGIN RSA PRIVATE KEY' memory.dmp -A 50 -B1 -a