Skip to main content
rule CX Codex

rule_inventory · jdarmy, sharphound — Claude Code rule: what it does, how to install

A rule file that gives the agent an inventory of SharpHound detections: three YARA rules, one Sigma rule, pattern tables and a difficulty rating for each.

MIT ★ 336 updated 2026-04-09

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/rule_inventory.md
Open on GitHub

What rule_inventory does

The file sits at .claude/rules/rule_inventory.md and acts as a reference sheet the agent can reason over. It gathers what catches SharpHound: three YARA rules from Elastic Security, st-mn and Telsy, plus one Sigma rule from SigmaHQ.

Each rule gets its own table. You'll find TypeLib GUIDs, constants pulled from log output, command-line flags such as -CollectionMethod All and --Loop --Loopduration, output names like _computers.json, and the PowerShell wrapper Invoke-BloodHound. The Sigma entry breaks into four selection blocks, and two of them only fire when every listed string appears at once.

The risk table is the part worth reading twice: assembly metadata, the binary name and both GUIDs are rated Easy, while string constants and CLI arguments land at Medium. Nothing here performs a scan. It is background material, and the agent does the rest.

What it helps with

  • Trace which YARA rules cover SharpHound and the strings behind them
  • Line up Sigma CommandLine selections with real flags
  • Find the assembly fields (Product, Company) that trigger a match
  • Check which output filenames the rules look for
  • Group patterns by how hard they are to change

Example prompts for the agent

  • Which YARA rules in rule_inventory.md cover SharpHound, and what do they match on?
  • List the CommandLine values the Sigma rule proc_creation_win_hktl_bloodhound_sharphound.yml checks
  • Which patterns does the risk table rate Easy, and which Medium?

How to install rule_inventory

Manually: put the files in place

.claude/rules/rule_inventory.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about rule_inventory

How do I install rule_inventory in Claude Code?

Copy the file to .claude/rules/rule_inventory.md in your project. That is the whole step.

What does rule_inventory do?

It hands the agent an inventory of SharpHound detections: three YARA rules, one Sigma rule, per-pattern tables and a difficulty rating.

Which detections does the inventory rate Easy?

Assembly metadata fields, the binary name and the two TypeLib GUIDs. The file marks each of those as a small change.

Source text

rule_inventory.md · MIT
# Rule Inventory for SharpHound

## Summary

| Type | Count | Sources |
|------|-------|---------|
| YARA | 3 | Elastic, st-mn, Telsy |
| Sigma | 1 | SigmaHQ |
| Network | 0 | - |
| Other | 0 | - |

## YARA Rules

| File | Author | Patterns | Target |
|------|--------|----------|--------|
| Windows_Hacktool_SharpHound_Elastic.yar | Elastic Security | 2 GUIDs, 3 strings | Binary |
| Tool_SharpHound_BloodHound_st-mn.yar | Threat Hunter | 4 strings | Binary |
| Bloodhound_SharpHound_PS_telsy.yar | Emanuele De Lucia | 3 strings | PowerShell |

### Detailed Pattern Analysis

#### Windows_Hacktool_SharpHound_Elastic.yar
| Pattern | Type | Detection |
|---------|------|-----------|
| $guid0 = "A517A8DE-5834-411D-ABDA-2D0E1766539C" | GUID | TypeLib GUID |
| $guid1 = "90A6822C-4336-433D-923F-F54CE66BA98F" | GUID | TypeLib GUID |
| $print_str0 = "Initializing SharpHound at {time} on {date}" | String | Log message |
| $print_str1 = "SharpHound completed {Number} loops!..." | String | Log message |
| $print_str2 = "[-] Removed DCOM Collection" | String | CLI output |

#### Tool_SharpHound_BloodHound_st-mn.yar
| Pattern | Type | Detection |
|---------|------|-----------|
| $s1 = "SharpHound" | String | Name |
| $s2 = "BloodHound" | String | Name |
| $s3 = "CollectionMethod" | String | CLI argument |
| $json = "_computers.json" | String | Output file |

#### Bloodhound_SharpHound_PS_telsy.yar
| Pattern | Type | Detection |
|---------|------|-----------|
| $s1 = "function Invoke-BloodHound" | String | PS function |
| $s2 = "Runs the BloodHound C# Ingestor..." | String | PS comment |
| $s3 = "$Assembly.GetType(\"Sharphound2.Sharphound\")..." | String | Reflection code |

## Sigma Rules

| File | Category | Detection |
|------|----------|-----------|
| proc_creation_win_hktl_bloodhound_sharphound.yml | process_creation | Image + CommandLine |

### Detailed Pattern Analysis

#### proc_creation_win_hktl_bloodhound_sharphound.yml

**Selection 1 - Image/Product/Description:**
| Field | Modifier | Value | Detection |
|-------|----------|-------|-----------|
| Product | contains | 'SharpHound' | Assembly metadata |
| Description | contains | 'SharpHound' | Assembly metadata |
| Company | contains | 'SpecterOps' | Assembly metadata |
| Company | contains | 'evil corp' | Assembly metadata |
| Image | contains | '\Bloodhound.exe' | Binary path |
| Image | contains | '\SharpHound.exe' | Binary path |

