Skip to main content
rule CX Codex

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

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.

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 modifications_summary rule is a markdown file that Claude keeps in context while you work in the repo. It records the 2026-03-18 edits to AdaptixC2: a table of YARA rules from Elastic Security, bartblaze, enzok/CAPE and nembo81, the changes made to the C++ beacon and the Go agent, plus strings and xxd checks for the result.

On the beacon side, beacon_agent/src_beacon/Makefile gains flags such as -fno-inline-functions-small, -fno-expensive-optimizations and -fno-tree-loop-vectorize, while -fno-unwind-tables moves into EVASION_FLAGS. The Go agent gets 29 renamed functions in gopher_agent/src_gopher/tasks.go (CmdProc → DataProc, fRead → opRead), PIE builds via -buildmode=pie, no build ID, -H=windowsgui on Windows, and an updated call in main.go.

The file applies none of this by itself. Nothing reaches the binary until you rebuild the implants, so treat it as a record of work already done. X-Beacon-Id is set in the listener config through hb_header, not compiled into the beacon.

What it helps with

  • trace which compiler flags already went into the beacon Makefile
  • map an old Go function name to its renamed version
  • see which YARA rules are only partly covered
  • restore the edit history before rebuilding the implants
  • tell implant changes apart from the untouched server components

Example prompts for the agent

  • List the flags added to beacon_agent/src_beacon/Makefile and what each one changes in the build.
  • Which functions in gopher_agent/src_gopher/tasks.go were renamed, and what replaced fRead?
  • Which YARA rules are only partly covered, and what blocks the rest?

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?

Copy the file into your project at .claude/rules/modifications_summary.md.

What does modifications_summary cover?

The 2026-03-18 edits to AdaptixC2: compiler flags for the C++ beacon, 29 renamed Go functions with new build flags, a YARA rule breakdown and verification commands.

Does renaming the Go functions change the agent protocol?

No. The names are internal, command handling stays the same, and only the call in main.go moved to DataProc.

Source text

modifications_summary.md · MIT
## AdaptixC2 Evasion Modifications Summary

### Date: 2026-03-18
### Target: AdaptixC2 Framework

---

## Detection Rules Analyzed

### YARA Rules

| Rule File | Author | Patterns | Target |
|-----------|--------|----------|--------|
| Windows_Trojan_Adaptix_2779784c.yar | Elastic Security | 2 hex patterns | C++ Beacon |
| Windows_Trojan_Adaptix_b2cda978.yar | Elastic Security | 5 hex patterns | C++ Beacon |
| Adaptix_Beacon.yar | bartblaze | 24 string patterns | Go Agent |
| AdaptixBeacon_CAPE.yar | enzok/CAPE | 7 hex patterns | C++ Beacon |
| adaptixC2_yara.yar | nembo81 | 5 string/regex patterns | Network |

---

## Modifications Applied

### 1. C++ Beacon Agent (beacon_agent/src_beacon)

**File Modified:** `Makefile`

**Changes:**
- Added additional evasion compiler flags to change code generation patterns
- Added `-fno-inline-functions-small`
- Added `-fno-inline-functions-called-once`
- Added `-fno-expensive-optimizations`
- Added `-fno-tree-loop-vectorize`
- Added `-fno-tree-slp-vectorize`
- Added `-fno-tree-vect-loop-version`
- Moved `-fno-unwind-tables` and `-fno-asynchronous-unwind-tables` to EVASION_FLAGS

**Rationale:**
The Elastic YARA rules detect specific hex patterns generated by the compiler. These flags change instruction ordering, stack allocation patterns, and function inlining behavior, which alters the compiled binary's hex signatures.

---

### 2. Go Agent (gopher_agent/src_gopher)

#### 2.1 Function Renaming (tasks.go)

**Rationale:** The bartblaze YARA rule detects Go function names embedded in the binary's symbol table. Renaming functions breaks this detection.

| Original Function | New Function | Purpose |
|-------------------|--------------|---------|
| `CmdProc` | `DataProc` | Main command processor |
| `jobGetFile` | `xferGet` | File download job |
| `jobExec` | `runExec` | Command execution job |
| `jobExecObjAsync` | `runObjAsync` | Async BOF execution |
| `jobSock` | `runSock` | Tunnel socket job |
| `jobShell` | `runShell` | Terminal shell job |
| `fRead` | `opRead` | Read file operation |
| `fChdir` | `opChdir` | Change directory |
| `fCopy` | `opCopy` | Copy file |
| `fExecObj` | `opExecObj` | Execute BOF |
| `fTerm` | `opTerm` | Terminate agent |
| `fListJobs` | `opListJobs` | List running jobs |
| `fStopJob` | `opStopJob` | Stop a job |
| `fKillProc` | `opKillProc` | Kill process |
| `fList` | `opList` | List directory |
| `fMkDir` | `opMkDir` | Make directory |
| `fMove` | `opMove` | Move file |
| `fProcs` | `opProcs` | List processes |
| `fCwd` | `opCwd` | Get current directory |
| `fRevert` | `opRevert` | Revert token |
| `fRemove` | `opRemove` | Remove file |
| `fCapture` | `opCapture` | Screenshot |
| `fExec` | `opExec` | Execute command |
| `fStopTerm` | `opStopTerm` | Stop terminal |
| `fStopTun` | `opStopTun` | Stop tunnel |
| `fPauseTun` | `opPauseTun` | Pause tunnel |
| `fResumeTun` | `opResumeTun` | Resume tunnel |
| `fWrite` | `opWrite` | Write file |
| `fArchive` | `opArchive` | Archive files |

