Skip to main content

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.

PowerShell

Executes scripts in memory. Obfuscates commands with Base64 encoding and downloads and runs payloads from a C2 server

WMI

Uses Windows Management Instrumentation to launch processes remotely and achieve persistence through event subscriptions

.NET / MSBuild

Abuses the inline task feature of .NET to compile and run C# code embedded inside an XML file

mshta / certutil

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

Traditional AV
File scanning
Detection fails
No file exists
EDR
Behavior monitoring
Can detect
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