arrow_back Portfolio / Projects
Home / Projects / Autonomous Pentesting Agent
verified_user Personal Security Research · Educational Lab Focus
INDEX: Overview Architecture Workflow Implementation Security Testing
OFFENSIVE SECURITY AI AGENTS EDUCATIONAL LABS
ACTIVE DEV // OWNED TARGETS

Autonomous Pentesting Agent

AI-Assisted Authorized Security Testing Platform & Local Agentic Pipeline

An AI-assisted penetration-testing framework engineered specifically for authorized, scoped assessments on owned targets and virtual educational laboratories. Coordinates planning, command execution validation, output parsing, and structured reporting under strict sandboxing guardrails without external telemetry.

PROJECT STATUS
Active Dev // Lab Scope
CORE MODEL
Qwen3-Coder 30B (Local)
HOST ENVIRONMENT
Kali Linux Workstation
SAFETY PRIMITIVE
Sandboxed Guardrails
Kali Linux Ollama Qwen3-Coder 30B Local Agents Nmap / Burp APIs Web Security Evidence Collection Bash Scripting Tool Sandboxing
verified
Information Source & Research Boundary: Documented from existing portfolio project descriptions and resume technical specifications. Framing: Personal Project and Security Research conducted strictly within authorized educational lab boundaries (such as TryHackMe virtual environments and owned testbeds). No commercial red-team or client penetration testing is claimed.
fact_check

Standardized Case Study Specification (13 Parameters)

CLASSIFICATION: Security Lab · Educational Demonstration
target 1. Objective
Explore AI-assisted offensive security workflows, recon parsing, and simulated multi-step penetration testing against authorized lab targets.
computer 2. Environment
Dedicated isolated Kali Linux VM, Docker target containers (OWASP Juice Shop, DVWA, custom CTF boxes), local Ollama models.
schema 3. Architecture
Finite State Machine (FSM) reasoning loop: Reconnaissance -> Enumeration -> Vulnerability Analysis -> Approval Gate -> Payload Simulation.
build 4. Tools & Stack
Python, Nmap, ffuf, Gobuster, Nikto, Metasploit RPC, Ollama, Pydantic.
code 5. Implementation
Agentic tool execution harness with strict command whitelisting, regex argument guards, and required manual operator confirmations.
flaky 6. Testing & Verification
Validated in isolated local lab environments against intentional vulnerable machines; dry-run command verification.
inventory_2 7. Evidence & Artifacts
Session execution logs, command history transcripts, tool execution stderr/stdout telemetry.
visibility 8. Security Findings
Autonomous offensive actions without human-in-the-loop risk unexpected denial-of-service or uncontrolled payload escalation.
speed 9. Operational Impact
Demonstrates safe engineering boundaries for AI tooling in cyber operations, proving that safety guardrails can coexist with automation.
shield 10. Defensive Remediation
Strict target subnet scoping (127.0.0.1 and 10.10.x.x lab only), mandatory interactive approval prompt before sending any offensive payload.
psychology 11. Lessons Learned
Prompt injection resilience and hardcoded subprocess filters are mandatory when passing tool output back into LLM reasoning loops.
update 12. Future Roadmap
Dynamic CVSS impact calculations and auto-generating defensive mitigation advisories following discovery.
info OVERVIEW & RESEARCH CONTEXT // 01

What is the Autonomous Pentesting Agent?

psychology Problem & Motivation

During structured educational laboratory challenges (such as TryHackMe challenge rooms and CTF labs), practitioners frequently spend excessive time on repetitive enumeration syntax, port scan parsing, and manual log collation.

The portfolio project documentation describes this agent as a local agentic decision-making framework designed to automate these structured educational laboratory workflows. By coordinating planning, execution validation, output parsing, and structured reporting under strict sandboxed guardrails, it allows security students to focus on deeper strategic analysis while keeping execution strictly compliant and safe.

verified_user Scope, Boundaries & Data Confidentiality

The agent is engineered exclusively for authorized, scoped assessments on owned targets and virtual learning environments.

Crucially, it utilizes local neural inference via Ollama and Qwen3-Coder 30B on a Kali Linux host rather than cloud-hosted APIs. This guarantees that target IP addresses, internal host banners, network topology details, and security artifacts remain 100% private with zero external telemetry.

DOCUMENTED 4-STAGE SPECIALIZED AGENT PIPELINE
1. Recon & Subnet Enum

Automated host discovery, port scans, and service banner acquisition via Nmap.

2. Web Analysis

Web security analysis, OWASP parameter tests, and Burp Suite API interaction.

3. Evidence Capture

Systematic logging of command outputs, headers, response codes, and artifact proofs.

4. Security Reporting

Structured synthesis of assessment timeline, verified vulnerabilities, and remediation notes.

schema AGENTIC ARCHITECTURE // 02

Documented Agent Pipeline Architecture

Based on the documented architecture in the portfolio repository, the framework operates as an autonomous loop governed by strict execution guardrails:

precision_manufacturing AGENTIC CONTROL LOOP & TOOL ORCHESTRATION KALI LINUX ISOLATED RUNTIME
TIER 1 · SCOPE & PLAN
tune Target Scope Boundary
  • • Authorized Target CIDR
  • • Lab Port Ranges
  • • Assessment Rules
Hard Boundary Validation
TIER 2 · LOCAL REASONING
memory Qwen3-Coder 30B
  • • Ollama Host Runtime
  • • Plan Generation
  • • Tool Invocations
Zero External Telemetry
TIER 3 · GUARDRAILS
shield Execution Guardrails
  • • Command Whitelisting
  • • Tool Sandboxing
  • • Destructive Action Block
Pre-Execution Interception
TIER 4 · TOOLS & AUDIT
terminal Kali Tool Execution
  • • Nmap & Burp APIs
  • • Evidence Collector
  • • Report Generator
