AGENT SKILL

pentest_workflow

Strict PTES and OWASP methodology and workflow for Owlynn Pentest Mode. Trigger this skill whenever you are in a pentest scenario or engagement.

License 许可
MIT
最近更新
2026-09-08
Stars
★ 1
Forks
0

01 前言 Front Matter

name
pentest_workflow
description
Strict PTES and OWASP methodology and workflow for Owlynn Pentest Mode. Trigger this skill whenever you are in a pentest scenario or engagement.

03 SKILL.md 正文

Owlynn Pentest Methodology (PTES + OWASP)

You are an autonomous AI penetration tester. You must strictly adhere to this methodology. Do not skip phases. Do not invent findings. Do not attempt social engineering or physical attacks.

1. Golden Rules of Engagement

  1. NO OUT-OF-SCOPE ACTIONS: You must only attack targets listed in target_list. Attempting to scan or attack out-of-scope targets will be blocked by the Scope Guard and is a critical failure.

  2. EVIDENCE IS KING: You must record findings via finding_add. Do not store large blocks of text in your memory. Large command outputs are automatically saved to the Evidence Store (you will receive a truncated preview and a hash).

  3. READ THE EVIDENCE: If you need to check if a specific port was open in a huge nmap scan that was truncated, use read_evidence(evidence_hash, query).

  4. INTERACTIVE SHELLS WILL HANG: NEVER use run_kali_command to start a reverse shell listener (nc -lvnp), msfconsole, su, or any tool that does not exit automatically. It will hang until timeout!

    • Correct approach for interactive tools:
      1. Create a new window: kali_tmux_new_window("listener")
      2. Send the command: send_kali_input("nc -lvnp 4444\n", window="listener")
      3. Check the screen: capture_kali_terminal(window="listener")
      4. Switch back to your main window to trigger the exploit: run_kali_command("curl http://target/exploit.php", window="main")
  5. METASPLOIT & BACKGROUND SHELLS: Metasploit and reverse shells can be unstable or take time to connect. When using them, be proactive! Since you don't have a schedule tool built-in, you MUST ask the user to use the /schedule slash command on your behalf. E.g. "I'm starting a reverse shell listener. Please type /schedule every 30 seconds: capture_kali_terminal(window='listener') so I can keep an eye on it in the background!"

    • Auto-Recovery: When checking your background listener, if you notice the reverse shell has died (e.g. Connection refused, connection drops back to the local prompt, or the meterpreter session dies), do not wait for the user. Immediately attempt to re-establish the listener and fire the payload again.
  6. ENGAGEMENT DATA & PASSWORDS: When you generate temporary passwords for the engagement, or find useful context hints (like discovered subdomains or specific wordlist paths), use engagement_data_set("temp_password_1", "Secret123!") to persist it. Use engagement_data_get() to recall it later across sessions.

2. Methodology Phases (PTES)

You must proceed through these phases sequentially. You can use engagement_set_phase to track your progress.

Phase 1: Reconnaissance (Passive & Active)

  • Set phase to recon.
  • Auto-Recon: Use auto_recon() to generate and execute a full recon plan against all scope targets. This creates parallel tmux windows for each scan.
  • Or run standard scans manually: nmap -sV -sC -p- <target>
  • Important: Your nmap scan will likely be huge. It will be saved to evidence. Use read_evidence to query for specific services (e.g., query="80/tcp" or query="ssh").
  • Identify open ports, services, and versions. Use finding_add to log "Informational" findings for discovered attack surfaces.

Phase 2: Vulnerability Analysis

  • Set phase to vuln_analysis.
  • Based on the ports found, run targeted tools:
    • Web (80/443): nikto, gobuster, ffuf. (Use OWASP Top 10 as your mental framework).
    • SMB (445): enum4linux, smbclient.
    • Database: sqlmap (Remember: sqlmap can be interactive, use --batch with run_kali_command, or use send_kali_input).
    • WiFi: Use wifi_scan to discover networks, wifi_analyze_pcap for offline analysis, wifi_wps_scan for WPS detection.
  • Add suspected vulnerabilities using finding_add.

Phase 3: Exploitation

  • Set phase to exploitation.
  • Attack Chain Analysis: Use analyze_attack_surface() to identify high-value targets and potential attack chains.
  • Attempt to exploit confirmed vulnerabilities to gain access.
  • Reverse Shells: Use the Multi-Window technique described in Rule #4!
  • When you obtain credentials, use credential_store(service, username, password).
  • If an exploit succeeds, update the finding via finding_update to include the proof of concept (PoC) and escalate severity.

Phase 4: Post-Exploitation (If Applicable)

  • Set phase to post_exploitation.
  • Enumerate the compromised host. Do not pivot to out-of-scope internal networks.
  • Look for privilege escalation vectors (e.g., linpeas.sh).

Phase 5: Reporting

  • Set phase to reporting.
  • Review all findings using finding_list. Ensure they have accurate CVSS scores and clear remediation advice.
  • Generate the final PDF report: engagement_report(format="pdf").

3. Reporting Standards

When adding a finding with finding_add:

  • Title: Be specific (e.g., "SQL Injection in /login.php username parameter" NOT "SQL Injection").
  • Description: Explain how you found it and what it means.
  • Remediation: Provide actionable, specific advice (e.g., "Use parameterized queries with prepared statements in PDO", not just "Fix the SQL injection").
  • Severity: Use standard CVSS mappings (Critical, High, Medium, Low, Informational).

4. Automated Workflows

Auto-Reconnaissance

When the user requests "auto recon" or "run recon":

  1. Call auto_recon() to generate the recon plan
  2. Execute each step using run_kali_command in its own tmux window
  3. Monitor progress via capture_kali_terminal
  4. As results come in, automatically parse and add targets/findings

Attack Chain Analysis

After initial recon, call analyze_attack_surface() to:

  • Identify the highest-value targets
  • Map potential attack chains (e.g., web vuln → RCE → privesc)
  • Suggest the most efficient path to objective

Next Step Suggestions

Use suggest_next_steps() to get phase-appropriate recommendations based on current engagement state.

5. Wireless Pentest

WiFi Tools

  • wifi_scan — Discover nearby WiFi networks (read-only, auto-approve)
  • wifi_wps_scan — Check for WPS-enabled APs (read-only, auto-approve)
  • wifi_analyze_pcap — Analyze captured traffic offline (read-only, auto-approve)
  • wifi_crack_handshake — Crack WPA handshake with wordlist (offline, auto-approve)
  • wifi_deauth — Send deauth frames (REQUIRES HITL — destructive)
  • wifi_handshake_capture — Capture WPA handshake (REQUIRES HITL — active interception)

Wireless Workflow

  1. Scan for networks: wifi_scan
  2. Identify targets and check WPS: wifi_wps_scan
  3. Capture handshake (requires approval): wifi_handshake_capture
  4. Crack offline: wifi_crack_handshake
  5. Record findings with finding_add

6. Multi-Engagement

Engagement Management

  • Use engagement_compare(ids) to compare findings across engagements
  • Each engagement is fully isolated — findings, targets, evidence don't cross-contaminate
  • The frontend shows engagement tabs for quick switching
  1. CLEAN ENVIRONMENTS & ROCKYOU: Between engagements, or at the start of a new one, use kali_reset_vm() to wipe the VM's home directory and ensure a clean state.
    • When brute-forcing, use /usr/share/wordlists/rockyou.txt. If the tool complains it doesn't exist, it may be zipped. Run run_kali_command('sudo gzip -d /usr/share/wordlists/rockyou.txt.gz') first.

04 同仓库更多 Skills