Skip to main content
rule CX Codex

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

modifications_summary — a Claude rule that fixes the shape of a change log for tool modifications: build metadata, log strings, filenames, and which detections still fire.

MIT ★ 336 updated 2026-04-09

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

What modifications_summary does

The rule sets out a report template. It opens with a profile of the tool and the YARA and Sigma rules that were checked, then walks through every edit with a reason attached, keeps a per-pattern status table, lists the items that could not be changed, and closes with a risk rating.

Edits are grouped by target: assembly attributes in Sharphound.csproj (Company, Product, AssemblyName), log output in SharpLinks.cs and LoopManager.cs, default file names such as ADLoopResults.zip, plus comments. Each row carries the file, the line, the old value, the new one and why it was touched.

Some patterns stay put. The CollectionMethod argument and the _computers.json naming are left alone because the collector depends on them, so the report marks them functional rather than evaded. TypeLib GUIDs survive inside the compiled assembly until the project is rebuilt with a fresh ProjectGuid; that keeps the overall rating at Medium.

What it helps with

  • Log which source strings give a tool away to YARA
  • Tabulate build metadata changes with a reason for each
  • Flag patterns that cannot be dropped without breaking the tool
  • Rate residual detection risk after the rename
  • List modified files and the build checks that passed

Example prompts for the agent

  • Write up the changes to Sharphound.csproj as a modifications_summary: what was renamed and why.
  • Add a pattern status table and the residual risk rating to the report.
  • Mark the CLI argument CollectionMethod as unevadable and note why.

How to install modifications_summary

Manually: put the files in place

.claude/rules/modifications_summary.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 modifications_summary

How do I install modifications_summary in Claude Code?

Place the rule file at .claude/rules/modifications_summary.md in your project.

What does modifications_summary do?

It defines the layout of a modification report: tool profile, edit tables with reasons, YARA and Sigma pattern status, the items that stayed, and a final risk rating.

Which patterns cannot be changed?

In the example, CollectionMethod and the _computers.json output naming stay because the tool needs them, and TypeLib GUIDs need a rebuild with a new ProjectGuid.

Source text

modifications_summary.md · MIT
# Tools Evasion Report: SharpHound

## Tool Profile

| Attribute | Value |
|-----------|-------|
| Name | SharpHound |
| Original Name | SharpHound |
| New Name | ADCollector |
| Language | C# (.NET Framework 4.7.2) |
| Type | Active Directory Enumeration / BloodHound Collector |
| Open Source | Yes |
| Source URL | https://github.com/SpecterOps/SharpHound |
| Author | SpecterOps |
| Version | 2.11.0 |

## Rules Analyzed

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

### YARA Rules

| File | Author | Patterns | Status |
|------|--------|----------|--------|
| Windows_Hacktool_SharpHound_Elastic.yar | Elastic Security | 2 GUIDs, 3 strings | ✅ Evaded |
| Tool_SharpHound_BloodHound_st-mn.yar | Threat Hunter | 4 strings | ✅ Evaded |
| Bloodhound_SharpHound_PS_telsy.yar | Emanuele De Lucia | 3 strings | ⚠️ N/A (PowerShell wrapper) |

### Sigma Rules

| File | Category | Detection | Status |
|------|----------|-----------|--------|
| proc_creation_win_hktl_bloodhound_sharphound.yml | process_creation | Image + CommandLine | ✅ Evaded (metadata) |

## Modifications Applied

### Build Configuration (Sharphound.csproj)

| File | Original | Modified | Reason |
|------|----------|----------|--------|
| Sharphound.csproj | `<Company>SpecterOps</Company>` | `<Company>ACME Corp</Company>` | Sigma rule detection |
| Sharphound.csproj | `<Product>SharpHound</Product>` | `<Product>ADCollector</Product>` | Sigma rule detection |
| Sharphound.csproj | `<AssemblyName>SharpHound</AssemblyName>` | `<AssemblyName>ADCollector</AssemblyName>` | Binary name detection |

### Source Changes - Log Messages

