LEGAL DISCLAIMER: This platform is for authorized security research and educational purposes only. Scanning assets without permission is illegal.
HOMEBLOGAI Meets Penetration Testing: PentestCode Launches with 18 Specialized Security Agents
AI Meets Penetration Testing: PentestCode Launches with 18 Specialized Security Agents
AI Cybersecurity

AI Meets Penetration Testing: PentestCode Launches with 18 Specialized Security Agents

SR
Surendra Reddy ↗ View profile
LAST UPDATED: JUL 19, 2026
10 MIN READ
428 VIEWS

Summarize this blog post with:
ChatGPT | Perplexity | Claude | Grok

You've probably watched AI coding assistants get progressively better at writing and debugging software over the past couple of years. What's newer is watching that same agentic pattern get purpose-built for offensive security — an AI system that doesn't just suggest a command, but runs it, reads the output, and decides what to try next on its own. In this guide, you'll learn how PentestCode's new architecture works, what it can actually automate, and why this shift matters for red teams and defenders alike.

Key Takeaways

  • PentestCode is a new open-source AI agent for penetration testing, built as a hard fork of OpenCode and re-engineered specifically for offensive security workflows.
  • The tool integrates and orchestrates 18 specialized security tools, automatically selecting the appropriate one based on the current testing phase and observed data.
  • Its architecture splits work across 13 role-based agents — covering recon, scanning, enumeration, exploitation, Active Directory/Kerberos attacks, infrastructure protocol testing, web application testing, post-exploitation, exploit development, false-positive filtering, and reporting.
  • The design is based on HPTSA (Hierarchical Planning Task-Specific Agents) research, with developers claiming a 4.3x improvement over single-agent approaches.
  • A shared engagement state tracks hosts, services, vulnerabilities with confidence scores, credentials, and access levels through an entity relationship graph connecting findings with labels like EXPLOITED_VIA and PIVOT_TO.
  • Token costs for real engagements reportedly run $5–50 depending on scope and the underlying language model chosen, with Claude Opus and Sonnet cited by developers as top performers for this workload.
  • This category of tool is explicitly dual-use, meaning the same automation that benefits authorized red teams could be misused by malicious actors — a distinction that depends entirely on who is running it and against what.

What Is PentestCode?

PentestCode is an open-source AI agent built specifically for penetration testing, developed by security researcher Zhangir Ospanov as a hard fork of OpenCode re-engineered for offensive security use cases. The tool runs security tools, analyzes their output, and makes tactical decisions from a terminal interface, with minimal human intervention required once an engagement begins. Rather than functioning as a simple scripted automation tool, PentestCode is designed to replicate the methodology an experienced human penetration tester follows — assess, decide, act, reassess — across an entire engagement.

For example, a tester can provide a single high-level instruction, such as targeting a specific IP address with the objective of achieving domain admin access, and PentestCode's coordinator agent takes over from there. It initiates reconnaissance, interprets the results, and dynamically plans its next actions based on what it discovers, adjusting its strategy as new information about the target environment becomes available — much the way a skilled tester would pivot after finding an unexpected open port or exposed service.

Why Does This Launch Matter?

This launch matters because it reflects a broader shift already underway across the offensive security landscape: AI agents moving from advisory tools into operational roles within security testing itself. PentestCode isn't the first project in this space — a separate open-source toolkit called pentest-ai-agents, built by researcher 0xSteph specifically to extend Claude Code with 28 specialized penetration testing subagents, has been under active development since earlier in 2026 — but the two projects reflect different architectural philosophies, with PentestCode built as a standalone forked application rather than an extension layered onto an existing coding assistant.

At the same time, this shift carries a genuine dual-use consideration that's worth naming directly rather than glossing over. The same automation that lets an authorized red team compress a multi-day engagement into hours could, in principle, be adapted by a malicious actor to accelerate an unauthorized intrusion. This isn't unique to PentestCode — the offensive security tooling world has always included dual-use software, from Metasploit to Cobalt Strike — but the addition of autonomous decision-making rather than scripted execution does meaningfully lower the skill and time barrier for running a coordinated attack, which is exactly why responsible use, authorization, and scope boundaries matter more with tools like this, not less.

Technical Breakdown: How PentestCode's Architecture Works

PentestCode's core design choice is a strategist-coordinator model rather than a single monolithic AI agent handling every task. This architecture is based on HPTSA (Hierarchical Planning Task-Specific Agents) research, and the developers claim it delivers a 4.3x improvement over single-agent approaches — though as with any vendor-reported benchmark, independent verification of that specific figure hasn't been widely published yet.

