Fileless Malware
Fileless malware is a type of malicious software that operates entirely in memory without writing files to disk. Fileless malware uses legitimate system processes and tools, making detection by traditional antivirus software extremely difficult.
Fileless Malware Definition
Fileless malware is a category of malware that avoids creating files on disk. Instead of traditional executable files, fileless malware operates in system memory, uses legitimate system processes, and stores its code in the registry, WMI, or other system structures.
How does fileless malware work?
- Initial access: Often through phishing with a macro or exploit
- Execution: Code runs in memory (e.g., PowerShell)
- Persistence: Registry, scheduled tasks, WMI subscriptions
- Actions: Data theft, ransomware, backdoor
Fileless Techniques
Memory injection:
- DLL injection
- Process hollowing
- Reflective loading
System tool abuse:
- PowerShell
- WMI
- .NET/CLR
Persistence without files:
- Malicious code in registry
- WMI event subscriptions
- Scheduled tasks with inline scripts
Why is fileless malware effective?
- Evades AV: No files to scan
- Evades forensics: Disappears after reboot (without persistence)
- Uses trusted tools: PowerShell, WMI are legitimate
- Difficult attribution: Fewer artifacts
Fileless Malware Examples
- Kovter: Stored entirely in the registry
- PowerGhost: Cryptominer using PowerShell
- Astaroth: Abuses system tools
- Emotet: Fileless variants
Fileless Malware Detection
Endpoint solutions:
- Memory scanning
- Behavioral analysis
- Script execution monitoring
- AMSI (Antimalware Scan Interface)
Network detection:
- Traffic anomalies
- C2 communication
- DNS analysis
Indicators:
- Unusual PowerShell execution
- Encoded scripts
- Abnormal process relationships
Fileless vs Traditional Malware
| Aspect | Traditional | Fileless |
|---|---|---|
| Files on disk | Yes | No (or minimal) |
| Persistence | Executable files | Registry, WMI, memory |
| AV detection | Signature-based | Requires behavioral analysis |
| Forensics | File artifacts | Memory analysis required |
Defense Against Fileless
- PowerShell: Constrained Language Mode, logging
- Memory protection: Credential Guard, HVCI
- Script control: WDAC, AppLocker
- EDR: Behavioral detection, memory scanning
Fileless malware represents an evolution of threats requiring modern detection approaches based on behavioral analysis rather than file signatures.
Learn more
Explore our services
Frequently asked questions
+ What is fileless malware in simple terms?
Fileless malware is malicious code that operates entirely in memory using legitimate system tools — typically PowerShell, WMI, .NET assemblies, or Office macros — without writing executable files to disk. Because traditional signature-based antivirus scans files, fileless malware evades detection by leaving no file artefact to scan. Modern attacks rely heavily on fileless or 'Living-off-the-Land' (LotL) techniques. Detection requires behavioural EDR/XDR analysing process trees, command-line arguments, and memory contents — not just file scanning.
+ What are common fileless malware techniques?
Six common patterns: (1) **In-memory PowerShell** — encoded or obfuscated PowerShell payloads loaded directly into memory (`Invoke-Expression`, `IEX`, downloads via `WebClient`), (2) **Reflective DLL injection** — load DLL into another process's memory without writing to disk, (3) **Process hollowing** — start legitimate process suspended, replace its memory contents with malicious code, (4) **WMI subscriptions** — persist via WMI event filters that fire on triggers (logon, scheduled), (5) **Registry-based persistence** — store payload in registry keys (Run, WMI, COM hijacking), (6) **Living-off-the-Land Binaries (LOLBins)** — use trusted tools (`certutil.exe`, `bitsadmin.exe`, `rundll32.exe`, `regsvr32.exe`, `mshta.exe`) to download/execute payloads. LOLBAS project (lolbas-project.github.io) catalogues 200+ such binaries.
+ What are famous fileless malware examples?
Five notable cases: (1) **Astaroth** — banking trojan using LOLBins (BITSAdmin, Certutil) to download payloads; massive Brazil/EU campaigns 2018-2020, (2) **Kovter** — early fileless adware/click-fraud, persisted entirely in registry, (3) **Poweliks** — pioneer of registry-based fileless persistence (2014), (4) **DNSChanger / TrickBot variants** — incorporate fileless modules, (5) **PowerShell Empire / Cobalt Strike beacons** — commercial/open-source frameworks heavily using fileless techniques; default tooling for ransomware operators (LockBit, BlackCat). Ransomware groups in 2024-2026 routinely deploy via fileless techniques after initial access — fileless is now mainstream, not exotic.
+ How do you detect fileless malware?
Fileless malware needs behavioural detection: (1) **EDR/XDR** with process behaviour analytics — flag suspicious parent-child relationships (Word spawning PowerShell), encoded command-line arguments, anomalous PowerShell parameters, (2) **Sysmon on endpoints** — events 1 (Process create), 3 (Network connect), 7 (Image load), 11 (File create), 13 (Registry value set); high-fidelity telemetry for hunting, (3) **PowerShell Script Block Logging** (Event ID 4104) — captures actual script content even if encoded, (4) **AMSI (Antimalware Scan Interface)** — Windows API hooked by AV/EDR to inspect scripts at execution, (5) **Memory analysis** — Volatility, Rekall for confirmed compromise, (6) **Anomaly detection** — statistical baselines for PowerShell usage, registry writes, WMI subscriptions. CrowdStrike Falcon, Microsoft Defender for Endpoint, SentinelOne all detect fileless well in independent tests.
+ How do you prevent fileless malware infections?
Layered defence: (1) **Modern EDR/XDR** with behavioural detection — primary control, (2) **Disable / restrict PowerShell** — Constrained Language Mode, JEA (Just Enough Administration), AppLocker rules blocking script execution from temp paths, (3) **Disable Office macros from internet** — Microsoft default since 2022 — closes major fileless delivery vector, (4) **AppLocker / WDAC** — application allow-listing prevents execution of unsigned scripts and binaries, (5) **PowerShell Script Block + Module Logging + Transcription** — comprehensive PowerShell auditing, (6) **Sysmon deployment** — enable full telemetry for hunting and detection, (7) **Patching** — many fileless attacks need an exploit for initial access; aggressive patching reduces opportunity, (8) **24/7 SOC monitoring** — fileless evades signature-based controls; need analysts hunting behavioural anomalies.
+ What are LOLBins (Living-off-the-Land Binaries)?
LOLBins are legitimate Windows/Linux binaries abused by attackers to download payloads, execute code, exfiltrate data, or pivot — without introducing new tools that AV would flag. The LOLBAS project (Living Off The Land Binaries, Scripts, and Libraries) catalogues 200+ Windows binaries with security-relevant capabilities: `certutil.exe` (download files), `bitsadmin.exe` (download/upload via BITS), `rundll32.exe` (execute DLLs), `regsvr32.exe` (execute scriptlets via .sct), `mshta.exe` (HTML applications with scripts), `wmic.exe` (WMI commands), `forfiles.exe` (file operations), `scrcons.exe` (WMI script host). Linux equivalent: GTFOBins. Defence: don't simply block these (they're used legitimately) — monitor abuse patterns via EDR/SIEM, restrict via AppLocker rules, limit user privileges.
+ How does fileless malware relate to MITRE ATT&CK?
Fileless techniques map across many ATT&CK tactics: **Execution** — T1059 Command and Scripting Interpreter (PowerShell, JavaScript, VBScript), T1059.001 PowerShell, T1059.005 Visual Basic, T1218 Signed Binary Proxy Execution (Rundll32, Regsvr32, Mshta, Cmstp); **Persistence** — T1546 Event Triggered Execution (WMI, COM hijacking), T1547 Boot or Logon Autostart Execution (registry Run keys); **Defense Evasion** — T1027 Obfuscated Files (encoded PowerShell), T1055 Process Injection, T1620 Reflective Code Loading; **Discovery** — T1082 System Information, T1018 Remote System Discovery (via PowerShell). Detection engineering using ATT&CK as framework helps systematically cover fileless techniques. SIGMA rules for fileless detections widely shared via SigmaHQ project.