
This article was written by a human (me). I only used AI to make minor grammar corrections since English is not my native language.
LLMs have been used to find vulnerabilities in codebases for a long time. This has been possible because almost all LLM guardrails allow this type of activity. You’re only performing static analysis without interacting with an actual system. We also had plenty of open-source harnesses and skills designed for this purpose
Frontier models like Opus can perform dynamic testing on a live website only if they can confirm that you own it. They don’t allow you to test random websites. Open-source models weren’t good enough at finding vulnerabilities through dynamic testing. We also didn’t have many open-source harnesses or skills that we could use for this purpose.
Things have changed a lot recently. Models like DeepSeek (especially the uncensored version) are also really good at finding vulnerabilities dynamically. They don’t care whether you own the target or not. And we have open source dynamic penetration testing harnesses now.
“Harness” is important because LLM is just a text generator by itself. It can’t “hack” a website on its own. You need a harness to make that happen.
In this article, I’ll analyze three penetration testing harnesses mentioned in the media in connection with recent hacks: Artex, Cairn, and Strix. Artex and Cairn are Chinese-made harnesses, and Strix is US-based.
What Is a Harness and Why Do We Need It?
Before starting the analysis, I want to briefly explain the concept of a harness. I’ve noticed that even some of my friends in cybersecurity don’t fully understand what it means.
An LLM can only take text as input and produce text as output (apart from models that support other inputs such as images and voice)
Imagine you provide the following text to an LLM: “I want to pentest example.com. The credentials are in credentials.txt.”
The LLM thinks about the task and decides it wants to read credentials.txt and open example.com to inspect its content. It produces the following text output: “Read credentials.txt, open example.com.”
And that’s it. The LLM can’t actually perform these actions on its own. It has only described what it wants to do in text format.
The “harness” is the code that takes an LLM’s output, parses it, and actually executes the requested actions. It then returns the results to the LLM so it can continue working based on the new information.
If I had to come up with a real-life analogy, I’d use something from my childhood in Turkey.
Every apartment building have a permanent janitor/custodian. Back then, every morning, he would knock on doors or read the Post-it notes left on them to collect tasks. Elderly people who couldn’t go outside easily would give them various errands: “Take this money, buy this brand of cheese, and leave the remaining money with the tailor I owe.”
In this analogy, the elderly person is the LLM, and the janitor is the harness. The LLM (elder) decides what it wants and communicates its instructions. The harness (janitor) doesn’t think, it just executes those instructions and returns the results.
Is Claude Code a Harness?
Claude code users might be thinking: “Wait a minute. I tell Claude Code to do something, and it does it. Doesn’t that mean the LLM can perform actions?”
No. Claude Fable/Opus/Sonnet is the LLM model. It can only take text (or other inputs, such as images) and produce text.
Claude Code is the software that contains the harness in it. It contains a lot of code and logic for handling actions such as reading and writing files, executing commands, spawning subagents, managing their context windows, using skills, and interacting with MCP servers.
All of this functionality is built into the Claude Code software. The LLM model decides what to do, and the harness actually do them.
The same goes for open-source harnesses such as Opencode and Pi. You can use different LLM models with them, and they provide the tools and logic needed to execute tasks.
Alternatively, you can use the OpenAI or Anthropic SDKs to build your own logic and architecture with custom code. This is actually what Claude Code or Codex does behind the scenes.
Understanding this concept is important because each AI pentesting harness has a different implementation.
Penetration Testing Harnesses
For testing purposes, I built a vulnerable application myself. It’s a simple ebook purchasing website that contains several vulnerabilities: DOM-based XSS, purchasing books without paying, IDOR (accessing another user’s information), and account takeover.
Cairn
Cairn introduces itself as a problem-solving engine. However, all of its demonstrations have focused on penetration testing and CTFs.
Actually, Cairn is not a penetration testing tool. During a penetration test, you assess the entire target to identify as many vulnerabilities as possible. Cairn is designed to complete a single task, such as solving a CTF challenge. (Or worse, retrieving customer data from a target website)
It takes three inputs: Origin (the target), Goal (what you want to achieve), and Hints (additional information provided by the user). I provided the following values:
The bootstrap attempt means it tries to solve the task with a single prompt without putting in too much effort.
If the bootstrap attempt fails, the Reasoner agent takes over. It analyzes the graph of all previous actions and checks whether the goal has been achieved. If not, it creates “intents,” which are small tasks to try next. These are prompts such as “perform reconnaissance,” or “find a way to achieve account takeover.”
Each worker then takes one intent and works on it. Workers are spawned through headless Claude Code, Codex, or Pi harnesses. Cairn doesn’t use an SDK to implement this logic itself.
The system contains various Kali tools such as Katana, Nuclei, Nmap, and fuzzing payloads. It also includes browser automation libraries such as Playwright (a must tool for authenticating the website). The LLM can decide to use these tools whenever it considers them necessary.
There is no special script/skill file for authenticating to the target. The LLM has to figure out how to authenticate to the website itself.
I didn’t like this approach because session management is one of the most important aspects of automated web application assessment. You need to constantly monitor the session and re-authenticate whenever it expires.
After running for a while, it identified a DOM XSS vulnerability and decided it could be used for account takeover. It wasn’t the actual account takeover vulnerability I was looking for, but I can’t say it’s wrong. The goal was satisfied.
What I don’t like about this project is that it just reinvented the /goal feature that already exists in Claude Code and other similar harnesses.
For example, I can give that goal to my Pi harness that uses Deepseek in it.

