name: init-target description: Initialize target directory structure and Docker container for a new penetration test target. Manually triggered via /pentester:init-target or auto-suggested when a new target IP is provided.
Initialize Target
This skill sets up the working directory structure and Docker container for a new penetration test target.
When to Use
- User provides a new target IP/domain that doesn't have a
target/${IP}/directory yet - At the start of Phase 0 (Pre-engagement) after scope is confirmed
- Can be invoked manually via
/pentester:init-targetor suggested automatically
Process
Step 1: Validate Target
- Ask user to confirm the target IP or domain (if not already confirmed via ROLE.md workflow)
- Check if
target/${IP}/directory already exists:- If yes, inform user and ask whether to continue with existing data or reset
- If no, proceed to Step 2
Step 2: Create Directory Structure
Create the following directories:
target/${IP}/
├── ports/ # nmap and port scan results
├── services/ # per-service enumeration data
├── vulns/ # verified vulnerabilities with PoC
│ └── scanner_raw/ # raw scanner outputs
└── evidence/ # screenshots, captured files
Step 3: Create Scope File
Write target/${IP}/scope.md with the confirmed parameters:
# Target: ${IP}
- **IP/Domain**: ${IP}
- **Test Type**: [black-box / gray-box / white-box]
- **Scope**: [what's in scope]
- **Authorization**: Confirmed by user on [date]
- **Container**: kali-target-${IP}
Step 4: Setup Docker Container
- Check if container
kali-target-${IP}already exists:docker ps -a --filter "name=kali-target-${IP}" --format "{{.Names}}" - If container doesn't exist, create it:
docker run -d --name kali-target-${IP} kalilinux/kali-rolling sleep infinity - If container exists but is stopped, start it:
docker start kali-target-${IP} - Verify container is running and can reach the target:
docker exec kali-target-${IP} ping -c 2 ${IP} - If the host machine is already Kali Linux, skip container creation entirely
Step 5: Check Proxy (if needed)
- If target ping fails, check if proxy is configured in
.pentester/proxy/ - If proxy exists, configure it inside the container
- If no proxy and network fails, ask user about proxy setup
- Validate proxy by testing connectivity to
cn.bing.comandgoogle.com
Step 6: Install Base Tools
Install essential tools inside the container (if not already present):
docker exec kali-target-${IP} bash -c "apt update && apt install -y nmap nikto whatweb gobuster sqlmap enum4linux smbclient"
Additional tools are installed on-demand during later phases.
Output
target/${IP}/directory structure createdtarget/${IP}/scope.mdwritten with scope parameters- Docker container
kali-target-${IP}running and network-verified - Inform user that target is ready for Phase 1 (Intelligence Gathering)