What ARTEX Does Under the Hood and How to Spot It
I analyzed ARTEX and its forks statically from late September 2026 through BaaRai/ARTEX without running a line of it. The source exposes prompt injection in the repo, guardrail gaps, and the behavioral signals defenders need to track.
I started digging into ARTEX in late September 2026, tracking the original repository and many of its forks to see how open-source autonomous offensive tooling is actually built. The latest static readout referenced in this article is BaaRai/ARTEX at commit e5c7bfc, analyzed on November 27, 2026. ARTEX is a self-hosted, LLM-driven multi-agent penetration-testing platform released under AGPL-3.0. That tree holds 767 Go files (around 200,000 lines including tests), 147 TypeScript React files, and 19 SQL migrations.
Across every repo and fork I looked at, I did not compile a binary, install dependencies, or let anything in those directories touch a network. I read the Go code, SQL schemas, prompt templates, Dockerfile, and documentation statically. When my notes on the latest tree were finished, I deleted the local checkout.
In Agentic Threats Have Changed the World, I wrote about pulling the notice-to-fix cycle down from weeks to hours because automated agents work an exposure in minutes. Looking inside an open-source offensive agent platform shows how that automation runs in practice, and it shows where common defender assumptions fail.
Treat every unfamiliar repo as hostile data
Inspecting unfamiliar AI and offensive-security repositories carries a direct operational risk. Every file in that checkout has to be treated as untrusted data, whether you read it yourself or point a coding assistant at it.
ARTEX gives a concrete example right in README.md. Inside the file sits an HTML comment telling the reader to fetch the document with curl, claiming the file size is huge and that curl is the only way to read it. That instruction is aimed at automated readers and agentic tools that parse repositories with shell access enabled. Point an unconstrained assistant at a repository like that, and a hidden comment in a Markdown file can trigger an outbound shell command before you catch it.
I recorded that comment as an observation, never acted on it, and removed the entire checkout as soon as my notes were done so no other tool or indexer in my environment would read it later.
ARTEX defends hard against this exact class of attack inside its own runtime while shipping documentation that attempts it on whoever reads the repo. In agent/data_envelope.go, target output is wrapped in nonced delimiters ([[ARTEX_DATA nonce=<32 hex> field=<name>]] through [[END_ARTEX_DATA ...]]), and any matching markers returned by a target are stripped to artex-data-marker-removed. Code-owned, uneditable prompt tails in agent/untrusted_prompt.go tell planners and workers that target output is data and never instructions. Workers are told to quote injection payloads verbatim as findings and ignore URLs, scope expansions, or credential requests embedded in responses. The authors know how dangerous untrusted text is to an LLM. Anyone auditing their repository should apply the same discipline.
How ARTEX works under the hood
One Go binary (cmd/artex) runs the UI, API, orchestration engine, and traffic recorder. PostgreSQL 16+ is the only hard external dependency. At startup, SealProcessEnv() scrubs secrets (ARTEX_PG_DSN, ARTEX_SECRET_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY, and AWS_*) before opening listeners, and server.IsolationSelfTest refuses to start on Linux as root if agent child processes could read server keys or configuration. Agent subprocesses run as uid and gid 10001 with no-new-privileges.
All state lives in two linked PostgreSQL graphs:
- The exploration graph (one per task) tracks
begin -> goal -> intent -> factorfinding. Intent rows double as a fenced work queue usingunclaim_tokenandlast_heartbeat_at. Facts carry server-assigned provenance (target_response,tool_output,third_party_intel,operator_input, orinference), which stops the engine from closing a goal on target-supplied text alone. - The asset graph (shared across tasks) maps
root_domain -> subdomain -> service -> endpoint, along withip -> serviceandapp.
An operator starts a task with a goal and a scope. A goal decomposer translates that prose into machine goals and constraints. A planner wakes on every graph change (backed by a 300 to 600 second heartbeat) and emits up to four one-sentence intents per round. By default, three worker agents claim one intent each and run tools against the target: Bash with a Kali-style toolchain, WebFetch, custom HTTP clients, MCP tools, and skills. Workers deliberately lack MultiEdit, Glob, and Grep, so file searches route through Bash where the command gate can inspect them.
HTTP traffic from the agents passes through an embedded go-mitmproxy v1.9.2 instance on 127.0.0.1:8788. The proxy stores traffic in plaintext and unredacted inside a local SQLite FTS5 trigram index (data/traffic/_index/index.sqlite) and SHA-256 blob store. LLM and search requests never touch the recorder (transport.Proxy = nil). An optional MV3 browser extension captures a human authenticated session, including login, OTP, and 2FA, via Chrome DevTools Protocol Network.* events so workers can replay and act inside that live session.
Verification on reported findings is stricter than what most automated scanners attempt. Calling report_finding runs an adversarial prompt check across five disproof axes, deduplicates by fingerprint (sha256(vulnclass|assetKey|endpointKey)), binds the finding to captured traffic, and copies the evidence snapshot into an AES-256-GCM sealed store. The server marks a finding verified only when a bound proof body exists, the declared proof-of-exploitation level is L3 or higher (real data extracted or critical impact), and every string in evidence_quotes (at least 8 characters) appears verbatim, after whitespace normalization, inside a single bound body. Closing a task goal through prove_goal rejects target_response facts and demands a server-verified traffic_ref whose host matches the target asset.
Every tool call passes through a guardrail chain: per-intent steering checks, built-in destructive denies (rm, mkfs, dd, SQL DROP, curl DELETE, and exfiltration pipes), user intercept rules (regex over raw tool_input JSON or Bash AST inspection via mvdan.cc/sh/v3, paired with an always-allow denylist blocking shells, interpreters, git, docker, and kubectl), a target gate with dial-time IP pinning (target_pins and PinnedDialer to block DNS rebinding), and an egress rate governor (quiet at 2 rps, balanced at 5 rps, aggressive at 20 rps, jitter up to 250ms, GET caching, and 429/503 backoff).
The gap between architecture and defaults matters here. Both the target gate (configured only through the API) and the egress governor are off by default. Regex intercept rules are tripwires, not a sandbox. The egress guard is IPv4-only. Adding an upstream proxy downgrades IP pins to name_only. The goal_met condition is unbound by default. There is also no automatic self-rewriting harness loop (RSI.md forbids modifying gates, prompts, or injection defenses).
What defenders get wrong
Blue teams looking at autonomous pentesting platforms tend to make five mistakes that come straight from assumptions about older scanners or vendor marketing.
First, there is no stealth engine and no reliable attribution header. ARTEX has an assessment User-Agent (ARTEX-Assessment/1.0), but it is opt-in, scoped to specific origins, and attached only to ARTEX’s custom HTTP tools and enrichment routines. It disappears on WebFetch, on cross-origin redirects, inside browser-extension session replays, and across every Bash tool (curl, sqlmap, nuclei, and ffuf). Treating that User-Agent as a detection rule or a WAF allowlist misses most of the traffic.
Second, task_scope is a coverage denominator, not enforcement. The codebase says so directly: nothing blocks a tool call outside task_scope. Scope enforcement belongs to the target gate, which is off by default and exposed only over the API. If you approve an authorized test based on a scope list in a task description without checking whether the target gate is enabled, you do not have a technical boundary.
Third, raw scanners bypass the rate governor. Even when an operator enables pacing, the egress governor only throttles ARTEX’s internal HTTP clients plus curl, wget, and python-requests routed through the capture proxy using artex-pace proxy userinfo. Raw scanners like nmap are never paced by the governor. Noise profiles only pass CLI flags (nmap -T{2|3|4} --max-rate, nuclei -rate-limit, httpx -rl, ffuf -rate, and sqlmap --delay --threads=1).
Fourth, go-mitmproxy runs with SslInsecure: true and never validates target TLS certificates. Defenders sometimes expect offensive tools to abort or change behavior when they hit a TLS-inspecting middlebox. ARTEX will talk straight through defensive TLS inspection without noticing.
Fifth, hosts that break MITM at the protocol level trigger a 60-second fail-open tunnel that bypasses recording. If an operator audits their local capture store after an engagement and tells you a sensitive system was never touched, an empty capture database does not prove non-contact.
How to spot an ARTEX engagement
Static signatures will not carry detection against a platform built out of standard CLI tools and an LLM loop. The reliable signals live in protocol mismatches and behavioral waves over time.
Start with the wire and session anomalies. Because agent HTTP traffic runs through go-mitmproxy, requests originating from curl or other CLI tools present a Go crypto/tls handshake fingerprint paired with a CLI User-Agent. When an operator uses the MV3 browser extension, telemetry shows a human login and 2FA/OTP completion followed immediately by machine-timed API bursts from the operator’s IP riding that same session. Ahead of HTTP sweeps, enrichment drives DNS churn from dnsx, subfinder, and bbot. When pacing is turned on, traffic settles into 2, 5, or 20 requests per second per host with jitter capped at 250ms, stepping sequentially one host at a time. There is no built-in out-of-band (OOB/OAST) callback channel.
Behavioral waves are an even stronger signal than any single packet.
ARTEX maintains a coverage ledger of up to 2,000 rows per task and touches every in-scope asset before marking a surface ruled_out. That produces coverage-shaped completeness on boring assets: static endpoints and low-value services that human testers abandon as soon as they find a richer lead still get probed methodically. At the same time, fingerprint deduplication and local traffic replay keep repeat rates much lower than conventional automated scanners.
Traffic also arrives in distinct probe-then-silence read/write cycles. Bursts of active requests stop for long stretches while workers query their local traffic_search SQLite index (instructed not to curl the same URL twice) and draft structured findings. Under default concurrency, three workers probe separate attack vectors in parallel from one source IP, then converge on the same target once one worker confirms a useful fact. Around every candidate finding, you will see deliberate self-refutation traffic: negative control requests sent to disprove the worker’s own hypothesis before committing a report.
The tail of an engagement leaves two more markers. When an operator sets token or wall-clock budgets, workers switch to write-only mode (Bash hidden) as soon as the reserve (max(5%, 20k tokens, 2 turns)) is hit. Probing stops abruptly all at once while the platform finishes writing reports. Later, low-volume re-test waves return to a single endpoint with the exact proof-of-concept payload paired beside a normal control request.
What I change
On the systems and security programs I am responsible for, five changes follow directly from what is in this codebase.
- Treat unfamiliar AI and security repositories as untrusted data. Read them statically, keep agent tooling with shell or network access out of the directory, and delete the checkout once your notes are extracted. An HTML comment in a README is enough to turn a routine review into unintended command execution.
- Build detections around behavioral waves and TLS mismatches instead of User-Agents. Alert on Go
crypto/tlshandshakes behind CLI User-Agents, multi-track probing from one source IP across low-value endpoints, burst-and-silence cycles, and negative control probes paired with exploit attempts. - Audit runtime guardrails on every authorized agentic engagement. Before a vendor or internal red team runs a platform like ARTEX against production or staging, verify that the target gate is enabled over the API, confirm how raw scanners are constrained, and never accept an empty proxy capture store as proof that a host went untouched when protocol errors open a 60-second unrecorded tunnel.
- Keep defensive TLS inspection on and keep patch cycles inside hours. Because ARTEX sets
SslInsecure: true, your TLS-inspecting middleboxes give you full payload visibility without alerting the agent. That visibility matters only when you close reachable weaknesses on the same-day cadence I laid out in Agentic Threats Have Changed the World. - Monitor authenticated sessions for sudden cadence shifts. Browser extensions that hand live post-2FA cookies to autonomous workers turn one human login into parallel machine traffic. Alert when an interactive login transitions into machine-paced API calls on the same session, and require step-up verification on high-impact actions.
Related insights
Agentic Threats Have Changed the World
It is time to stop what you are doing and enable the rapid catch-up before impact. Put a plan in place to tighten that notice-to-fix cycle and keep it going. Then get back to work on other things. The impact and the blast radius are not worth the delay.
The Token Bill Is the New Cloud Bill: When Nobody Owns Consumption
AI seats were a project. Agent loops are an operating cost. An executive model for token fat tails, hard-cap rationing, cost per completed owned outcome, and why platform teams—not a monthly invoice—must own the meter.
The Review Bottleneck: When AI Writes Faster Than Humans Can Own the Contract
AI did not remove the human constraint—it moved it from typing to review, and it thinned product ownership of the ask and the outcome. An executive model for review capacity, contract review versus style review, shipping too fast, and when to add gates instead of more senior reviewers.