init-target

star 10

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.

fb0sh By fb0sh schedule Updated 5/28/2026

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-target or suggested automatically

Process

Step 1: Validate Target

  1. Ask user to confirm the target IP or domain (if not already confirmed via ROLE.md workflow)
  2. 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

  1. Check if container kali-target-${IP} already exists:
    docker ps -a --filter "name=kali-target-${IP}" --format "{{.Names}}"
    
  2. If container doesn't exist, create it:
    docker run -d --name kali-target-${IP} kalilinux/kali-rolling sleep infinity
    
  3. If container exists but is stopped, start it:
    docker start kali-target-${IP}
    
  4. Verify container is running and can reach the target:
    docker exec kali-target-${IP} ping -c 2 ${IP}
    
  5. If the host machine is already Kali Linux, skip container creation entirely

Step 5: Check Proxy (if needed)

  1. If target ping fails, check if proxy is configured in .pentester/proxy/
  2. If proxy exists, configure it inside the container
  3. If no proxy and network fails, ask user about proxy setup
  4. Validate proxy by testing connectivity to cn.bing.com and google.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 created
  • target/${IP}/scope.md written with scope parameters
  • Docker container kali-target-${IP} running and network-verified
  • Inform user that target is ready for Phase 1 (Intelligence Gathering)
Install via CLI
npx skills add https://github.com/fb0sh/pentester --skill init-target
Repository Details
star Stars 10
call_split Forks 1
navigation Branch main
article Path SKILL.md
More from Creator