The Coordinator and Role-Based Agents

For example, a central coordinator agent oversees the overall engagement strategy, while 13 specialized subagents handle distinct roles: reconnaissance, scanning, enumeration, exploitation, Active Directory and Kerberos identity attacks, infrastructure protocol testing (covering things like SNMP and IPMI), web application testing, post-exploitation, exploit development, false-positive filtering, and reporting. This division of labor means each agent operates with focused context specific to its task, rather than a single general-purpose agent trying to reason about an entire engagement simultaneously.

Shared Engagement State

Perhaps the project's most distinctive architectural feature is its shared engagement state, which all agents read from and write to in real time. This state tracks discovered hosts, services, vulnerabilities with associated confidence scores and status, harvested credentials, achieved access levels, and an entity relationship graph connecting findings through labels like EXPLOITED_VIA and PIVOT_TO. This design allows, for example, a credential harvested by the identity-attack agent to be automatically available to the post-exploitation agent without requiring a human to manually pass that information between tools — a workflow step that traditionally consumes significant time during real-world testing engagements.

Example Workflow in Practice

Walking through a documented example helps illustrate how the pieces connect. Given a target IP and a domain admin objective, PentestCode's coordinator runs an initial nmap -sS -p- scan, auto-parses the results into its structured engagement state, and recognizes patterns like ports 88 and 389 signaling a Domain Controller. From there, it spawns parallel enumeration subagents for SMB, LDAP, and HTTP simultaneously, attempts an AS-REP roasting attack to harvest crackable Kerberos hashes, and sprays any resulting credentials across every discovered service — SMB, WinRM, LDAP, and RDP. A successful WinRM login then triggers a post-exploitation agent that dumps SAM, LSA, and DPAPI secrets, with every step logged in an evidence chain for later reporting.

What Tools Does PentestCode Orchestrate?

PentestCode's core value proposition centers on tool orchestration — integrating and running 18 specialized security tools, choosing the appropriate one automatically based on the current testing phase and observed data, rather than requiring a human tester to manually select and chain tools together throughout an engagement. Beyond simply running these tools, the platform analyzes their output to identify critical information, vulnerabilities, and potential attack paths, then makes informed tactical decisions about next steps based on that analysis. According to reported cost figures, running a real engagement through PentestCode costs roughly $5 to $50 in AI model token usage depending on scope and the specific language model selected, with the developers citing Claude Opus and Sonnet as the top-performing models for this particular workload.

What Should Organizations Consider Before Using AI-Driven Pentesting Tools?

Tools like PentestCode should only ever be used within a clearly authorized, scoped engagement — the same legal and ethical boundaries that apply to any penetration testing activity apply here with equal weight. Running any offensive security tool, AI-driven or otherwise, against systems you don't have explicit written authorization to test carries serious legal risk regardless of the tool's sophistication or intent.

  • Confirm explicit written authorization and defined scope before running any autonomous offensive security agent against a target environment, exactly as you would with traditional manual testing tools.
  • Review autonomous agent actions before and during execution, since reduced human intervention doesn't mean zero oversight is advisable, particularly for actions with destructive or persistence-creating potential.
  • Understand the evidence and logging trail an AI-driven tool produces, since regulatory and client reporting requirements for penetration testing engagements typically demand detailed documentation of every action taken.
  • Budget for token costs as a real operational expense, given the reported $5–50 per-engagement range, which can scale meaningfully across larger or repeated assessments.

What Does This Mean for Defenders?

Security teams on the defensive side should treat the rise of AI-driven offensive tooling as a signal to reassess detection coverage for automated, multi-stage attack chains, not just isolated exploitation attempts. If autonomous agents can chain reconnaissance, credential harvesting, and lateral movement together in a single continuous workflow, detection strategies built around catching isolated, manually-executed steps may need to account for faster, more coordinated attack patterns.

  • Monitor for rapid, sequential activity patterns — a scan immediately followed by targeted service enumeration, followed shortly by credential spraying across multiple protocols — since this kind of compressed timeline is exactly what automated tooling like this produces.
  • Prioritize detection around Kerberos-based attacks like AS-REP roasting, given how central this technique is to the documented PentestCode workflow for compromising Active Directory environments.
  • Review your own environment for exposure using the same categories of testing these tools automate, since AI-driven pentesting largely accelerates existing, well-understood attack techniques rather than introducing fundamentally new ones.

Organizations validating their own external exposure can start with a website vulnerability scanner to identify internet-facing weaknesses before an automated tool — malicious or authorized — finds them first, and a subdomain enumeration tool to surface forgotten infrastructure that wouldn't appear in a standard asset inventory.