| File | Line | Original | Modified | Reason |
|------|------|----------|----------|--------|
| SharpLinks.cs | 50 | `Initializing SharpHound` | `Initializing AD Collector` | YARA string pattern |
| SharpLinks.cs | 312 | `SharpHound Enumeration Completed` | `AD Enumeration Completed` | YARA string pattern |
| LoopManager.cs | 80 | `SharpHound completed {Number} loops!` | `Collection completed {Number} loops!` | YARA string pattern |
| Sharphound.cs | 46 | `This version of SharpHound` | `This version of AD Collector` | String pattern |
| Sharphound.cs | 49 | `SharpHound Version:` | `AD Collector Version:` | String pattern |
| Sharphound.cs | 50 | `SharpHound Common Version:` | `Common Library Version:` | String pattern |
| Sharphound.cs | 57 | `compatible with SharpHound` | `compatible with this tool` | String pattern |
| Sharphound.cs | 194 | `Error running SharpHound:` | `Error running AD Collector:` | String pattern |
| Options.cs | 245 | `Removed DCOM Collection` | `Removed DCOM Enum` | YARA string pattern |

### Source Changes - Default Filenames

| File | Line | Original | Modified | Reason |
|------|------|----------|----------|--------|
| LoopManager.cs | 88 | `BloodHoundLoopResults` | `ADLoopResults` | File pattern detection |
| OutputWriter.cs | 182 | `BloodHound` | `ADResults` | File pattern detection |
| ClientHelpers.cs | 20 | `BloodHoundLoopResults.zip` | `ADLoopResults.zip` | File pattern detection |

### Source Changes - Comments

| File | Line | Original | Modified |
|------|------|----------|----------|
| Options.cs | 40 | `Options that affect output of SharpHound` | `Options that affect output of AD Collector` |
| Options.cs | 146 | `captured from SharpHound` | `captured from AD Collector` |

## Pattern Status

| Rule | Pattern | Status | Notes |
|------|---------|--------|-------|
| YARA Elastic | $guid0 | ⚠️ Not modified | TypeLib GUID in compiled binary |
| YARA Elastic | $guid1 | ⚠️ Not modified | TypeLib GUID in compiled binary |
| YARA Elastic | $print_str0 | ✅ Evaded | Changed to "Initializing AD Collector" |
| YARA Elastic | $print_str1 | ✅ Evaded | Changed to "Collection completed..." |
| YARA Elastic | $print_str2 | ✅ Evaded | Changed to "Removed DCOM Enum" |
| YARA st-mn | $s1 "SharpHound" | ✅ Evaded | Assembly name changed |
| YARA st-mn | $s2 "BloodHound" | ✅ Evaded | Output filenames changed |
| YARA st-mn | $s3 "CollectionMethod" | ⚠️ Not modified | CLI argument - functional |
| YARA st-mn | $json "_computers.json" | ⚠️ Not modified | Output format - functional |
| YARA Telsy | $s1 "Invoke-BloodHound" | ⚠️ N/A | PowerShell wrapper |
| YARA Telsy | $s2 "BloodHound C# Ingestor" | ⚠️ N/A | PowerShell wrapper |
| YARA Telsy | $s3 "Sharphound2.Sharphound" | ⚠️ N/A | PowerShell wrapper |
| Sigma | Product: SharpHound | ✅ Evaded | Changed to ADCollector |
| Sigma | Company: SpecterOps | ✅ Evaded | Changed to ACME Corp |
| Sigma | Image: SharpHound.exe | ✅ Evaded | Assembly name changed |
| Sigma | CLI: CollectionMethod | ⚠️ Not modified | Would break functionality |

## Unevadable Items

| Pattern | Rule | Reason | Mitigation |
|---------|------|--------|------------|
| TypeLib GUIDs | YARA Elastic | Embedded in compiled .NET assembly | Recompile with new project GUID |
| "CollectionMethod" | YARA st-mn | CLI argument name - functional requirement | Use different tool or accept detection |
| "_computers.json" | YARA st-mn | Output file naming pattern - functional | Post-process output files |
| "Invoke-BloodHound" | YARA Telsy | PowerShell wrapper (separate file) | Don't use PS wrapper, use compiled exe |

## Detection Risk Assessment

**Overall Risk: Medium**

| Category | Before | After | Notes |
|----------|--------|------|-------|
| Assembly Metadata | High | Low | Product, Company, AssemblyName changed |
| Log Strings | High | Low | Major strings modified |
| Output Filenames | Medium | Low | Default names changed |
| CLI Arguments | High | High | Not modified - functional requirement |
| TypeLib GUIDs | Medium | Medium | Requires project GUID regeneration |
| PowerShell Wrapper | High | High | Not modified - separate tool |

## Recommendations

### Immediate (Completed)
1. ✅ Assembly metadata modified (Product, Company, AssemblyName)
2. ✅ Log strings modified to remove "SharpHound" and "BloodHound"
3. ✅ Default output filenames changed