**Selection 2 - CommandLine:**
| Field | Modifier | Value | Detection |
|-------|----------|-------|-----------|
| CommandLine | contains | ' -CollectionMethod All ' | CLI argument |
| CommandLine | contains | ' --CollectionMethods Session ' | CLI argument |
| CommandLine | contains | ' --Loop --Loopduration ' | CLI argument |
| CommandLine | contains | ' --PortScanTimeout ' | CLI argument |
| CommandLine | contains | '.exe -c All -d ' | CLI pattern |
| CommandLine | contains | 'Invoke-Bloodhound' | PS function |
| CommandLine | contains | 'Get-BloodHoundData' | PS function |

**Selection 3 - CommandLine (all required):**
| Field | Modifier | Value | Detection |
|-------|----------|-------|-----------|
| CommandLine | contains | ' -JsonFolder ' | CLI argument |
| CommandLine | contains | ' -ZipFileName ' | CLI argument |

**Selection 4 - CommandLine (all required):**
| Field | Modifier | Value | Detection |
|-------|----------|-------|-----------|
| CommandLine | contains | ' DCOnly ' | CLI argument |
| CommandLine | contains | ' --NoSaveCache ' | CLI argument |

## Detection Risk Summary

| Detection Type | Patterns | Evasion Difficulty |
|----------------|----------|-------------------|
| Assembly Metadata | Product, Description, Company | Easy - Modify .csproj |
| Assembly Name | SharpHound.exe | Easy - Rename |
| TypeLib GUID | 2 GUIDs | Easy - Regenerate |
| String Constants | Multiple strings | Medium - Encrypt/obfuscate |
| CLI Arguments | Multiple patterns | Medium - Rename arguments |
| Output Files | *_computers.json | Medium - Change naming |
| PowerShell | Invoke-BloodHound | N/A - Separate wrapper |

## References

- https://github.com/BloodHoundAD/BloodHound
- https://github.com/BloodHoundAD/SharpHound
- https://github.com/SpecterOps/SharpHound
- https://bloodhound.specterops.io/

© JDArmy · MIT · JDArmy/Evasion-SubAgents

Similar IDE rules

All IDE rules for Security →

rule_inventory by other authors comes first.

rule_inventory JDArmy The rule_inventory rule catalogues YARA indicators for Stowaway, including binary names, strings, paths, command-line patterns, and hashes. Use it when checking samples for those indicators. CX Codex +1 ★ 336repo stars detection-engineer 0xSteph detection-engineer turns an attack technique into a detection rule you can load: Sigma, Splunk SPL, Elastic EQL, Sentinel Kusto, YARA. Includes tuning notes. CX Codex ★ 2,482repo stars agency-threat-intelligence-analyst huytran1120 agency-threat-intelligence-analyst is a Claude Code skill that examines cyber threats, actor groups, and attack campaigns. It maps adversary behavior to MITRE ATT&CK and produces intelligence reports and detection rules. CX Codex +1 ★ 85repo stars skill-security superagent-ai Audits AI agent skills, plugins, and SKILL.md files for security risks and prompt injections before installation. CX Codex +1 9,100installs scan-inventory official Anthropic The scan-inventory subagent for Claude Code maps repository components and tracks skipped paths before a security audit. CX Codex ★ 47,914repo stars hook-inventory hoangsonww hook-inventory inventories configured hooks and scripts in ~/.claude/hooks, then flags network activity and risky commands. Use it to review hook safety. CX Codex +1 ★ 1,198repo stars malware-triage securityskills malware-triage — a skill for safe analysis of unknown malware samples. Extracts static indicators, runs code in a sandbox, identifies behavior patterns, and produces detection guidance with IOCs and ATT&CK mapping. CX Codex +1 234installs

From the same set22

The whole set →
rule_inventory The rule_inventory rule catalogues YARA indicators for Stowaway, including binary names, strings, paths, command-line patterns, and hashes. Use it when checking samples for those indicators. CX Codex +1 ★ 336repo stars tool_profile tool_profile — a Claude rule that profiles Stowaway: what the Go multi-hop proxy is built from, how it compiles, and which traces it leaves on a host. CX Codex +1 ★ 336repo stars rule_mapping rule_mapping is a Claude Code rule that analyzes YARA and Sigma signatures for AdaptixC2. It helps assess which signatures are outdated during detection rule reviews. CX Codex +1 ★ 336repo stars tools_evasion The tools_evasion command examines a penetration-testing tool, gathers detection rules, then changes its source code to avoid those rules. It is intended for authorized security work. CX Codex +1 ★ 336repo stars hex_analysis hex_analysis — a rule file that explains YARA hex signatures for AdaptixC2: which instruction produced each one and which compiler flag moves those bytes. CX Codex +1 ★ 336repo stars lesson_learned The lesson_learned rule explains why string constants must match fixed-width protocol fields. Use it when changing Go code that reads message headers into fixed-size buffers. CX Codex +1 ★ 336repo stars behavior_analysis behavior_analysis — a rule file that tables how SharpHound gives itself away and what the doc suggests changing in the build, the flags and the output files. CX Codex +1 ★ 336repo stars modifications_summary modifications_summary keeps a record of the AdaptixC2 YARA-evasion edits in front of Claude: beacon build flags, renamed Go functions and the commands that verify them. Useful when you pick the repo back up. CX Codex +1 ★ 336repo stars

Project sponsors

Companies that keep this analytics open