Structured Assessment Output
SCOPE BOUNDARY → LOCAL QWEN3-CODER PLAN → SANDBOX GUARDRAIL CHECK → TOOL DISPATCH & EVIDENCE

Component Breakdown & System Responsibilities

Component Responsibility Inputs Outputs Relationships
Scope Validator Validates target IP/subnet against authorized lab boundaries. Target configuration file Verified target parameter set Blocks all out-of-scope invocations
Reasoning Agent (Qwen3-Coder 30B) Formulates next-step testing hypotheses and tool arguments. Previous tool output, current objective Proposed shell command / API call Powered locally by Ollama runtime
Tool Execution Guardrail Sanitizes proposed commands against syntax and safety rules. Proposed command string Approved command or rejection flag Prevents destructive actions or shell escapes
Tool Dispatch Harness Executes approved security tools in Kali Linux sub-processes. Approved command (Nmap, Burp API) Raw output logs, error status Communicates with Kali OS utilities
Evidence & Report Generator Collates execution logs into structured assessment reports. Tool stdout, headers, timestamps Markdown reports, artifact directory Maintains audit records of assessment
route STEP-BY-STEP WORKFLOW // 03

Documented Operational Workflow

1 INPUT
Scope Definition

Authorized target IP addresses, port scopes, and testing parameters are supplied to the agent configuration.

2 PROCESSING
Reconnaissance Scan

The agent coordinates initial port and service enumeration using Nmap profiles; outputs are normalized into structured tokens.

3 DECISION
Hypothesis & Guardrail

Local Qwen3-Coder 30B analyzes exposed ports to determine next validation steps, passing commands through strict safety guardrails.

4 ACTION
Sandboxed Tool Run

Approved tools (web validation scripts, Burp Suite API requests) execute in a sandboxed process, capturing raw responses.

5 OUTPUT
Evidence & Synthesis

Artifacts, HTTP status codes, and scan proofs are assembled into an organized, reproducible security assessment report.

terminal IMPLEMENTATION DETAILS // 04

Technologies & Environment Implementation

laptop_chromebook Operating System & Tool Ecosystem

Deployed natively on Kali Linux, directly interfacing with standard offensive security utilities including Nmap for network discovery and Burp Suite APIs for web application analysis.

Tools: Kali Linux, Nmap, Burp Suite APIs, Bash, Python
memory Local Neural Model Inference

Powered by Qwen3-Coder 30B executed via Ollama. The agent constructs specialized system prompts specifying tool interfaces, strict JSON output formats, and safety boundaries.

Runtime: Ollama Local Server, Qwen3-Coder 30B Weights
rule Execution Guardrails & Sandboxing

Commands proposed by the neural agent pass through a validation harness before execution. Destructive arguments (such as disk writes outside designated artifact directories or unapproved network ranges) are strictly blocked.

Safety: Command Whitelisting, Sub-process Sandboxing
receipt_long Structured Reporting Engine

Parses stdout and API responses to generate consistent Markdown assessment documentation with reproduction steps, verified proof-of-concept indicators, and remediation recommendations.

Output: Markdown Security Reports, Artifact Archives
Implementation details and tool wrappers are documented at the project repository. View Source Repository open_in_new
shield SECURITY DESIGN & ETHICAL BOUNDARIES // 05

Safety Architecture & Authorization Boundaries

Autonomous offensive security tooling introduces distinct operational risks. The framework is strictly designed with multiple overlapping controls to prevent unintended execution:

gps_fixed Scope Enforcement

The agent rejects any command containing target IP addresses or hostnames outside the authorized laboratory scope configuration.

block Non-Destructive Whitelist

Only non-destructive enumeration, web verification, and passive inspection tools are permitted in the automated pipeline.

lock Zero Data Leakage

On-device inference through Ollama ensures target vulnerabilities, credentials, and topology are never transmitted across cloud APIs.

neurology AI MODEL & AGENT BEHAVIOR // 06

Local Agent Workflow & Reasoning Loop

The agentic pipeline is anchored by Qwen3-Coder 30B running locally via Ollama. The model functions as an automated planning and analysis agent:

Iterative Plan Refinement

Upon receiving Nmap scan results, the model evaluates discovered services (e.g. HTTP, SSH, FTP) and selects the appropriate analysis module, maintaining a structured state representation across iterations.

Deterministic Tool Invocation

The agent formats all tool calls as structured JSON payloads, allowing the Kali Linux execution wrapper to parse arguments deterministically before running bash sub-processes.

checklist TESTING & VALIDATION // 07

Educational Laboratory Testing & Validation

Validation is conducted strictly across authorized virtual learning environments:

science Authorized Virtual Lab Testbeds EDUCATIONAL VERIFICATION

Evaluated against TryHackMe virtual challenge networks (drawing from over 140 completed labs) and local Kali Linux virtual machines to verify that agent plans correctly discover open services and report findings without exceeding scope limits.

Detailed unit tests, tool-call parsers, and command validation test cases are maintained in the project repository.

sync CURRENT STATUS // 08

Active Development (Personal Lab Research)

ACTIVE DEV // OWNED TARGETS

The agentic loop, tool-sandboxing harness, and Nmap/web enumeration pipelines are functional for educational laboratory workflows. Refinement is focused on agent error recovery and reporting.

update FUTURE ROADMAP // 09

Planned Enhancements

  • [Planned] Expanded Burp Suite REST API integration for multi-stage web authentication flows.
  • [Planned] Automated backtracking when tool executions return ambiguous or error responses.
  • [Planned] Exportable LaTeX and PDF assessment reports for educational lab portfolios.
arrow_back Previous: SentinelAI
Next Case Study: CyberAI arrow_forward