[Insert image: Diagram of PentestCode's coordinator-agent architecture and shared engagement state | Alt text: "PentestCode AI penetration testing agent architecture diagram"]

What's Next? Tracking AI-Driven Offensive Security Tools

PentestCode joins a growing category of AI-native offensive security tooling, and this space is likely to keep evolving quickly.

  • Watch for independent benchmarking of the claimed 4.3x improvement over single-agent approaches as more security researchers evaluate the tool in real engagements.
  • Follow parallel development in related projects, including the 0xSteph-built pentest-ai-agents toolkit for Claude Code, to compare architectural approaches within this emerging category.
  • Review our related coverage of The Gentlemen ransomware's 21 lateral movement techniques and Chinese hackers exploiting Claude Code and DeepSeek for how AI-driven automation is already showing up on both the authorized and malicious sides of offensive security.
  • Bookmark our cybersecurity news hub for continued coverage of AI's growing role in both offensive and defensive security tooling.

Conclusion

PentestCode is a clear signal that AI-driven automation is moving from an assistive layer into genuinely autonomous execution within penetration testing workflows. Its coordinator-agent architecture, shared engagement state, and 18-tool orchestration represent a meaningful step toward compressing what used to take a human tester days into a far shorter, largely self-directed process. That capability is genuinely useful for authorized red teams working under proper scope and documentation — and it's exactly why organizations, whether running these tools or defending against actors who might misuse similar techniques, need to take the underlying attack patterns seriously regardless of who's driving them. Stay subscribed to trusted cybersecurity sources so developments in this fast-moving space reach you as they happen.

Written by ReconShield Editorial Team — a cybersecurity publication covering cyber threats, data breaches, vulnerabilities, malware, threat intelligence, and online privacy, providing practical insights to help readers stay informed and secure.

Reviewed by Surendra Reddy, Founder & Principal Security Engineer, ReconShield — a cybersecurity researcher specializing in OSINT, infrastructure exposure intelligence, and passive diagnostic tooling.

Disclaimer: This article was initially drafted using AI assistance. However, the content has undergone thorough revisions, editing, and fact-checking by human editors and subject matter experts to ensure accuracy.

Read More:

Top 15 Critical CVE-2026 Vulnerabilities Every IT Team Should Know

Breaking: Hackers Claim Massive Accenture Data Breach, 35GB of Source Code Allegedly Stolen

Best AI Cybersecurity Stocks to Buy as Cybercrime Surges in 2026

AI Goes to War: Chinese Hackers Exploit Claude Code and DeepSeek in Government Attacks

New Windows RDP Flaws Could Lead to Data Theft — Everything You Need to Know

## Analyst Commentary & Implementation Blueprint

Security advisory

Continuous security exposure assessment is critical to identifying public vulnerabilities before they are exploited. Organizations should maintain a passive inventory of all web servers, TLS configs, and open ports, ensuring that default configurations are eliminated and security advisories are actively implemented.

Hardened Security Configuration Blueprint

# General Security Hardening Directive
ServerTokens ProductOnly
ServerSignature Off
FileETag None

Actionable Mitigation Checklist

  • Perform passive asset inventories weekly.
  • Restrict administrative ports using local firewall controls.
  • Monitor active CVE alerts for exposed software.

Common Inquiries & FAQs

Why is passive scanning preferred for continuous auditing?

Passive audits do not cause operational impact or trigger firewall blocks, making them ideal for constant surveillance of internet-facing assets.

What should I do if a vulnerability is flagged?

Apply the latest vendor patches, restrict access to the resource via firewalls, or verify configuration flags to mitigate risks.

SR

Surendra Reddy

Surendra Reddy is a cybersecurity researcher and founder of ReconShield, specializing in OSINT and defensive infrastructure analysis.

Connect on LinkedIn ↗
#AI CYBERSECURITY

// AUDIT BRIEFING DISCUSSION (2 COMMENTS)

agent_x9 // Verified Analyst2 HOURS AGO

Great breakdown of the passive infrastructure vectors. We recently audited our external DNS zones and found multiple dangling staging environments. Implementing wildcard certificates reduced our CT log leaks significantly.

sec_analyst_015 HOURS AGO

Is there any automated tooling you recommend for daily crt.sh scraping? Manually checking CT logs is becoming unsustainable for our domain portfolio.

// POST RESPONSE BRIEFING
* Encrypted transmission via Secure Socket LayerSUBMIT BRIEFING