IoM Automated Penetration Testing
Autonomous penetration testing via IoM MCP tools. The core methodology is the OODA Loop — Observe, Orient, Decide, Act — adapting to the actual environment and user intent.
Intent Recognition and Interaction
This skill does not rely on fixed keywords or rigid phase workflows. It interprets the user's natural language to understand intent and flexibly combines capabilities to accomplish the task.
When intent is clear: Formulate an execution plan directly, present it to the user for confirmation, then execute.
When intent is ambiguous: Proactively ask the user to clarify the objective. For example:
- User says "work on this machine" — Ask: Do you need privilege escalation, credential harvesting, or a full reconnaissance sweep?
- User says "check things out" — Could be a situational overview or targeted reconnaissance on a specific session; confirm the scope.
- User provides a session ID with no further instructions — Ask what the objective is.
Plan presentation: For any non-read-only operation, output an execution plan (including the commands to run, targets, and risk assessment) and wait for user confirmation before proceeding.
HITL (Human-in-the-Loop) Rules
The need for user confirmation depends on the sensitivity of the operation:
No Confirmation Required (Read-Only / Information Gathering)
- Viewing session, listener, and pipeline status
- System information gathering:
sysinfo, whoami, privs, ps, ipconfig, netstat
- Environment enumeration:
enum av, enum software, systeminfo
- Network discovery:
pingscan, portscan
- Domain information queries:
ldapsearch, klist, enum dc
Confirmation Required (Alters Target State or Carries Detection Risk)
- Privilege escalation (UAC bypass, Potato, kernel exploits)
- Credential extraction (hashdump, logonpasswords, mimikatz, nanodump)
- Lateral movement (psexec, wmi, dcom, ptt)
- Persistence installation (registry, service, scheduled task)
- Any operation that writes files, creates processes, or modifies configuration
OPSEC Score Alerts
Each technique carries an OPSEC safety score (1-10; higher is safer):
- >= 8: Listed normally in the plan
- 6-8: Risk level annotated in the plan
- < 6: Mandatory separate alert explaining the risk and recommending a safer alternative
MCP Tools and Progressive Discovery
IoM has hundreds of commands — do not guess command usage. Use progressive discovery to retrieve information on demand:
- Search for commands —
search_commands performs a fuzzy keyword search and returns command summaries (name, group, description, OPSEC score)
- View usage —
execute_command("<cmd> --help") retrieves the specific command's parameters and examples
- Execute the command — Only run the command via
execute_command after confirming usage
Available MCP Tools
| Tool |
Purpose |
search_commands |
Fuzzy search commands by name/description; returns lightweight summaries |
execute_command |
Execute any client/implant command; automatically waits for results |
get_history |
Retrieve historical task output |
Basic Operations
- Switch session:
execute_command("use <session_id_prefix>") — enters the implant context
- Implant commands: After switching, execute
sysinfo, whoami, ps, etc. directly
- Client commands:
session, listener, pipeline list, etc. do not require a session context
- Task results:
execute_command automatically waits and returns results
Example: Progressive Discovery Workflow
# 1. Unsure which privilege escalation commands exist — search
search_commands("uac")
search_commands("elevate")
# 2. Found uac-bypass command — view detailed usage
execute_command("uac-bypass --help")
# 3. Understood the parameters — execute
execute_command("uac-bypass elevatedcom \"C:\\path\\to\\implant.exe\"")
Core Principles
- Observe before acting — Never execute blindly; adjust strategy based on environmental data
- OPSEC first — Identify defenses before selecting evasion techniques. See reference/opsec-guide.md
- Pivot on failure — If a technique is blocked, mark it and switch paths; never retry the same technique
- Minimum footprint — Prefer BOF over execute_assembly; avoid writing to disk when possible
- Respect user decisions — Present a plan and wait for confirmation on sensitive operations; offer alternatives if the user declines
Capability Reference
Consult the appropriate reference document based on user intent:
| Scenario |
Reference File |
Key Sections |
| Global situational awareness |
reference/phase-summary.md |
|
| Target reconnaissance and environment enumeration |
reference/phase-recon.md |
|
| Privilege escalation |
reference/phase-privesc.md |
UAC: technique-reference.md#uac-bypass, Potato: technique-reference.md#potato-privilege-escalation, Kernel: technique-reference.md#kernel-exploits |
| Credential harvesting |
reference/phase-creds.md |
technique-reference.md#credential-harvesting |
| Lateral movement |
reference/phase-lateral.md |
technique-reference.md#lateral-movement |
| Persistence |
reference/phase-persist.md |
technique-reference.md#persistence |
| OPSEC strategy and AV evasion |
reference/opsec-guide.md |
opsec-guide.md#execution-method-selection, opsec-guide.md#strategy-matrix |
| Technique quick reference |
reference/technique-reference.md |
|
Output Report
Upon task completion, generate a structured report:
## Penetration Test Report
**Date**: YYYY-MM-DD HH:MM
**Target**: [session / host operated on]
**Summary**: [what was actually performed]
### Attack Path
[The actual execution path taken]
### Session Inventory
| Session | Host | User | Privilege | Obtained Via |
|---------|------|------|-----------|-------------|
### Harvested Credentials
| Type | User | Domain | Source |
|------|------|--------|--------|
### Techniques Used
| MITRE ID | Technique | OPSEC | Result | Notes |
|----------|-----------|-------|--------|-------|
### Defensive Gaps
[Which weaknesses enabled the attack to succeed]
1---2name: iom-pentest3description: Autonomous penetration testing via IoM C2 MCP tools. Adaptively executes based on user intent: situational awareness, reconnaissance, privilege escalation, credential harvesting, lateral movement, persistence, and more. Presents an execution plan and waits for user confirmation before sensitive operations. Trigger conditions: user mentions penetration testing, red team, post-exploitation, privilege escalation, lateral movement, credentials, persistence, situational awareness, or any scenario involving security assessment of a target through IoM.4---56# IoM Automated Penetration Testing78Autonomous penetration testing via IoM MCP tools. The core methodology is the **OODA Loop** — Observe, Orient, Decide, Act — adapting to the actual environment and user intent.910## Intent Recognition and Interaction1112This skill does not rely on fixed keywords or rigid phase workflows. It interprets the user's natural language to understand intent and flexibly combines capabilities to accomplish the task.1314**When intent is clear**: Formulate an execution plan directly, present it to the user for confirmation, then execute.1516**When intent is ambiguous**: Proactively ask the user to clarify the objective. For example:1718- User says "work on this machine" — Ask: Do you need privilege escalation, credential harvesting, or a full reconnaissance sweep?19- User says "check things out" — Could be a situational overview or targeted reconnaissance on a specific session; confirm the scope.20- User provides a session ID with no further instructions — Ask what the objective is.2122**Plan presentation**: For any non-read-only operation, output an execution plan (including the commands to run, targets, and risk assessment) and wait for user confirmation before proceeding.2324## HITL (Human-in-the-Loop) Rules2526The need for user confirmation depends on the sensitivity of the operation:2728### No Confirmation Required (Read-Only / Information Gathering)2930- Viewing session, listener, and pipeline status31- System information gathering: `sysinfo`, `whoami`, `privs`, `ps`, `ipconfig`, `netstat`32- Environment enumeration: `enum av`, `enum software`, `systeminfo`33- Network discovery: `pingscan`, `portscan`34- Domain information queries: `ldapsearch`, `klist`, `enum dc`3536### Confirmation Required (Alters Target State or Carries Detection Risk)3738- Privilege escalation (UAC bypass, Potato, kernel exploits)39- Credential extraction (hashdump, logonpasswords, mimikatz, nanodump)40- Lateral movement (psexec, wmi, dcom, ptt)41- Persistence installation (registry, service, scheduled task)42- Any operation that writes files, creates processes, or modifies configuration4344### OPSEC Score Alerts45Each technique carries an OPSEC safety score (1-10; higher is safer):4647- **>= 8**: Listed normally in the plan48- **6-8**: **Risk level annotated** in the plan49- **< 6**: **Mandatory separate alert** explaining the risk and recommending a safer alternative5051## MCP Tools and Progressive Discovery5253IoM has hundreds of commands — do not guess command usage. Use **progressive discovery** to retrieve information on demand:54551. **Search for commands** — `search_commands` performs a fuzzy keyword search and returns command summaries (name, group, description, OPSEC score)562. **View usage** — `execute_command("<cmd> --help")` retrieves the specific command's parameters and examples573. **Execute the command** — Only run the command via `execute_command` after confirming usage5859### Available MCP Tools6061| Tool | Purpose |62|------|---------|63| `search_commands` | Fuzzy search commands by name/description; returns lightweight summaries |64| `execute_command` | Execute any client/implant command; automatically waits for results |65| `get_history` | Retrieve historical task output |6667### Basic Operations6869- **Switch session**: `execute_command("use <session_id_prefix>")` — enters the implant context70- **Implant commands**: After switching, execute `sysinfo`, `whoami`, `ps`, etc. directly71- **Client commands**: `session`, `listener`, `pipeline list`, etc. do not require a session context72- **Task results**: `execute_command` automatically waits and returns results7374### Example: Progressive Discovery Workflow7576```77# 1. Unsure which privilege escalation commands exist — search78search_commands("uac")79search_commands("elevate")8081# 2. Found uac-bypass command — view detailed usage82execute_command("uac-bypass --help")8384# 3. Understood the parameters — execute85execute_command("uac-bypass elevatedcom \"C:\\path\\to\\implant.exe\"")86```8788## Core Principles89901. **Observe before acting** — Never execute blindly; adjust strategy based on environmental data912. **OPSEC first** — Identify defenses before selecting evasion techniques. See [reference/opsec-guide.md](reference/opsec-guide.md)923. **Pivot on failure** — If a technique is blocked, mark it and switch paths; never retry the same technique934. **Minimum footprint** — Prefer BOF over execute_assembly; avoid writing to disk when possible945. **Respect user decisions** — Present a plan and wait for confirmation on sensitive operations; offer alternatives if the user declines9596## Capability Reference9798Consult the appropriate reference document based on user intent:99100| Scenario | Reference File | Key Sections |101|----------|---------------|--------------|102| Global situational awareness | [reference/phase-summary.md](reference/phase-summary.md) | |103| Target reconnaissance and environment enumeration | [reference/phase-recon.md](reference/phase-recon.md) | |104| Privilege escalation | [reference/phase-privesc.md](reference/phase-privesc.md) | UAC: [technique-reference.md#uac-bypass](reference/technique-reference.md#uac-bypass), Potato: [technique-reference.md#potato-privilege-escalation](reference/technique-reference.md#potato-privilege-escalation), Kernel: [technique-reference.md#kernel-exploits](reference/technique-reference.md#kernel-exploits) |105| Credential harvesting | [reference/phase-creds.md](reference/phase-creds.md) | [technique-reference.md#credential-harvesting](reference/technique-reference.md#credential-harvesting) |106| Lateral movement | [reference/phase-lateral.md](reference/phase-lateral.md) | [technique-reference.md#lateral-movement](reference/technique-reference.md#lateral-movement) |107| Persistence | [reference/phase-persist.md](reference/phase-persist.md) | [technique-reference.md#persistence](reference/technique-reference.md#persistence) |108| OPSEC strategy and AV evasion | [reference/opsec-guide.md](reference/opsec-guide.md) | [opsec-guide.md#execution-method-selection](reference/opsec-guide.md#execution-method-selection), [opsec-guide.md#strategy-matrix](reference/opsec-guide.md#strategy-matrix) |109| Technique quick reference | [reference/technique-reference.md](reference/technique-reference.md) | |110111## Output Report112113Upon task completion, generate a structured report:114115```markdown116## Penetration Test Report117**Date**: YYYY-MM-DD HH:MM118**Target**: [session / host operated on]119**Summary**: [what was actually performed]120121### Attack Path122[The actual execution path taken]123124### Session Inventory125| Session | Host | User | Privilege | Obtained Via |126|---------|------|------|-----------|-------------|127128### Harvested Credentials129| Type | User | Domain | Source |130|------|------|--------|--------|131132### Techniques Used133| MITRE ID | Technique | OPSEC | Result | Notes |134|----------|-----------|-------|--------|-------|135136### Defensive Gaps137[Which weaknesses enabled the attack to succeed]138```