November 22, 2026
Building Pentesting Framework: Recreating the Governed Side of Agentic Security Testing
Independent research notice: Pentesting Framework is an original defensive research project. It is not Autumn-27/ARTEX, does not containβ¦
By Tonydrumright
16 min read
Independent research notice: Pentesting Framework is an original defensive research project. It is not
Autumn-27/ARTEX, does not contain ARTEX code, and is not affiliated with its developer, operators, forks, or commercial variants. The project studies selected architectural ideas reported by public threat research and rebuilds them around authorization, evidence, and human control.
In November 2026, the FBI described ARTEX as an open-source, LLM-driven autonomous penetration-testing framework that threat actors had weaponized to automate intrusions from reconnaissance through data exfiltration. Calling ARTEX simply "malware" misses the deeper lesson. The underlying technology was a general-purpose security-testing platform; its planner, workers, tools, memory, and feedback loop became dangerous when operators aimed them at unauthorized targets and allowed the system to keep acting.
Microsoft reported ARTEX-assisted campaigns that reached privileged cloud access in some environments in less than three hours. Unit 42 observed agent-driven systems evaluating responses, correcting failed requests, pursuing multiple paths, and turning exposed identity workflows into routes toward cloud access. Censys' analysis described a Go backend, Next.js console, PostgreSQL persistence, a planner that generated attack intents, workers that claimed tasks, and asset and exploration graphs that preserved what the system had learned.
That architecture raised the question behind my project:
Can we reproduce the useful coordination patterns of an agentic pentesting system while making authorization, evidence, and operator approval stronger than the agent's desire to continue?
The result is Pentesting Framework, an evidence-led control plane for authorized assessment labs and, eventually, governed enterprise pentesting.
What we studied β and what we deliberately did not copy
The goal was not to reproduce a malicious campaign or build an autonomous exploitation engine. We studied the architectural patterns that make agentic security tools effective:
- A natural-language objective that becomes a structured plan.
- Specialized agents or workers handling bounded tasks.
- A registry connecting capabilities to compatible tools.
- Shared state that lets later tasks build on earlier observations.
- An asset graph representing infrastructure and relationships.
- A feedback loop that chooses the next action from current evidence.
- Task concurrency and retry handling that reduce human waiting time.
Those patterns also explain why weaponized systems can be so dangerous. A planner can turn one objective into hundreds of actions. Workers can operate continuously across targets. Shared memory prevents the system from forgetting partial progress. Tool automation compresses reconnaissance, validation, credential abuse, and lateral movement into one persistent loop.
Pentesting Framework adopts the coordination ideas but changes the control model. The AI may recommend; it does not authorize. Discovery may add evidence; it does not expand scope. A plausible graph edge may guide further investigation; it does not become a verified compromise.
Architecture: similar pressures, different boundaries
Natural-language objective Lets an operator describe the assessment outcome Governance: Converted into recommendations bounded by the registered engagement
Planner and task decomposition Breaks a broad goal into manageable discovery tasks Governance: Produces auditable tasks; policy evaluates every executable operation
Specialized workers Matches protocols and evidence types to the right capability Governance: Workers receive only approved targets, inputs, rate limits, and operation classes
Tool registry Makes tools discoverable to an agent Governance: Deterministic filtering rejects incompatible or unauthorized tools before AI ranking
Shared observations Lets later analysis use earlier discoveries Governance: Normalized evidence preserves provenance, time, location, raw output, and hashes
Asset and attack graphs Reveals relationships that isolated findings miss Governance: Every edge carries evidence, confidence, freshness, reachability, preconditions, and validation state
Explore-decide-execute loop Allows fast adaptation to target responses Governance: Split into recommend-authorize-execute-observe, with default-deny policy between advice and execution
Concurrent task handling Reduces assessment time Governance: Concurrency remains engagement-scoped, rate-limited, cancelable, and auditable
The current implementation uses a Go control-plane API and a Next.js evidence copilot. The platform stores engagements, authorization decisions, assets, services, observations, evidence, findings, tool recommendations, graph relationships, and audit events. The console presents that state as a conversational assessment workspace rather than an unrestricted command agent.
The governed agent loop
A conventional autonomous agent often follows a compact loop: observe the environment, decide what to do, execute a tool, inspect the result, and repeat. That loop is powerful because every response becomes context for the next decision. It is also the point where an assessment assistant can quietly turn into an intrusion system.
Pentesting Framework deliberately expands the loop into distinct control-plane states:
- Define: register the engagement, target identifiers, ownership context, permitted operations, exclusions, time window, rate limits, and approval requirements.
- Recommend: let deterministic logic and AI propose the next useful discovery task from the current evidence.
- Authorize: evaluate the exact target, operation, tool, inputs, worker profile, and prerequisites against policy.
- Execute: give an isolated worker only the approved task envelope rather than the entire engagement or a broad shell.
- Observe: capture stdout, HTTP responses, screenshots, structured adapter output, timestamps, tool identity, and target location.
- Normalize: reconcile raw observations into canonical assets, services, technologies, identities, and configuration facts.
- Correlate: connect findings and observations to graph nodes and edges without upgrading hypotheses into facts.
- Audit: preserve the recommendation, policy result, execution metadata, evidence references, and operator decision.
That separation creates several useful failure boundaries. A model can be wrong about the best tool without changing authorization. A worker can fail without corrupting the evidence model. A newly discovered hostname can be recorded without becoming an approved target. A graph can contain a plausible path without permitting the system to validate it.
It also changes the role of the language model. The model is not the platform's root user. It is one reasoning component inside a larger system whose deterministic controls remain authoritative.
Task handling as a security boundary
The unit of automation is a typed task, not an unrestricted prompt. Each task carries:
- An engagement ID and immutable scope snapshot.
- One or more canonical target references.
- A declared capability such as TCP connectivity, DNS resolution, HTTP retrieval, configuration comparison, or cloud inventory.
- Required inputs and prerequisite evidence.
- A risk class and approval requirement.
- Rate, time, concurrency, and network constraints.
- A compatible worker and execution profile.
- A versioned output schema.
- Cancellation and expiration state.
This matters because agentic systems tend to experience goal drift. A task that begins as "identify the HTTP technology" can become "try the default credentials" if the model is allowed to improvise. Typed tasks prevent that transition. The original task must complete, and a new task with a different capability and risk class must be proposed and authorized separately.
Retries are governed the same way. A transient connection failure may justify a bounded retry. An authentication failure does not justify password variation. A 403 response does not authorize filter bypass attempts. Retry policy belongs to the task definition, not to the model's persistence.
Concurrency is also treated as policy rather than a performance setting. The control plane can limit parallel work by engagement, target, protocol, tool, or risk class. That makes it possible to gain the operational benefit of agents without producing the unbounded request volume associated with offensive automation.
How AI automation helps in a real pentest
AI is most useful when it manages attention β not when it grants itself power.
An assessor may begin with an authorized CIDR, one application URL, a testing window, and a set of allowed operations. The platform can then:
- Normalize those inputs into an engagement scope.
- Determine which discovery capabilities are compatible with the target and policy.
- Rank eligible tools by expected information gain, evidence quality, precision, cost, and false-positive likelihood.
- Turn raw terminal or HTTP output into structured observations.
- Deduplicate multiple observations into canonical assets and services.
- Correlate findings into candidate attack paths.
- Identify which graph edge lacks evidence and recommend the safest allowed task that could reduce that uncertainty.
- Record every recommendation, authorization decision, execution result, and evidence reference for reporting.
This is where agent and task-handling techniques matter. A network task should not improvise web authentication. An HTTP evidence task should not silently become a credential attack. A cloud-inventory task should not run because the model merely inferred that AWS might exist. Each task has prerequisites, inputs, a risk class, an output schema, and an approval state.
The AI-driven selector follows two stages:
- Stage A β deterministic eligibility: reject tools that are incompatible with the target, outside the permitted operations, missing prerequisites, unsupported on the worker, or awaiting approval.
- Stage B β advisory ranking: compare only eligible tools and explain which one is most likely to improve the evidence graph.
The policy engine independently makes the execution decision. This prevents a persuasive model response from becoming authority.
What the tool selector actually reasons about
The selector is not intended to answer the generic question, "What is the best security tool?" It answers a narrower question: "Which eligible tool is most likely to improve this engagement's evidence now?"
The registry stores a stable tool ID, name, version, category, supported platforms, capabilities, required inputs, risk level, approval rule, execution profile, and output schema. Stage A evaluates facts that should not depend on model judgment:
- Is the target authorized for this operation?
- Does the tool support the worker's operating system and architecture?
- Are the required credentials, URLs, source files, or inventory records present?
- Is the operation read-only, bounded validation, or potentially state-changing?
- Does the engagement allow the tool's network behavior and request rate?
- Is human approval required and still valid?
Only the surviving candidates reach Stage B. The model then ranks them using expected information gain, quality of evidence, precision, runtime cost, target impact, and false-positive likelihood. The recommendation includes a reason, the evidence gap it addresses, and the output expected if the task succeeds.
Consider a Linux host with SSH exposed. A host-hardening review could make Lynis or OpenSCAP eligible if the engagement includes authenticated configuration assessment and the necessary access already exists. BloodHound would be rejected because its identity-graph capability and prerequisites do not match the target. An unauthenticated network engagement would reject all three and keep the recommendation at banner collection or an approved SSH configuration check. The model never gets to rank tools that policy has already excluded.
This design also makes recommendations explainable. An operator can see not only why one tool ranked first, but why alternatives were rejected before ranking.
Evidence is a first-class product
Many assessment systems treat evidence as an attachment added after a scanner reports a finding. Pentesting Framework reverses that relationship: evidence exists first, and findings are claims that reference it.
An evidence record can contain:
- The engagement, asset, service, identity, or configuration object it concerns.
- The precise collection location: IP, port, hostname, URL, route, file, repository path, cloud resource, or policy object.
- The collector, tool version, adapter version, and execution ID.
- The approved command or request template and sanitized parameters.
- Raw output, normalized output, HTTP metadata, screenshots, or configuration excerpts.
- Collection time, observed time, freshness window, and integrity hash.
- Provenance showing whether the source was direct observation, imported inventory, documentation, or human review.
- Sensitivity and retention labels so secrets or personal data are not casually exposed in reports.
The finding layer adds interpretation: category, title, severity, confidence, status, affected identity, remediation, and evidence references. If evidence expires, conflicts with a newer observation, or comes only from documentation, the finding can be downgraded automatically.
This distinction is especially important for version-based detection. A service banner can support "software version observed." It may support "advisory candidate" when the version maps to a known issue. It does not, by itself, prove that the vulnerable code path is enabled, reachable, or exploitable in the target environment.
What the engagement screenshots show
The workspace screenshot shows more than a list of ports. It captures the data needed to reconstruct an assessment:
- Engagement name, target identifiers, CIDRs, domains, applications, exclusions, and allowed operations.
- Canonical assets and services discovered from bounded network, DNS, and HTTP tasks.
- Commands or requests used, normalized outputs, exact infrastructure locations, timestamps, and evidence hashes.
- Findings that reference evidence rather than embedding unverifiable conclusions.
- Tool recommendations, rejected alternatives, policy reasons, and required approvals.
- A governed graph separating observed, supported, candidate, and documentation-only relationships.
- Audit events showing who or what recommended, authorized, executed, or rejected each step.
The evidence record is reusable. An assessor can open it to reproduce a manual observation, confirm that a finding still applies, prepare remediation guidance, or challenge an attack-path assumption. A reviewer can trace a graph edge back to the page capture or command output that supports it.
How the governed graph works
The graph is not a decorative visualization added after the assessment. It is the correlation layer connecting infrastructure, identity, configuration, vulnerability, and evidence.
Nodes can represent assets, services, identities, credential references, vulnerabilities, misconfigurations, permissions, data resources, containers, and findings. Edges describe relationships such as HOSTS, RUNS, CONNECTS_TO, AUTHENTICATES_AS, HAS_PERMISSION, TRUSTS, AFFECTED_BY, EXPOSES, and CAN_ACCESS.
Every edge must answer practical questions:
- Which evidence records support this relationship?
- Is the source directly observed, inferred, imported, or documentation-only?
- What preconditions must hold for the relationship to matter?
- Is the destination reachable from the source under the engagement's network model?
- How confident and how fresh is the evidence?
- What impact would the transition create?
- Has the transition been passively observed, safely validated, manually reviewed, or not tested?
The graph therefore distinguishes four useful states:
- Observed: the target directly produced the underlying fact.
- Supported: multiple records or a validated relationship justify the edge.
- Candidate: the relationship is plausible, but evidence or a precondition is missing.
- Documented only: a reference architecture or write-up describes the stage, but the target has not supplied evidence for it.
This vocabulary prevents a common reporting failure: turning a chain of assumptions into a dramatic attack path. A nine-stage reference path with three observed nodes is still a three-stage observed path, not a nine-stage compromise.
The graph is also useful for prioritization. If several candidate paths converge on one missing permission record or one internal service dependency, that evidence gap may be more valuable than another broad scan. The AI can recommend the smallest authorized observation that resolves the greatest number of uncertainties.
Demonstration: mapping a path without claiming access
In an authorized lab model, the platform observed an HTTP service redirecting to a virtual host, identified application routes through read-only requests, captured version and server metadata, and recorded an internal-topology disclosure.
That evidence supported the beginning of a possible chain:
public web application β unauthenticated job surface β disclosed internal service topology
Reference documentation suggested later stages involving SSRF, cloud metadata, a temporary identity, a queue-backed worker, an internal build service, a privileged container, and a host boundary. The platform displayed those stages, but it did not pretend they had been found on the target.
- Target-backed nodes were marked observed.
- Edges supported by independent records were marked supported.
- Plausible but unverified transitions were marked candidate.
- Write-up-derived stages without target evidence were marked documented only.
No metadata credentials were requested. No queue message was submitted. No build was launched. No host boundary was crossed.
This is how the graph can inform a real pentest without becoming an exploitation script. If the operator later has explicit approval for access validation, the graph identifies the smallest missing precondition and the evidence required to test it. Approval and execution occur as a separate phase, with separate controls. Mapping risk is not the same as gaining access.
Reusing the workflow across different targets
A useful assessment platform cannot be hard-coded to one lab, one write-up, or one cloud provider. The stable parts of Pentesting Framework are the engagement model, policy decisions, task envelopes, evidence schema, finding lifecycle, and graph semantics. Target-specific behavior lives in adapters and detection content.
For a web application, adapters may collect redirects, headers, routes, forms, JavaScript references, TLS metadata, and read-only API responses. For a network service, they may collect reachability, protocol negotiation, banners, and configuration metadata. For an enterprise cloud engagement, read-only inventory adapters may collect resources, identities, trust relationships, policies, logging configuration, and exposed secret references. Repository adapters can inspect dependency manifests and configuration as long as the repository is explicitly in scope.
The second lab run demonstrated this portability. A different authorized target exposed FTP, SSH, SMB, and distccd rather than the Nimbus web and cloud pattern. The same control plane created canonical assets and services, retained the exact observations, produced version-based advisory candidates, and prevented banner matches from becoming validated exploits. No platform infrastructure needed to change.
That is the intended enterprise model: replace the engagement inputs and enable the appropriate adapters while leaving authorization, evidence, audit, and graph governance intact.
Portability does not mean universal automatic detection. Some vulnerability classes can be suggested by passive signals; others require source review, authenticated configuration, protocol-specific validation, or human analysis. The platform should communicate those limits rather than imply that one scanner can prove every category from XSS and SSRF to cloud trust abuse and memory corruption.
Why this architecture could become malicious
The same components become dangerous when their boundaries are removed:
- An unrestricted planner can translate "gain access" into a long-running intrusion campaign.
- Broad tool permissions let workers escalate from observation to exploitation without a new decision point.
- Shared credentials and memory allow one successful discovery to propagate across many tasks or targets.
- Automatic retries turn failed authentication and blocked requests into adaptive probing.
- Concurrent workers let one operator test many organizations and attack paths at once.
- Graph-based reasoning helps the system notice trust relationships, identity pivots, and supply-chain opportunities that a single scanner would miss.
- Persistent execution compresses the defender response window because the system does not pause for normal human pacing.
This is the core warning from the ARTEX reporting. The risk is not one model producing clever text. It is an LLM connected to tools, durable state, goals, concurrency, and permission to act.
Pentesting Framework treats those capabilities as separate security boundaries. The current project intentionally stops before autonomous exploitation, credential retrieval, password spraying, persistence, lateral movement, or data exfiltration. Adding such capabilities would require isolated workers, durable approvals, kill switches, revocation, comprehensive logging, and an environment designed to contain failure.
Failure modes worth designing for
Governance is not a single policy check at the beginning of a run. Agentic systems introduce failure modes that appear throughout the lifecycle.
Prompt and evidence injection: a target-controlled page, banner, repository file, or tool output can contain instructions intended to manipulate the model. Collected content must be treated as untrusted evidence, never as authority to change scope or run tools.
Scope confusion: one IP can host many virtual applications, and one hostname can resolve to shared infrastructure. Authorization should bind operations to canonical target objects and the engagement's explicit identifiers rather than assume that network adjacency equals permission.
Stale graph state: cloud identities, DNS records, containers, and ephemeral services change quickly. Evidence needs freshness rules, and paths must be reassessed when supporting observations expire.
False confidence from tool output: scanners often report signatures, possible technologies, or advisory matches. Normalization must preserve uncertainty instead of converting every match into a vulnerability.
Secret propagation: agent memory and logs can unintentionally spread tokens or credentials from one task into another. Sensitive evidence should be minimized, redacted, access-controlled, and excluded from model context unless strictly necessary.
Approval reuse: an approval for one target, time window, or request should not become a reusable permission token for different work. Approvals need scope, expiration, revocation, and an exact operation binding.
Unbounded retry and concurrency: a helpful agent can become a denial-of-service source when it retries across many targets. Budgeting requests, runtime, and parallelism is part of authorization.
Audit gaps: if a human cannot determine which model, policy version, tool version, input, and evidence produced a decision, the system is not ready for a professional assessment.
These are not edge cases. They are the normal engineering consequences of connecting probabilistic reasoning to security tools.
The authorization boundary is the product
The most important capability in this project is not a scanner or a model prompt. It is the boundary that determines whether a recommendation can become an action.
For this research prototype, that boundary follows several non-negotiable rules:
- Default deny: an operation is rejected unless the engagement explicitly permits its target, capability, time window, and execution profile.
- Discovery is not authorization: finding a hostname, route, identity, repository, or cloud resource never adds it to active scope.
- Recommendation is not execution: model output can propose a task but cannot mint approval, modify policy, or select a more permissive worker.
- Evidence is not a credential store: secrets are minimized, sanitized, access-controlled, and never displayed merely to prove that exposure may exist.
- A hypothesis is not a finding: documentation and graph inference remain labeled until target evidence supports them.
- One approval is not another: approval is bound to a specific operation, target, input set, risk class, and expiration time.
- Cancellation must be real: a worker should be interruptible, its network access revocable, and its remaining task envelope invalidated.
- Human accountability remains: a qualified assessor owns the engagement, evaluates context, and decides whether a separately governed validation phase is warranted.
These constraints deliberately prevent the article and the current implementation from becoming an exploitation guide. The project demonstrates how to define scope, collect evidence, prioritize safe discovery, and map possible impact. It does not provide payloads, credential-acquisition procedures, persistence mechanisms, or steps for crossing an access boundary.
This distinction is not a limitation to hide. It is the product thesis: automation should make authorized assessment more consistent and explainable without making the system independently ambitious.
Defensive lessons from the ARTEX reporting
The public reporting also suggests practical controls for defenders who are not building assessment platforms.
- Reduce exposed edge assets and continuously reconcile what is internet reachable.
- Treat forgotten portals, mobile backends, partner applications, password-reset flows, and development systems as part of the real attack surface.
- Monitor machine-speed request bursts, repeated discovery patterns, rapid pivots after credential events, and consistent write-then-read validation behavior.
- Centralize identity, cloud, web, and network telemetry so a fast multi-stage sequence is visible as one incident.
- Alert on unexpected service-principal sign-ins, application credential changes, privilege modification, and unusual cloud inventory enumeration.
- Rate-limit and isolate sensitive APIs rather than relying on obscurity.
- Preserve evidence quickly because autonomous activity can complete objectives faster than a manual response process.
The same graph thinking used by an assessment platform can help a defensive team. A low-severity exposed route, an overprivileged service identity, and a trusted downstream application may look unrelated in separate dashboards. Correlated together, they can describe a high-impact path that deserves immediate remediation.
What this means for actual security teams
Used responsibly, the architecture can help a pentest team:
- Maintain a consistent inventory across network, DNS, web, cloud, identity, repository, and configuration evidence.
- Choose the next discovery task based on information gain rather than habit.
- Preserve exact proof for every finding and reduce reporting gaps.
- Correlate low-severity observations into a meaningful multi-stage risk.
- Re-run the same governed workflow across labs or enterprise environments without hard-coding one target.
- Keep documentation-derived hypotheses visible without confusing them with verified vulnerabilities.
- Show clients exactly what was collected, why it mattered, and what would require additional approval.
The objective is not "fully autonomous hacking." It is a reliable assessment assistant that handles orchestration and evidence hygiene while a qualified operator retains authority and judgment.
The source, screenshots, data model, and evidence walkthrough are available in the Pentesting Framework repository.
What I learned
The hardest part of agentic pentesting is not connecting an LLM to nmap, an HTTP client, or a cloud CLI. It is designing the state transitions between recommendation, authorization, execution, observation, finding, and impact.
An AI system should be able to say:
"The evidence supports the first two relationships. The third is plausible but unverified. Here is the least invasive in-scope task that could test the missing precondition, and here is why the policy engine still requires approval."
That answer is slower than blind autonomy by design. It is also far more useful in a professional assessment.
Next milestones
- Replace in-memory stores with PostgreSQL repositories and durable audit history.
- Persist and reassess the governed graph in Neo4j.
- Add isolated execution workers, cancellation, revocation, and kill-switch enforcement.
- Expand read-only DNS, cloud-inventory, identity, repository, and configuration adapters.
- Add regression fixtures that downgrade findings when evidence becomes stale or contradictory.
- Package repeatable synthetic-lab demonstrations and sanitized public datasets.
- Add human approval workflows for narrowly bounded validation tasks.
References
- FBI FLASH-20261113β001: Threat Overview of ARTEX Autonomous Penetration Testing Framework
- Microsoft Security: AI-driven, large-scale nation-state campaign using ARTEX enables supply chain compromise
- Unit 42: ARTEX and AI-Powered Red Teaming Tools β What Defenders Need to Know
- Censys: ARTEX β Agentic Asbestos
Pentesting Framework is intended only for systems you own or are explicitly authorized to assess. This article discusses architecture and defensive controls; it does not provide exploit payloads, credentials, or instructions for unauthorized access.