tools_evasion — команда для Claude Code: анализ и установка
Команда tools_evasion разбирает инструмент для тестирования на проникновение, ищет правила обнаружения и меняет исходный код, чтобы обойти их. Предназначена для авторизованных проверок безопасности.
MIT ★ 336 обновлён 2026-04-09
.claude/commands/tools_evasion.mdЧто делает tools_evasion
Команда изучает документацию и исходники инструмента, формирует его профиль и собирает правила обнаружения, включая YARA и Sigma. Затем она сопоставляет шаблоны правил с кодом и сохраняет анализ и перечень найденных правил в rules/{tool_name}/.
После анализа команда меняет исходники, сначала проверяя настройки компилятора и сборки. Она проверяет компиляцию, но не запускает изменённый инструмент; изменения должны сохранять его функциональность. Работа ограничена путём, который передал пользователь, а результаты включают отчёт о внесённых изменениях и рисках обнаружения. Используйте команду только для авторизованных исследований безопасности.
Какие задачи решает
- составить профиль инструмента для тестирования на проникновение
- найти правила обнаружения и связать их с участками исходного кода
- собрать правила по типам в отдельные каталоги
- изменить исходники для обхода обнаружения и проверить компиляцию
- зафиксировать изменения и оставшиеся признаки обнаружения в отчёте
Примеры запросов агенту
- Проанализируй инструмент в
./toolи подготовь отчёт об изменениях для авторизованного тестирования. - Проверь исходники в
./scanner, найди связанные правила обнаружения и выполни анализ с помощью/tools_evasion ./scanner. - Составь профиль инструмента по пути
./appи сохрани результаты в структуреrules/.
Как установить tools_evasion
Вручную: положить файлы
.claude/commands/tools_evasion.mdВызов — /tools_evasion. Для всех проектов — ~/.claude/commands/
Вручную: положить файлы
~/.codex/prompts/tools_evasion.mdВызов — /prompts:tools_evasion. В Codex этот формат помечен устаревшим, замена — скиллы
Вручную: положить файлы
.github/prompts/tools_evasion.prompt.mdВручную: положить файлы
.gemini/commands/tools_evasion.tomlGemini хранит команды в TOML: текст запроса — в поле prompt
Вопросы о tools_evasion
Как установить tools_evasion в Claude Code?
Сохраните файл команды по пути .claude/commands/tools_evasion.md. После этого вызовите /tools_evasion <tool_path>, указав путь к файлу или каталогу инструмента.
Что делает tools_evasion?
Команда анализирует исходники и правила обнаружения, затем модифицирует код для обхода этих правил. Она проверяет компиляцию, но не запускает изменённый инструмент.
Какой путь нужно передать tools_evasion?
Укажите путь к каталогу или файлу инструмента для тестирования на проникновение. Команда ограничивает изменения переданным путём.
Исходный текст
tools_evasion.md · MIT
---
name: tools_evasion
description: Analyze penetration testing tools and modify source code to evade detection. Usage: /tools_evasion <tool_path>
arguments:
- name: tool_path
description: Path to the penetration testing tool directory or file
required: true
---
You are tasked with analyzing a penetration testing tool and modifying its source code to evade detection.
## Input
Tool Path: {{tool_path}}
## Workflow
Follow these phases in order:
### Phase 1: Tool Understanding
1. Read README and documentation files
2. Analyze source code structure
3. Identify programming language and build system
4. Determine tool purpose and use cases
5. Create tool profile at `rules/{tool_name}/tool_profile.md`
### Phase 2: Open Source Detection (if applicable)
1. Check if the tool is open source
2. Extract keywords (name, author, features)
3. Search GitHub for tool-specific detection rules
4. Save found rules to `rules/{tool_name}/yara/`, `rules/{tool_name}/sigma/`, etc.
### Phase 3: Behavior Analysis
1. Analyze source code for core behavior patterns:
- Network behavior (HTTP headers, URLs, ports)
- Process behavior (creation, injection)
- File behavior (paths, operations)
- API usage patterns
- String constants
2. Extract behavioral signatures
3. Search for behavior-based detection rules
4. Save found rules
### Phase 4: Rule Collection
1. Organize all found rules
2. Create rule inventory at `rules/{tool_name}/rule_inventory.md`
3. Categorize by type (YARA, Sigma, Network, etc.)
### Phase 5: Per-Rule Analysis
For EACH detection rule found:
1. Parse all patterns (strings, hex, regex)
2. Identify pattern sources in the tool code
3. Develop evasion strategies (prioritize compiler flags)
4. Create analysis file at `rules/{tool_name}/rule_analysis/{rule_name}.md`
### Phase 6: Source Modification
**CRITICAL: Directly modify source files using Edit tool.**
1. FIRST: Try build configuration changes (compiler flags)
2. SECOND: Apply source code modifications if needed
3. Create tasks for each modification
4. Verify each change
Modification priority:
1. Compiler flags (lowest effort, highest impact)
2. Build configuration
3. String obfuscation
4. API obfuscation
5. Function rename
6. Behavior change (last resort)
### Phase 7: Verification & Summary
1. Verify all patterns are removed from source
2. Test compilation (do NOT run the tool)
3. Create final report at `rules/{tool_name}/modifications_summary.md` including:
- Tool profile
- Rules analyzed
- Modifications applied
- Unevadable items with reasons
- Detection risk assessment
- Recommendations
## Output Directory Structure
```
rules/{tool_name}/
├── yara/
│ └── *.yar
├── sigma/
│ └── *.yml
├── network/
│ └── *.rules
├── other_rules/
├── tool_profile.md
├── behavior_analysis.md
├── rule_inventory.md
├── rule_analysis/
│ └── *.md
└── modifications_summary.md
```
## Important Rules
1. **NEVER skip a rule** - Every detection rule must have an analysis
2. **ALWAYS try compiler flags first** - Lowest effort, highest impact
3. **ONLY modify code in user-provided path** - Never touch other files
4. **PRESERVE functionality** - Tool must work after modification
5. **NEVER run/test modified tools** - Compilation success is sufficient
6. **Document everything** - All changes must be recorded
7. **Report unevadable items** - Explain why evasion is not possible
8. **Direct modification** - Use Edit tool directly, don't just document
## Authorization
This is for authorized security research only:
- Red team assessments with proper authorization
- Security product testing
- Defensive security research
© JDArmy · MIT · JDArmy/Evasion-SubAgents