Use this when malware runs in memory using PowerShell, WMI or other built-in tools.
Fileless Malware
Fileless malware runs in memory using legitimate tools like PowerShell, WMI or rundll32 instead of dropping executables, which evades file-based antivirus. Script logging and EDR behaviour detection catch it.
1. Fileless malware lives in memory, scripts, registry, WMI.
2. Uses legitimate tools (LOLBins).
3. Script block logging, AMSI, EDR memory scanning.
4. Constrained Language Mode.
5. Memory forensics.
script/LOLBin → in-memory payload → no files
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Relying on file scanning, which finds nothing on disk.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- No malicious file on disk.
- Script logging and AMSI help.
- EDR behaviour detection catches it.
Get-WinEvent -LogName 'Microsoft-Windows-PowerShell/Operational' -MaxEvents 50— script block loggingGet-CimInstance -Namespace root\subscription -ClassName __EventFilter— WMI persistence- AMSI and EDR memory detections — in-memory threats
ReferenceWhy it matters1 section · depth on demand
In depth
Fileless malware runs mainly in memory and abuses legitimate system tools — PowerShell, WMI, mshta, rundll32, the registry — instead of dropping traditional executables on disk. This "living off the land" approach evades file-based antivirus and blends into normal administrative activity.
Detection and prevention:
| Control | Purpose |
|---|---|
| PowerShell script block and module logging | Visibility of executed code |
| AMSI | Scans scripts at run time |
| Constrained Language Mode, WDAC | Restrict what scripts can do |
| Attack Surface Reduction rules | Block common abuse patterns |
| EDR behavioural detection | Process trees, memory injection |
| Sysmon | Detailed process and WMI events |
Baseline normal admin tool use so unusual invocations — PowerShell launched by Office, encoded commands — stand out.
ReferenceImportant terms & boundaries2 sections · depth on demand
Common techniques
| Technique | Detection |
|---|---|
| PowerShell in memory | Script block logging (4104), AMSI |
| WMI event subscriptions | Get-WmiObject -Namespace root\subscription -Class __EventConsumer |
| rundll32/regsvr32/mshta abuse | Process creation with unusual parents |
| Registry-stored payloads | Large values in Run keys |
Where to look
- PowerShell Script Block Logging (event 4104).
- WMI event subscriptions (
Get-WmiObject -Namespace root\subscription -Class __EventFilter). - Registry Run keys with scripts.
- Memory analysis (Volatility
windows.malfind).
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Malware → Fileless Malware. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://attack.mitre.org/techniques/enterprise/ · confidence 94%