LOLBINS
CERTUTIL
MSHTA
BITSADMIN
DetectionBlue TeamSOCOctober 12, 2026•9 min read

Detecting LOLBins: Living-off-the-Land Binary Abuse

The binary is signed and expected. The arguments are not. LOLBin detection is a study in command lines, parents and rarity.

Scroll

Living-off-the-land binaries are legitimate, signed Windows utilities that can download, decode, execute or proxy code. Blocking them outright usually breaks something, so detection has to be specific: which arguments, from which parent, with which network or file side effects. The LOLBAS project catalogues the abuses; the job is to turn that catalogue into tuned, tiered detections.

Signals at a Glance

BinaryAbuse patternATT&CK
certutil.exe-urlcache -split -f to download; -decode or -decodehex to unpackT1105
mshta.exeRemote or local .hta, javascript: or vbscript: URL on the command lineT1218.005
bitsadmin.exe/transfer, /addfile or /SetNotifyCmdLine to fetch or chain executionT1197
msiexec.exe/i or /q with an http(s) URL or a package from a user-writable pathT1218.007
Any LOLBinSpawned by Office, a script host or a browser; outbound connection from the LOLBinT1218

Arguments, Parents and Network

Start with a tight, high-fidelity set. Each of these usages is rare for a human administrator and common for malware. This query covers the four binaries in one pass; split it into separate rules when you tune:

// Microsoft Defender XDR (KQL) - high-signal LOLBin argument patterns
DeviceProcessEvents
| where Timestamp > ago(7d)
| where (FileName =~ "certutil.exe"
         and ProcessCommandLine has_any ("-urlcache", "-verifyctl", "-decode", "-decodehex", "-encode"))
    or (FileName =~ "mshta.exe"
         and ProcessCommandLine matches regex @"(?i)(https?://|javascript:|vbscript:)")
    or (FileName =~ "bitsadmin.exe"
         and ProcessCommandLine has_any ("/transfer", "/addfile", "/SetNotifyCmdLine"))
    or (FileName =~ "msiexec.exe"
         and ProcessCommandLine matches regex @"(?i)\s/[iqjy].*https?://")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
          InitiatingProcessFileName, InitiatingProcessCommandLine
// tune/validate: software deployment tooling uses msiexec and bitsadmin the same way.

Argument matching alone misses renamed binaries and reordered flags, so add a rarity layer. In Splunk, rank command lines by how few hosts ever run them:

index=sysmon EventCode=1 (OriginalFileName IN ("CertUtil.exe","MSHTA.EXE","bitsadmin.exe","msiexec.exe"))
| eval exe=lower(OriginalFileName)
| stats count dc(host) as hosts values(ParentImage) as parents by exe, CommandLine
| where hosts <= 2 AND count < 5
| sort - count
`comment("tune/validate: OriginalFileName catches renamed copies; review parents first")`

Context That Separates Abuse

Vetted sources

Use LOLBAS as the catalogue of abuses, the SigmaHQ process-creation rules for each binary, Elastic’s LOLBin detections, Splunk ESCU content and Atomic Red Team tests for T1218 and T1105. Baseline your own environment — software distribution, installers and some management agents legitimately use these utilities.

Build Detections That Fire

Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.

Detection EngineeringManaged Detection & ResponseThreat HuntingIncident ResponsePurple Teaming
  • Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
  • Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
  • 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Written by: Mjolnir Threat Research (MTAC)  |  Published: October 12, 2026  |  Last reviewed: October 12, 2026