- El malware Fileless operates in memory by abusing legitimate processes such as PowerShell and WMI.
- Effective detection is based on behavior, telemetry, and endpoint analytics.
- PowerShell logs, Sysmon logs, and WMI reviews are key to finding persistence.
- Layered defense, MITRE ATT&CK mapping and EDR/XDR drastically reduce risk.
The threat landscape has taken a qualitative leap with malware that lives exclusively in memory . This type of attack, better known as fileless malware, doesn't write executables to the disk and abuses legitimate system tools, making it extremely difficult to detect using traditional signature-based antivirus software; therefore, it's essential to know how to detect and remove suspicious files or malware.
What's relevant is not just its stealth, but the way it relies on trusted processes (PowerShell, WMI, mshta, rundll32, among others) and techniques like "living off the land" to camouflage itself. Consequently, detection involves observing behaviors, correlating events, and monitoring memory, not searching for suspicious files in storage.
What is fileless malware and why does it matter?

A fileless attack is any attack that executes malicious code without leaving persistent artifacts on the disk (or minimizing them as much as possible), relying on binaries already present in the system. It often injects or launches its payload directly into RAM, executing within normal operating system processes; therefore, real-time RAM monitoring is crucial.
This approach allows attackers to bypass controls that rely on file inspection , executable whitelisting, and reputation analysis. While some attacks achieve 100% fileless execution, they typically combine file-based and fileless phases during the intrusion cycle.
A common characteristic is that the adversary uses command lines and scripting to orchestrate each phase. Since there is no obvious "anomalous file," signature-based engines have more difficulty raising alerts, especially if the activity falls within "normal" parameters for administrative tools.
It's important to keep in mind that, by design, many of these implants have limited persistence : as soon as the system restarts, the load in RAM disappears. However, attackers often introduce re-entry mechanisms or light persistence so that access can be restored without intervention.
Why is it so difficult to detect?
The first reason is obvious: there's no file to scan . If the code lives and dies in memory, disk-centric engines have little to offer, unless there's telemetry of processes, memory, and network data to complement them.
The second reason is the overuse of native and signed system processes (PowerShell, WMI, mshta, rundll32, VBScript, JScript, batch interpreters, .NET, etc.). This coexistence with "legitimate" processes reduces noise and makes it difficult to distinguish good from bad without behavioral analysis or tools like Process Hacker.
The third reason is that static signatures don't work well with payloads that are assembled at runtime, obfuscated, or offloaded into memory. In fact, many antivirus programs don't thoroughly inspect real-time in-memory execution.
Furthermore, the rise of targeted attack vectors (APTs) and the use of advanced tactics have raised the bar. Attacks operating at the kernel level or through webshells , with minimal forensic traceability, have been observed, further complicating the response if there are insufficient logs and traceability.
How a fileless attack enters and operates
Initial access is usually achieved using classic techniques: phishing with links or attachments , Office documents with macros or DDE, PDF documents with malicious JavaScript, exploitation of vulnerabilities (including exploit kits), or stolen credentials.
Following the intrusion, a chain of execution is triggered that invokes tools such as PowerShell or WMI to download, decrypt, or inject the payload directly into the process's memory. All of this is orchestrated with commands and scripts that, on their own, may appear to be routine administrative operations.
In many campaigns, the attacker aims to persist just long enough to maintain a backdoor without writing visible executables. This is achieved using scheduled tasks, Registry keys, or, especially, WMI event subscriptions that reactivate execution upon a specific trigger (e.g., system startup or user login).
If the target rarely restarts—for example, a critical server—, in-memory presence can be particularly advantageous because it lengthens the adversary's window of opportunity without requiring noisy persistence.
Techniques, variations and real cases
The "living off the land" philosophy summarizes the approach: the intruder uses binaries and functionalities already present in Windows to move, collect, and execute. This reduces the need to "leave" tools on the disk and minimizes its exposure.
Popular techniques include injection into existing processes , using mshta or rundll32 to load code, VBScript/JScript scripts and batch execution, and the presence of suspicious DLLs . Payloads embedded in documents that exploit vulnerabilities to achieve execution without writing persistent executables are also seen.
There are forms like fileless ransomware , which prepares its execution in memory and encrypts data before defenses detect it; another variant abuses the Windows Registry to host encrypted configurations or payloads, initializing execution with self-deleting keys.
Notable examples have been documented: Godzilla -type webshells that receive modules via HTTP and inject them into memory; the SMB/Exploit.DoublePulsar backdoor, capable of loading code directly from the network by exploiting SMB 1.0 vulnerabilities; or APT29 (The Dukes) campaigns such as Operation Ghost, with fileless backdoors like RegDuke and POSHSPY.
Persistence: WMI, Logging, and Tasks
To avoid losing access, many attackers configure WMI subscriptions by combining event filters and consumers (CommandLineEventConsumer) that launch PowerShell or other actions when a condition is met (e.g., system uptime).
Others choose to set up discrete scheduled tasks or modify the Registry at startup locations. While the fileless ideal avoids writing to disk, these minimal "crumbs" often appear if durability or re-entry is a priority.
Conversely, these techniques leave identifiable artifacts if properly audited: WMI repositories, task definitions, and modified Registry keys. Hence the importance of having auditing and telemetry policies in place from the outset.
It's important to remember that RAM is volatile. Therefore, without persistence, a system restart might remove the implant, but don't be complacent: an attacker with access can reseed using the same technique as soon as they find the right opportunity.
Corporate risk and why blocking "all at once" is not the answer
Blindly blocking essential tools like PowerShell can harm IT operations, and even then, it's not enough: there are ways to circumvent the execution policy, load PowerShell via DLL, repurpose scripts, or package them into other executables to avoid basic controls.
The same applies to Office macros . Although it's advisable to disable them as a matter of policy when the business allows it, detecting them using signatures or static heuristics is complex and prone to false positives when there is previously unseen or obfuscated code.
Detection that is purely server-side or cloud-based , without endpoint prevention, leads to latency and connectivity dependency; to contain in a timely manner, the endpoint agent must be able to make local decisions with the full context of the system.
Ultimately, the problem is one of visibility and context: we need to understand which process called which one, with what arguments, what keys or tasks it created, what connections it opened, and how the chain of events evolves over time.
Evolution and figures: an upward trend
Fileless campaigns have been growing for years. Some industry reports at the time pointed to a 94% increase in fileless attacks in a six-month period, with PowerShell usage peaking and doubling in a matter of weeks (from 2,5 to 5,2 attacks per 1.000 endpoints), a clear reminder that these tactics are a favorite among attackers.
This surge is explained by the combination of offensive maturity , signature coverage failures, the popularity of targeted attacks, and the ease of camouflaging oneself within trusted processes without raising immediate suspicion.
How to really detect fileless malware
The key is to shift from identifying "who you are" (file history) to observing " what you do " (behavior). Real-time endpoint monitoring—memory, process tree, command line, registry, network activity—allows for the recognition of malicious patterns common to a wide variety of malware families.
Modern EDR/XDR solutions and behavioral AI engines detect suspicious sequences such as: Office document launching hidden PowerShell with no profile execution, downloading into memory and subsequent injection into another process followed by encryption or exfiltration.
Additionally, it is crucial to enable and centralize PowerShell logs (v5+ improves traceability), activate Sysmon to enrich events, and monitor the WMI repository for unusual subscriptions, consumers, and bindings.
Network analysis adds another layer: inspection of traffic behavior (C2, exfiltration patterns), prevention of network attacks, and correlation with endpoint events. When malware accesses the kernel or navigates protected memory, the network can provide clues that the host cannot see.
Practical guide to prevention and hunting
Restrict the use of PowerShell and WMI to administrators and clearly defined business cases, using AppLocker/WDAC or well-defined and inventoried execution policies. The goal is not simply to prohibit, but to regulate, log, and alert on any deviations.
Disable and control macros in Office via Group Policy where feasible, and apply Protected View and digital signatures to templates. Educate users to recognize phishing emails and malicious links, because social engineering remains the preferred entry point.
Apply system and application patches with priority to exposed components (browsers, plugins, Office, .NET, SMB services). Monitor for vulnerabilities and reduce the attack surface (disable SMBv1, for example, if it's not essential).
Strengthens telemetry: Enables advanced PowerShell logging, Sysmon with a finely tuned rule set, Registry auditing and tasks , and periodic WMI queries (e.g., checking __EventFilter, EventConsumer, and FilterToConsumerBinding against a known baseline).
Install solutions with memory scanning and behavioral analysis capable of detecting injected payloads in live processes, and evaluate EDR/XDR for continuous threat hunting, process containment, change reversal, and equipment isolation when needed.
Tactical mapping and response
Working with the MITRE ATT&CK framework helps identify relevant tactics/techniques: execution (T1059), use of PowerShell (T1059.001), WMI (T1047), in-process injection (T1055), persistence via Registry (T1112) or tasks (T1053), exfiltration (T1041), among others.
In a typical incident, it's important to reconstruct the complete "story": which attachment the user opened, which process launched which attachment, with what arguments, what artifacts were created, and how the chain propagated. Correlating the entire context is key to isolating the root cause and avoiding unnecessary intervention.
Some vendors have introduced concepts like " StoryLine " to group related processes and accurately attribute the source of the threat. This approach allows for mitigating the entire malicious group, reversing actions (keys, files, connections), and leaving the endpoint clean without disrupting legitimate processes like the email client.
The response must be local and fast: if the agent already has the user context, processes, Registry, network and files , it can block, roll back and isolate without waiting for decisions in the cloud, something critical against workloads that only live in memory for seconds.
Examples of detection and signals to monitor
Look for PowerShell invocations with ExecutionPolicy Bypass, hidden windows , no profile, and memory downloads followed by Start-Process or injection. These are common patterns in attacks originating from documents containing macros or DDE.
In WMI, check the root\subscription namespaces to locate event filters, command-line consumers, and bindings that are not on the baseline. It even creates "defensive" subscriptions that alert you to new suspicious objects.
In the Registry, it monitors startup keys and common persistence locations, and cross-references this with process telemetry. Using Sysmon, it observes process creation with anomalous descendants (Office → PowerShell → cmd → rundll32, etc.).
On the network, it identifies outbound connections to unusual domains or routes , encrypted payloads or incremental exfiltration, and relates PowerShell/WMI activities to spikes in outbound communications.
Market services and capabilities
There are managed services such as EMDR (Enterprise Managed Detection and Response) that combine proactive detection based on MITRE ATT&CK with real-time response, and 24/7 SOC to monitor, analyze behavior and perform forensics when needed.
At the product level, solutions with behavior detection on the endpoint itself are especially effective against fileless attacks because they do not depend on the vector (exploit, macro, PowerShell, PowerSploit, exploit kit or even zero-day vulnerabilities) and can automatically reverse actions.
Beyond marketing, the critical thing is that the agent has all the local context (users, processes, arguments, Registry, files and communications) to make decisions without delays, mitigate, isolate and allow to continue working on a clean device.
Historically, campaigns like WannaCry illustrate the usefulness of this approach: detection and containment by behavior even before having signatures, which significantly reduced the impact on protected organizations.
Detecting fileless malware requires looking at where the action actually takes place: memory, the command line, processes, and their relationship over time. With robust logging policies, PowerShell and WMI monitoring, endpoint behavior controls, layered defense, and ATT&CK mapping, it's perfectly feasible to uncover the secrets of a threat that, by its very nature, prefers to remain undetected.
Table of Contents
- 1 What is fileless malware and why does it matter?
- 2 Why is it so difficult to detect?
- 3 How a fileless attack enters and operates
- 4 Techniques, variations and real cases
- 5 Persistence: WMI, Logging, and Tasks
- 6 Corporate risk and why blocking "all at once" is not the answer
- 7 Evolution and figures: an upward trend
- 8 How to really detect fileless malware
- 9 Practical guide to prevention and hunting
- 10 Tactical mapping and response
- 11 Examples of detection and signals to monitor
- 12 Market services and capabilities