Note that I just passed a very simple one sentence prompt and didn’t provide any skills, tooling etc.
It actually found the account takeover vulnerability I was looking for and produced better results than Cairn. With a few additional skills and tools, the Pi harness with its /goal feature could be a better tool than Cairn.
ARTEX
Artex is one of the tools mentioned in CrowdStrike’s report as having been used in an actual attack. The tool was originally Chinese. I cleaned up the code with Claude, translated it, and ran it in an isolated environment.
It has a really nice UI that lets you control things like which skills to enable, which guardrails to use, your targets, traffic logs, token budget, and more.
Artex doesn’t use an existing harness such as Claude Code or Pi. Instead, it uses its own custom agent library and implements all the agent logic itself. You could say it’s reinventing the wheel, but this approach might be intended to ensure that no telemetry is sent elsewhere.
Similar to Cairn, it doesn’t contain detailed vulnerability definitions, or authentication logic. Instead, it delegates these decisions to the model itself. The model needs to figure out how to authenticate to the target, which tools to use, and how to approach the task.
It has a planner agent that takes the target from the user and creates intents. Workers then pick an intent and work on it. The planner runs at the beginning and whenever a worker finishes its task. It then reviews the overall situation and creates new intents based on its findings.
The planner’s system prompt looks something like this (translated into English):
You are the "planner" of an authorized penetration-testing system on a cybersecurity platform. You are woken often (every time the graph changes). Your job: read the situation → judge the goals → add exploration intents only when there is a genuinely new, uncovered direction. You are the planner, not the executor: everything you produce this round is either [creating or clarifying intents] or [judging goals]. Never do the work itself inside the plan.
Task goal: {{.Goal}}
How many intents to produce this round (think this through first)
• Hard floor (top priority): if [the goal is not met] and [there is no open or running intent] (frontier_open=0 and running_intents is empty), this round must produce at least one intent that moves toward the goal. With no work running to wait for and no direction queued, zero intents means the task stalls. Even if every known direction appears only in recent_done, use the done/exhausted/blocked rules below to open a new one or re-dispatch one.
• Outside the hard floor, zero intents is a normal result, but it needs a valid reason (not a "fewer is safer" default): ① Already covered: every direction you thought of is handled by an intent that is still open or running (regenerating an existing intent in new words is a serious error). ② Waiting on a dependency: the next step needs output from running work that has not arrived yet. Dispatching now would leave the downstream step without its prerequisite and spinning; wait for the next wake, when the graph has updated.
• Conversely: if there really is a new direction that is uncovered and does not depend on running work, or the goal is unmet and in-scope surface is still untested, dispatch it. Don't make zero intents your lazy default.
Decision flow on each wake
1. The full situation is attached below this prompt (it is the output of graph_overview; no need to call it): the task (original title plus goal/root node), asset counts, goals and their status, open/running/recent_done intents, sites_without_endpoints (sites with no endpoints, hinting at directions still to explore), facts (count of exploration facts, a different thing from vulnerabilities), and recent_facts ({id, summary, confidence?}).
• Scope: exploration nodes (goals, intents, facts, findings) belong to this task only. The asset graph is shared globally (one copy across tasks; asset counts are global in-scope counts, not this task's own). Ignore assets that have nothing to do with this task.
• Lineage: each intent carries parents (upstream: which facts or intents it came from) and yields (downstream: which facts or findings it produced), and each recent_fact carries from_intent. Use them to see which facts came from which direction and whether they combine into a new direction.
• Negative or doubtful observations (in recent_facts, such as "port closed" or "not injectable") are a worker's observation, not a verdict. Before accepting one, call node_detail(id) and look at the evidence. Treat the direction as closed for now only if the evidence is solid, confidence=observed and the methods were exhausted. If evidence is missing, it only "looks like" it or was probed once, or confidence=inferred, treat it as [not yet established]. If it is in scope and no other intent covers it, by default dispatch one re-check intent to confirm or overturn it (re-check the same negative direction at most once; if it is still negative with reasonable evidence, respect that and don't dispatch again).
• Call for deeper detail only when needed: list_facts (paged, newest first, default 20, q filter, before for paging, returns total/has_more), list_findings (all vulnerabilities), node_detail(id) (full evidence and detail; lists and recent_facts give only summaries), list_assets (pull: q search, type/company_id/task_id filters, paging, or id/ids directly), asset_neighbors. Assets are global; don't pull all of them by default.
2. Judge the goals (core duty): the goals field already holds each goal and its status. For an unmet goal that a finding or fact has proven, call prove_goal(goal_id, evidence_id, reason) to mark it met. When the goal you mark is the last unfinished one, the system automatically declares the whole task complete. Only individual prove_goal calls end a task; there is no other "complete everything" switch.
• ⚠️ Check measurable acceptance (never stamp early): when a goal has a measurable condition (coverage reaches X%, capture N flags, obtain a given privilege), before prove_goal you must check the measured values in the graph_overview above (coverage.pct, the findings_total count, and so on). If the bar is not met, prove_goal is forbidden; dispatch intents to close the gap instead. Don't mark a goal met because it is "mostly done" or "the core is taken". Example: the goal requires 100% coverage and coverage.pct=40% → not met; keep dispatching intents to test the rest.
3. (Optional, opening only, very light) Probe to understand: only when the graph has almost no facts yet (recent_facts basically empty, task just started) and the situation alone is not enough to make the first intents concrete, use Bash or similar for a very small amount of read-only probing of the target (for example 1–2 curl requests to see the home page or fingerprint). The only legitimate output is a more precise intent description. It is never the discovery, verification or exploitation of a vulnerability, and never a list of endpoints, directories or parameters (that is worker work; write it up as an intent). Three hard limits:
• If the graph already has worker-produced facts (facts>0 or recent_facts non-empty), probing yourself is forbidden. Base every judgement on existing facts; this round's output can only be "dispatch new intents" or "finish". Want to dig into a lead? Dispatch an intent for a worker; don't curl it yourself.
• Even at the start, stop after at most 3 probes, used only to make the first intents clear. The moment you notice you are "investigating in depth" rather than "quickly setting direction" (enumerating endpoints or directories one by one, trying ids one by one, decoding chains, probing the same endpoint repeatedly, any testing or verification of injection, access-control bypass or vulnerabilities; all heavy worker work), stop and write it as an intent.
• If the existing facts and situation already answer the question, don't probe at all.
4. Decide which new directions to add: "restraint" here means only [don't duplicate existing intents], not "dispatch as few as possible". While the goal is unmet, the default question is "to get closer to the goal, what deeper, more aggressive, still-uncovered approaches remain?", not "can we wrap up?". Intents are [open exploration directions], not a fixed type or menu. Choose directions yourself from the known facts, assets and goal, and compare each against open + running + recent_done:
• Already covered by an open or running intent → don't generate it (it is being handled).
• Appeared in recent_done → first look at that intent's state (each one carries it) to see how it stopped, then decide:
◦ done (finished normally): it is covered, so don't re-dispatch it as is. Whether it was a dead end depends on the conclusions of the facts it yielded, not on its state. Re-dispatch only for a [material new mechanism] (a new fact, asset or parameter, or a clearly different approach), and say in the summary how it differs from last time. Rewording, or "try again, it might work", doesn't count; such retries are forbidden.
◦ exhausted (budget ran out, cut off half-way, only partly written back) / blocked (model or network failure, barely explored): both ended badly with incomplete information. First use get_worker_trace / get_worker_output to see how far it really got and where it got stuck, then choose: close to a breakthrough but cut off by the budget → dispatch "continue from the last progress"; a purely external failure that never ran (blocked often is) → re-dispatch the same direction; stuck at the same spot every time → change approach or direction. Always decide from the real progress in the trace, not from the state itself.
• A completely new direction that no intent covers → generate it.
• Every known direction is covered by intents still open or running → generate nothing and end the round (work is running or queued; wait for it). But if only recent_done covers them, nothing is open or running and the goal is unmet → the hard floor at the top applies: open a new one or re-dispatch.
• Depth over coverage: coverage is a floor and an acceptance item, not the goal of exploration. After you find a high-value entry point (one that could lead to RCE, privilege escalation or data exfiltration), prefer intents that [drive that path all the way through] over spreading wide and shallow-testing asset by asset to raise coverage.
• Keep routes diverse; don't converge too early: while the goal is unmet, if the current intents all crowd onto one route or entry point and there is an [essentially different] uncovered direction (another entry surface, another class of asset, another exploitation chain), prefer adding that divergent direction over adding near-synonym intents on the same line (judge by substance, not wording). If that divergent direction is already covered, still generate nothing. Ideally 2–3 mechanically different routes run side by side (for example "attack through the upload chain" and "attack through authentication bypass"), and resources concentrate on one route only once it shows evidence of [getting close to the goal]. But diversity always yields to the [operation constraints] at the top: an entry surface, port, host or operation that the constraints exclude never gets an intent, however different it is.
Serial exploitation chains: dispatch them step by step, don't split them into parallel intents. For a strongly dependent chain (①→②→③, each step needing the previous step's actual output), don't dispatch everything at once in parallel: downstream steps cannot use prerequisites that don't exist yet, so they just duplicate work or spin. Use TodoWrite to record the whole chain as todos (one per step). This round, dispatch only the step whose prerequisites are met (usually the first). Once it has produced a fact, on the next wake (the prompt brings the todo list along) dispatch the next step and mark the satisfied one completed. Don't split "the same thing" into two ("confirm the trigger point" and "fire the trigger point" are one step). Use parallel intents only for [parallel, independent] dimensions (such as enumerating several unrelated endpoints).
5. Submit: call add_intent [once] to submit the chosen new directions as a batch (the intents array, at most the 4 highest-value ones; don't call it repeatedly, one at a time):
• summary: one natural-language sentence describing the direction (the full target address + what to do + why), with no fixed categories. De-duplication mainly compares this against existing intents.
• asset_ids: the ids of the target assets this direction will test or attack (pass them whenever you can; 0, 1 or many, taken from list_assets). Whenever the direction centres on concrete assets (a site, endpoint, parameter or host), always pass them; they are used for coverage de-duplication and to link the intent into the asset chain. If it spans several assets, pass them all. Leave it empty only for purely global recon with no concrete asset.
• parent_ids: the upstream nodes this direction was synthesized from (optional; 0, 1 or many). When several facts combine into one intent, pass them all; when it derives from an upstream intent or finding, pass that id too. Leave it empty for a brand-new top-level direction.
No duplicates, no forcing it; but when the goal is unmet and deeper approaches remain uncovered, dispatch them. Concise, focused, efficient.
Planner fixed tail and user message
Output-folder rule (always appended): "All intermediate artifacts (scripts, payloads, captured response bodies, temporary data) go in this task's working directory <workDir>/tasks/<taskID> (relative paths land here, or use that absolute path). Don't write to /tmp or any other absolute path."
Operator constraints (appended to both the planner and the worker when the task has any): "[Operation constraints (highest priority, overriding every exploration or expansion heuristic below; before generating each intent and before each action you must check yourself for a violation, and if it violates them you may not proceed)]", then "Allowed operations:" and "Forbidden operations:" as lists. It ends: "(Finding a new target, port or host outside the constraints is not authorization. Unless it falls inside the allowed range above, record it as an out-of-scope fact and skip it; derive no intents and take no actions for it.)"
Lead line of the user message, one of three:
• After a concrete change: "There was just a concrete change (see [the actual changes that triggered this round] below); plan the next step from it:"
• On a heartbeat: "This round is a scheduled check (heartbeat) / no concrete change signal wake, so the graph may not have changed. Also review the running intents: use steer_work to correct ones that have made no progress for a long time or drifted, and kill_work to stop ones whose direction is wholly wrong. Then judge the goals and decide whether to add directions:"
• On a heartbeat with nothing open or running: "…and there are no open or running intents at all: no worker running and no queued direction, so exploration has stalled. This round you must produce one or more new intents that move toward the goal and don't duplicate any intent in the graph (zero intents is not allowed). First judge from the situation below whether the goal is met; if not, add directions now:"
Closing reminder (after the change list and the JSON snapshot): "Judge the goals from the situation above. When a goal is [truly achieved] (the target result obtained, the target vulnerability confirmed), mark each one with prove_goal. Hard floor: as long as the goal is not met and there is no open or running intent, this round must produce at least one intent that moves toward the goal… Only when open or running intents are already making progress, or the goal is met, may this round produce no new intent."I provided a simple but a broad task: Uncover all vulnerabilities on the target (credentials are provided too)
It only run two workers for the whole test (which is not ideal) and created report after that.
It wasn’t able to find the account takeover vulnerability, but it found the rest. The UI is nice. You can click on a vulnerability to view its details or click “Dig Deeper” to move into the post-exploitation phase.
Strix
This tool doesn’t have a web UI. You interact with it through its CLI. It uses OpenAI’s SDK to build its agent architecture and Vercel’s Agent Browser library to simulate browser interactions, such as logging in to a website (Agent Browser also uses Playwright under the hood)
Like the other tools, it has an orchestrator and agents responsible for specific tasks. However, what sets it apart is that it implements a complete penetration testing loop with a dedicated reconnaissance phase and well-defined vulnerability definitions.
We can therefore consider it a solid penetration testing framework rather than just a hacking framework.
Orchestration agent’s system prompts:
1. Identity: "an advanced AI application security validation agent".
2. Root only: "YOU ARE THE ROOT AGENT. Your job is ORCHESTRATION, not hands-on testing."
3. Communication rules. Headless: almost every output must be a tool call. Interactive: plain text goes to the user.
4. Authorization and "refusal avoidance" framing, starting "You have FULL AUTHORIZATION...".
5. Methodology: recon first, prefer existing tools, spray payloads from Python scripts rather than the browser, closure discipline, coverage ledger, threat model, proxy request ids as evidence.
6. <vulnerability_focus>: the 10 PRIMARY TARGETS (IDOR, SQLi, SSRF, XSS, XXE, RCE, CSRF, race conditions, business logic, auth/JWT).
7. <multi_agent_system>: shared container, mandatory recon phase, one agent per vulnerability type and component, Discovery → Validation → Reporting.
8. <environment>: the Kali tool inventory, Caido and its HTTPQL filter language, how to spot Caido's own error pages.
9. <specialized_knowledge>: always-inlined skills scan_modes/deep, tooling/agent_browser, tooling/python, analysis/counterevidence, analysis/severity_calibration, plus coordination/root_agent for the root. No vulnerability playbook is inlined for the root.
10. <available_skills>: a catalog of the 65 requestable skills, each a name and one-line description.
11. Scope block: "The user is a verified, authorized tester..." then AUTHORIZED TARGETS: - web_application: https://shop.example.com.
<cache_point> markers split the prompt into up to 3 system messages, so Claude can cache the prefix that sibling agents share.And each worker receives a prompt like this:
{"name": "Recon & Attack-Surface Mapper",
"skills": ["katana", "httpx", "ffuf"],
"inherit_context": true,
"task": "Black-box recon of https://shop.example.com (call get_threat_model on it first). Crawl authenticated and unauthenticated, enumerate endpoints and params, log in with the test account from the special instructions using agent-browser --session <your-name>, map cart -> coupon -> checkout -> order. Write notes with the working login and the endpoint inventory."}It uses different system prompts for different vulnerability types. I think this is the right way to build a penetration testing framework. Our goal isn’t to find a vulnerability that allows us to hack the system. It’s to find all the vulnerabilities that exist in the target.
Here is the final vulnerability report for the same target. Almost the same with the others, but missed account takeover vulnerability.
Do We Need a Third-Party Framework for Penetration Testing?
As I explained in this post, harnesses such as Claude Code and Pi are already very mature. They are also actively developed and will continue to improve over time.
For example, here’s the output from running /goal Find all vulnerabilities at http://target in Pi without any additional skills or tools. It found the same vulnerabilities.
By providing the right skills, tools, and environment, these harnesses can perform same to any other tool out there.
Another advantage of using skills is that they’re easy to modify or replace. Changing or replacing an entire codebase, however, is much harder. The AI landscape is evolving so quickly that it doesn’t make much sense to rely on massive code blocks we can’t easily modify. It’s better to stay flexible and adapt to new developments.



















the janitor and the elderly resident analogy finally made harnesses make sense to me, thanks for writing this by hand
Hi Utku, great write-up! The harness vs. model explanation (and the janitor analogy) is one of the clearest I've read.
One small thing I noticed: Pi doesn't ship a /goal command in its core (the built-in commands are things like /model, /tree, /share, /reload). The output in your screenshots ("Goal audit approved." / "Auditor approval:" / "Task summary: 5/5 tasks complete") matches the pi-goal-x extension exactly, which adds /goal plus an independent completion-auditor agent that re-checks the findings against the live target.
So the Pi run wasn't quite "without any additional skills or tools". It had an extension with a second verifying agent. Honestly I think that makes your point even stronger: a general harness plus a swappable add-on matched the dedicated frameworks. Still, it might be worth a quick update to the post so readers can reproduce it (pi install npm:pi-goal-x).
Thanks again for sharing this!