Fileless Malware - Attacks That Leave No Files
About 2 min read
Fileless malware is a collective term for malware that executes directly in memory without writing any files to disk. Traditional antivirus software detects threats by scanning files for signatures (patterns), but because fileless malware leaves no file to scan, it slips past this detection technique. A November 2017 study by the Ponemon Institute, "The 2017 State of Endpoint Security Risk" (based on a survey of 665 IT security practitioners), reported that 77% of the attacks that led to a compromise in 2017 involved fileless techniques.
The Living off the Land (LOL) Technique
Some fileless malware uses a technique called "Living off the Land." This technique abuses legitimate tools built into the OS.
Executes scripts in memory. Obfuscates commands with Base64 encoding and downloads and runs payloads from a C2 server
Uses Windows Management Instrumentation to launch processes remotely and achieve persistence through event subscriptions
Abuses the inline task feature of .NET to compile and run C# code embedded inside an XML file
Abused to execute HTA files and to reconstruct payloads using certutil's Base64 decoding feature
The LOLBAS (Living Off The Land Binaries, Scripts and Libraries) project lists Windows binaries, scripts, and libraries that could be abused in attacks.
Why Traditional Antivirus Cannot Detect It
File scanning
No file exists
Behavior monitoring
Detects abnormal API calls
Traditional antivirus works by matching files on disk against a signature database. Because fileless malware operates in memory, there is nothing to scan. Furthermore, PowerShell and WMI are legitimate OS components, and blocking those processes outright would disrupt business operations.
Behavior-Based Detection with EDR
EDR (Endpoint Detection and Response) monitors process behavior rather than the presence of files. It detects abnormal patterns such as PowerShell executing a Base64-encoded command, a suspicious process launching via WMI, or a process that does not normally communicate connecting to an external IP, and it raises alerts.
Hiding in the Registry and Scheduled Tasks
Although fileless malware "writes no files," it may still possess persistence mechanisms to survive reboots. Examples include writing an encoded PowerShell command into the Run key of the Windows registry, or registering a malicious script as a scheduled task. Using WMI event subscriptions, code can be executed in memory triggered by specific conditions (logon, time, and so on). The MITRE ATT&CK entry T1014 (Rootkit) describes rootkits as programs that hide the existence of malware by intercepting and modifying operating system API calls that supply system information.
The Importance of Memory Forensics
Investigations of fileless malware use memory forensics, the part of digital forensics that examines memory contents. Because no file is written to disk, a dump of the RAM is captured and analyzed. Using tools such as the Volatility Framework, you identify suspicious processes in memory, injected code, and network connection destinations.
Rebooting a device when an incident occurs loses the evidence held in memory (fragments may survive in the page file or a crash dump, but volatile memory itself cannot be recaptured). In incident response that examines evidence in memory, the order is "first capture a memory dump, then respond." Traces of lateral movement remain in memory as well. Prevention strategies and what to do if infected are explained in the ransomware protection article.
The dangers of extension permissions and real-world threat cases are explained in the Browser extension security article.
Was this article helpful?
Related Terms
- Lateral Movement - Spreading Inside a NetworkLateral movement is the post-breach technique of moving sideways through a network. Attackers use Pass-the-Hash, RDP abuse, and other methods to reach high-value targets and escalate damage.
- CSRF - Cross-Site Request Forgery ExplainedCSRF tricks your browser into sending unauthorized requests while you are logged in. Learn how anti-CSRF tokens and SameSite cookies prevent this attack.
- Ransomware - How It Spreads and How to Stop ItRansomware locks your files with encryption and demands payment for the key. Understand infection vectors, prevention strategies, and recovery options.
- Endpoint Security - Protecting Devices from ThreatsEndpoint security protects PCs, smartphones, and other devices. It has evolved from traditional antivirus to EDR and XDR, using behavioral detection and telemetry for advanced threat hunting.