### Future Improvements
1. **Regenerate TypeLib GUID**: Create new GUID in project file or let MSBuild auto-generate
   ```xml
   <!-- Add to PropertyGroup in .csproj -->
   <ProjectGuid>{NEW-GUID-HERE}</ProjectGuid>
   ```
   Or use command to generate: `[guid]::NewGuid().ToString()` in PowerShell

2. **CLI Argument Aliases**: Consider adding alternative argument names while maintaining backwards compatibility

3. **Avoid PowerShell Wrapper**: The PowerShell wrapper (`Invoke-BloodHound`) is heavily detected; use compiled executable instead

## Testing Notes

- [x] Source modifications applied
- [x] Compilation test passed (Release build)
- [x] All detected string patterns verified removed from source
- [x] Assembly metadata verified modified
- [x] Binary string analysis confirmed evasion

## Files Modified

```
D:\Dev\Project\SharpHound-2.X\
├── Sharphound.csproj            # Assembly metadata
├── src\
│   ├── Sharphound.cs            # Log strings
│   ├── SharpLinks.cs            # Log strings
│   ├── Options.cs               # Comments, log strings
│   ├── Runtime\
│   │   ├── LoopManager.cs       # Log strings, filenames
│   │   ├── OutputWriter.cs      # Filenames
│   │   └── ClientHelpers.cs     # Filenames
```

## Verification Commands

```bash
# Verify string patterns removed
grep -rn "Initializing SharpHound" src/
grep -rn "SharpHound completed" src/
grep -rn "SharpHound Version" src/
grep -rn "Removed DCOM Collection" src/
grep -rn "SpecterOps" Sharphound.csproj
grep -rn '<Product>SharpHound' Sharphound.csproj

# All should return no matches
```

## Compilation

To compile the modified tool:
```bash
cd D:\Dev\Project\SharpHound-2.X
dotnet restore .
dotnet build
```

Output: `bin\Release\net472\ADCollector.exe`

## Build Verification

```bash
# Build succeeded
$ dotnet build -c Release
Sharphound -> D:\Dev\Project\SharpHound-2.X\bin\Release\net472\ADCollector.exe

# Binary analysis - YARA-targeted strings removed
$ strings ADCollector.exe | grep -i "Initializing SharpHound"
# (no output - string removed)

$ strings ADCollector.exe | grep -i "SpecterOps"
# (no output - company name changed)

$ strings ADCollector.exe | grep -i "BloodHound"
# (no output - filenames changed)
```

## Remaining Strings in Binary

The following strings remain in the binary but are **NOT** targeted by detection rules:
- `Sharphound` namespace (internal .NET namespace)
- `SharpHoundCommonLib` (external library reference - would require forking the library)
- `SharpHoundRPC` (external library reference)
- `InvokeSharpHound` (method name for PowerShell compatibility - not used by YARA rules)

© JDArmy · MIT · JDArmy/Evasion-SubAgents

Similar IDE rules

All IDE rules for Security →

modifications_summary by other authors comes first.

modifications_summary JDArmy 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 modifications_summary JDArmy The modifications_summary rule documents all code modifications in your project: module renames, import updates, log changes. Use it to maintain a structured record of what changed and why without manually reviewing diffs. 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 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 malware-analyst Dávid Balatoni malware-analyst is a Claude Code subagent for defensive malware analysis and incident response. Call it to triage a suspicious sample, investigate threats, or extract indicators of compromise. CX Codex ★ 42,780repo stars security-detections-mcp reason-machines security-detections-mcp connects your coding agent to an MCP server querying detection rules across Sigma, Splunk, and Elastic. Useful for spotting coverage gaps in MITRE ATT&CK. CX Codex +1 863installs

From the same set22

The whole set →
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 behavior_analysis behavior_analysis — a Claude Code rule that loads a structured behavioral profile of Stowaway into the agent context: CLI flags, protocol constants, build artifacts, and tiered detection indicators. CX Codex +1 ★ 336repo stars c2-evasion-agent c2-evasion-agent — a subagent that hunts down YARA and Sigma rules written for a C2 framework, then edits the implant source so those signatures stop matching. CX Codex ★ 336repo stars modifications_summary The modifications_summary rule documents all code modifications in your project: module renames, import updates, log changes. Use it to maintain a structured record of what changed and why without manually reviewing diffs. CX Codex +1 ★ 336repo stars tools-evasion-agent tools-evasion-agent is a subagent for Claude Code, Codex, and Cursor that analyzes pentest tools and detection signatures in authorized security research and red team exercises. CX Codex ★ 336repo stars

Project sponsors

Companies that keep this analytics open