lab built Mar to Apr 2025, revisited Dec 2025 7 min read
Memory Forensics Analyzer
The coursework tool that flagged Windows itself, and what fixing it taught me
- status
- Coursework, Mar to Apr 2025. Revisited Dec 2025. Not deployed; tested on one sample memory dump.
- role
- Built most of it: the analysis engine and its YARA rules, and the December fix
- stack
In April 2025 my DIGIFOR group handed in a memory forensics tool that matched a malware rule on every one of the 53 processes it found, Windows’ own System process included. Nobody caught it at the presentation. In December I went back, found the rule that matched everything, and fixed it: on the same memory dump, the tool now matches no rules on 48 processes and flags 3, each for code injected into its memory.
Status: coursework, built March to April 2025 and revisited December 2025. Not deployed and not used on real incidents. Every result below comes from one sample memory dump the course provided.
- What it is
- a Python tool that reads a Windows memory dump and reports which running programs look tampered with, and why.
- Built for
- DIGIFOR (Digital Forensics) at De La Salle University, by Group 2, a team of 7.
- What went wrong
- a rule matched the header every Windows program starts with, so every process looked like malware.
- The fix
- three rules off, stricter rules, a narrow allow-list, weighted severity, no duplicate processes.
- On the sample
- April: 53 of 53 processes matched a rule. December: 0 of 48, with 3 flagged for code injection.
- My part
- most of the build: the analysis engine and its rules, and the December fix.
What it does
A computer’s memory holds everything it’s doing at one moment: every program that’s running, and what each one is up to. A memory dump is a snapshot of all of it, like a photo of a crowded room. Malware can hide well on a hard drive, but it can’t hide in memory, because to do anything it has to be running.
The tool reads that snapshot in four steps, and writes a plain-text report with the most suspicious programs at the top.
The report that looked fine
We presented it in April and it got through without a question. The report had a summary at the top: 53 processes, 12 suspicious, YARA matches in 53.
I didn’t trust it. In December, while going back over my projects, I opened that report again and read it line by line instead of reading the totals.
The rule on every line
Every process listed the same two YARA rules: Malicious_Office_Macros and Malware_Strings_Generic. System, svchost.exe, dwm.exe, all of them. So I opened the rules.
This was the generic one, as we wrote it in April:
rule Malware_Strings_Generic {
strings:
$g1 = "MZ" // PE header
$g2 = "This program cannot be run in DOS mode"
$g3 = "UPX!" // UPX packed
condition:
($g1 and $g2) or $g3
}
MZ and “This program cannot be run in DOS mode” are the first bytes of every Windows program. The rule didn’t find malware. It found programs. The macro rule fired on any one of AutoOpen(), Shell( or WScript.Shell, and Shell( turns up in ordinary memory. A third rule matched any mention of \temp\, \appdata\ or \programdata\ in memory, which is where normal apps keep their files.
The other problems were quieter:
- Every finding counted the same. All 12 “suspicious” processes were rated Low, so nothing could stand out.
- A parent check with the wrong list. It allowed four parent processes and flagged the rest, so
explorer.exewas suspicious for being started byuserinit.exe, which is how Windows always starts it. - Duplicates. One process (PID 832) was listed four times. That is why April counted 53 processes where December counts 48.
None of this was hard to find once I looked. That is the part that stayed with me.
What I changed
- Turned off the three rules that matched everything, rather than rewriting them. A rule that fires on everything is worse than no rule. It buries the real hits.
- Tightened the rules I kept. The rule for misused PowerShell (Windows’ built-in command tool, a favourite of attackers) used to fire on any one of its eight warning phrases. Now it needs three.
- Added an allow-list of 26 core Windows programs. It is narrow on purpose: those programs skip only one check, the one for add-on code (DLLs) loaded from unusual folders. Every other check still runs on them, which is why
explorer.exeis on the list and still flagged. - Weighted the evidence. Each kind of evidence now adds points, and the total sets how serious a program looks (table below).
- Dropped the parent check, which flagged programs started in perfectly normal ways, and removed duplicates: one program had been counted four times.
| Evidence found in a program | Points |
|---|---|
| It’s hiding: in one list of programs but not the other | 5 |
| Code was slipped into it after it started | 4 |
| Its own list of loaded code doesn’t add up | 3 |
| Memory set up to run code, with no program file behind it | 2 |
| Add-on code loaded from an unusual folder | 2 |
| A known-malware pattern (YARA) matched | 6, 3 or 1, by how specific the rule is |
8 points or more is Critical, 5 to 7 High, 3 to 4 Medium.
The result on the sample
The December version flags three processes, all High:
explorer.exe(the Windows desktop and file browser): 3 spots in its memory that look like code slipped in after it started, plus memory set up to run code with no program file behind it.iexplore.exe(Internet Explorer): the same, 3 spots.notepad.exe(Notepad): 1 spot, and the same memory pattern. A text editor rarely needs to run code of its own making.
This is how the December report shows them:
PID: 2496 | PPID: 2368 | Severity: High | explorer.exe
Flags: malfind hits: 3, Suspicious VAD protections (RX/RWX private)
PID: 3920 | PPID: 2496 | Severity: High | notepad.exe
Flags: malfind hits: 1, Suspicious VAD protections (RX/RWX private)
PID: 1888 | PPID: 2496 | Severity: High | iexplore.exe
Flags: malfind hits: 3, Suspicious VAD protections (RX/RWX private)
How to read it: PID is the program’s ID number, and PPID is the ID of the program that started it. “malfind hits” counts the spots of slipped-in code. “RX/RWX private” is memory set up to run code with no program file behind it.
None of the three was flagged by a known-malware pattern (YARA). All three come from evidence of code injection. That is a better kind of flag, because it describes what happened in memory instead of matching text.
What this does not show: I don’t know what the sample was infected with, so I can’t say the tool caught the real thing. It stopped crying wolf. I can’t yet prove it catches the wolf.
How it fits together
What exists, in the public repository’s main branch:
- The analysis engine (Python, 717 lines), driving Volatility 3.
- 8 YARA rules, with the 3 I turned off left in the file as comments, so the history is visible.
- The April and December reports from the same sample, side by side.
- A small set of tests.
What exists but isn’t public yet: a later version on another branch adds a 0 to 100 risk score, more rules and a web dashboard. I’ll write about it once it is on the main branch.
How I worked
The course set the project. Forensics wasn’t my field, so I leaned on GitHub Copilot to learn how memory analysis works and to help write the December rewrite and its docs. Reading the report, finding the rule that matched everything and deciding what to cut were mine. It still isn’t my favourite field, which is partly why I didn’t trust the first report.
What I’d do differently
- Test on dumps whose infection is known. Without a known answer, “zero false positives” only means the tool got quieter, not that it got right.
- Read the lines, not the totals. “53 of 53” looked like a result. The lines showed
Systemcarrying Office macros. - Check where a process lives and who started it, not just its name. The real
svchost.exeruns fromSystem32and is started byservices.exe. Malware borrowing the name usually gets one of those wrong. My allow-list only checks names.
What this is not
It is not deployed and has not been used on a real incident. It has been tested on one sample, with no known answer. The allow-list matches names only, so malware named svchost.exe would skip one check. It narrows down where an analyst should look; it doesn’t replace the analyst.
Sources and credits
- Group 2. 2025. memoryforensics, source code and analysis reports. github.com/Stilsi-dev/memoryforensics (opens in a new tab). Reports dated 10 Apr 2025 and 30 Dec 2025; read 14 Nov 2026.
- The Volatility Foundation. Volatility 3, memory forensics framework.
- VirusTotal. YARA, pattern-matching tool for malware research.
Built with Group 2, a team of 7, for DIGIFOR (Digital Forensics) at De La Salle University. A teammate built the April version’s desktop interface. The December fix is mine. Any errors are mine.