#### 2.2 Makefile Modification

**File Modified:** `Makefile`

**Changes:**
- Added `-buildmode=pie` for position-independent executable (PIE)
- Added `-buildid=` to remove build ID
- Added `-H=windowsgui` for Windows builds to hide console

**Rationale:** PIE builds change the binary structure and symbol layout. Removing build IDs eliminates unique identifiers.

#### 2.3 Main Entry Point Update (main.go)

**Change:** Updated call from `CmdProc` to `DataProc`

---

## Files Modified

| File | Changes |
|------|---------|
| beacon_agent/src_beacon/Makefile | Compiler flag modifications |
| gopher_agent/src_gopher/tasks.go | 29 function renames |
| gopher_agent/src_gopher/main.go | Updated function call |
| gopher_agent/src_gopher/Makefile | Build flag modifications |

---

## Evasion Results by Rule

### Windows_Trojan_Adaptix_2779784c.yar
- **Status:** EVADABLE via compiler flags
- **Patterns:** 2 hex patterns (function prologues)
- **Method:** Modified compiler flags change instruction ordering

### Windows_Trojan_Adaptix_b2cda978.yar
- **Status:** EVADABLE via compiler flags
- **Patterns:** 5 hex patterns (instruction sequences)
- **Method:** Modified compiler flags change code generation

### Adaptix_Beacon.yar
- **Status:** EVADABLE via function renaming
- **Patterns:** 24 string patterns (Go function names)
- **Method:** All 29 functions renamed to generic names

### AdaptixBeacon_CAPE.yar
- **Status:** PARTIALLY EVADABLE
- **Patterns:** 5 config hex patterns + 2 wininet patterns
- **Method:** 
  - Config patterns: Compiler flags can evade
  - Wininet patterns: Already obfuscated in source (HdChrA function)

### adaptixC2_yara.yar
- **Status:** REQUIRES INVESTIGATION
- **Patterns:** "AdaptixC2", "X-Beacon-Id", regex header pattern
- **Method:** 
  - "AdaptixC2" - Found only in server/client code, not in implant binaries
  - "X-Beacon-Id" - Header name configurable in HTTP listener
  - Generic patterns (Mozilla/5.0, POST /) - Too common to evade

---

## Verification Commands

### Verify Go function names removed:
```bash
strings agent.exe | grep -E "TaskProcess|jobRun|taskCat|taskKill|taskExec"
# Should return nothing
```

### Verify new function names exist:
```bash
strings agent.exe | grep -E "DataProc|xferGet|runExec|opRead|opKill"
# Should show new function names
```

### Verify hex patterns changed (beacon):
```bash
xxd beacon.exe | grep -i "4881eca8 01"
xxd beacon.exe | grep -i "4883ec58"
# Patterns should not match after recompile
```

---

## Notes

1. **Rebuild Required:** All changes require recompiling the implants to take effect.

2. **Server Components:** No modifications were made to server components (AdaptixClient, AdaptixServer) as these are not deployed to targets.

3. **Backward Compatibility:** The function renaming in Go agent is internal only. The protocol and command handling remain unchanged.

4. **HTTP Headers:** The "X-Beacon-Id" header is configured in the listener config (hb_header field), not hardcoded in the beacon. Users should customize this in their listener configuration.

5. **coffer.Load Pattern:** The YARA rule mentions "coffer.Load" but this was not found in the source code. It may be from an older version or different branch.

© 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 — a Claude rule that fixes the shape of a change log for tool modifications: build metadata, log strings, filenames, and which detections still fire. 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 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 memory-forensics Dávid Balatoni The memory-forensics skill covers RAM capture and memory-dump analysis, including process review, injection checks, network traces, and malware artifacts. CX Codex +1 11,027installs ctf-malware ljagiello ctf-malware — a skill for analysing malware samples and network traffic in CTF challenges. It covers obfuscated scripts, PE and .NET files, PCAP captures, and C2 protocols. CX Codex +1 9,500installs yara-rule-authoring trailofbits yara-rule-authoring is a Claude Code skill that authors and reviews YARA-X malware detection rules, flagging weak atoms and conditions that trigger on clean files. CX Codex +1 5,700installs 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 Reversecore MCP sjkim1127 Reversecore MCP brings 177 security utilities to your coding assistant for binary analysis, memory forensics, and vulnerability research. CX Codex +1 ★ 224repo stars

From the same set22

The whole set →
rule_inventory 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. 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 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 modifications_summary 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. 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

Project sponsors

Companies that keep this analytics open