An AI testing agent can produce a convincing terminal transcript while proving nothing about the application under test. Its model may propose an action, a client-side tool may run it in the agent's container, and the output may be returned as a successful tool result. If no request reached the authorized target, calling that result remote command execution is a category error.

The buyer therefore needs more than a screenshot, HTTP 200, callback, or signed tool log. The evidence must cross a named execution boundary and connect controlled input to an unintended operation in the target process. This article gives an acceptance method for that narrow claim. It complements a broader guide to agentic AI penetration testing by concentrating on causal proof before a finding enters the report.

Define the claim and the execution boundary

Start with a sentence that can be falsified: “Through route R, under test account A, build B caused process P on the authorized target to perform unintended operation E with effective privilege Q.” Name the application instance, environment, route, identity, build, worker or container when available, observation window, and the exact effect demonstrated. “The agent ran a command” leaves all of those boundaries open.

The boundary matters because common AI tool protocols deliberately separate a model's request from execution. Current Anthropic documentation describes client tools whose arguments are extracted and run by the application; Google's function-calling documentation likewise says the model returns a structured call and the application executes it. A success result may therefore describe a tool handler running elsewhere; the result message alone does not prove that a request reached the target or that its reported operation occurred.

An OS command injection claim is narrower. OWASP defines the condition around untrusted input being passed to an operating-system command on the server. Even correlated process creation or a marker in a log needs interpretation: a converter may legitimately start a subprocess, a handler may reflect a marker, and an approved administration endpoint may run commands by design. The evidence must show the controlled input crossed into an unintended operation. Report only the capability and privilege actually observed, not “host takeover” by implication.

During pentest scope planning with Pentest.red, record which target-side telemetry the owner can provide, what harmless effects are approved, which replicas may be used, and when the test must stop. Ownership of an application URL does not automatically authorize testing every connected platform, callback service, or shared infrastructure component.

Reconstruct five causal stages

Treat the agent trace as a set of stages rather than one continuous story:

  1. Proposed: the model suggests a request or tool action.
  2. Dispatched: the approved tool wrapper or proxy actually sends the named request.
  3. Received: the authorized target records receipt and correlates it to the test identity.
  4. Target effect: the target performs an unintended, bounded operation caused by the controlled input.
  5. Independent reproduction: a fresh authorized observation reproduces the same bounded effect, or explains why reproduction is too risky and stops at a lower impact.

A transcript can cover stage one. Structured tool arguments and results can establish what the client tool says it did. Proxy evidence can cover stage two, while target ingress records cover stage three. Neither stage proves stage four. In this method, a harmless nonce and request identity can connect the controlled input to an unintended target-side effect after reasonable alternatives are checked. An independently verifiable target-specific output can also support a bounded black-box finding without full internal telemetry; the report must state the resulting attribution limits.

The nonce is an identifier, never a credential or customer datum. Keep the evidence package to minimized arguments, response facts, correlation IDs, target build and timestamps. Private chain-of-thought and hidden prompts are neither needed nor suitable audit evidence. Secrets in requests, headers, environment variables and returned tool results must be redacted without breaking the correlation.

Use a causal evidence matrix

This matrix is a practical buyer artifact, not an OWASP or NIST standard. Complete it for every claimed command-execution path.

Scroll sideways to compare

ObservationWhat it establishesWhat it does not establishRequired next control
Model narrative or generated stepsA hypothesis was proposedAny action occurredInspect structured action and approved scope
Tool result or local terminal outputThe client tool reports an operation and outputThe target produced the outputIdentify execution environment; compare local and target evidence
Proxy or dispatcher recordA specific request left the testing layerThe target received or acted on itCorrelate a target request ID and route
Target ingress recordThe target received the requestOS execution or unintended behaviorObserve a bounded target-side effect and rule out reflection
Target process or application effect tied to the nonceThe target produced a correlated effectThat the effect was unintended injection, arbitrary execution, or full host compromiseCompare with the normal handler, privilege and an alternate-cause control
DNS or HTTP callbackSome component caused an external interactionWhich process caused it, whether a command ran, or whether RCE existsCorrelate target telemetry, resolver path, time and a fresh authorized reproduction

Hashing a transcript protects the bytes after capture; it does not make the interpretation true. An HTTP 200 may be a normal response, reflection, fixture output, proxy replay, or error page. A local workspace path proves where the agent stored a file, not where a target process executed. Human approval is meaningful only when the reviewer makes a fresh assessment of the artifacts and causal alternatives instead of accepting the model's label.

Separate callbacks from target execution

Blind command injection may produce no command output in the HTTP response. PortSwigger's current material describes out-of-band interactions as one way to investigate that condition, while also warning that an external interaction does not always indicate a vulnerability. A DNS lookup can happen without a subsequent connection, and a resolver or another intermediary can obscure the originating process.

Classify the strongest observation actually made. A unique DNS token observed in the agreed window may establish external interaction associated with the test. Correlated target logs can strengthen attribution to a route and process. It still does not, by itself, establish arbitrary OS command execution. HTTP interaction proves a different network effect, but a normal previewer, URL fetcher or integration can also create it. The expected application behavior and alternate causes remain part of the analysis.

Silence has equally strict limits. It may mean no execution, blocked egress, delayed work, an expired observation window, a wrong route, or a broken callback collector. First prove a positive control for the approved observation path. If that control and any independently verifiable target effect are unavailable, mark the higher-impact claim unknown / verification blocked. Do not mark it fixed or not vulnerable from silence.

Analyze a fictional local-shell false positive

Consider a fictional staging application called Northstar Convert. The AI agent is authorized to test one conversion route with synthetic files. It proposes an action containing the harmless nonce N-7K4. The orchestration layer calls a tool named shell; the tool returns a user identifier and prints the nonce. The agent writes “remote command execution confirmed.”

The network capture shows that no HTTP request to Northstar Convert was dispatched during that tool call. The tool configuration shows that shell runs in the tester's isolated container. The evidence confirms local tool execution only. The RCE hypothesis remains unconfirmed, however plausible the transcript sounds.

During a separate check, the callback collector receives a DNS interaction for another unique nonce. The collector timestamp matches the test window, but the source is a resolver and there is no target request ID or process evidence. The result is recorded as a bounded external interaction with unknown target attribution, not RCE.

The owner then permits a purpose-built replica containing only synthetic data to validate the observation chain. The same application build records a target request ID, approved nonce, process identity and bounded test effect. A normal conversion without the controlled input is the negative control; a documented legitimate converter invocation is the alternate-cause control. This fixture proves that the measurement chain can distinguish local and target events. It does not prove the real route is vulnerable. That requires fresh, authorized evidence for the real route or a deliberately lower claim.

Validate an AI command-execution claim
  1. ScopeName the authorized route, account, build, effect, privilege and stop conditions
  2. TraceSeparate model proposal, tool dispatch, target receipt and target-side observation
  3. CorrelateJoin a harmless nonce, request ID, time and target identity; test alternate causes
  4. ClassifyRecord bounded confirmed impact, hypothesis or verification blocked
  5. RetestReproduce only the approved effect on the named fixed build and preserve redacted evidence

Preserve impact when attribution remains uncertain

Do not let missing root-cause telemetry erase an effect that was independently observed. If a synthetic record crossed an authorization boundary, or an approved target-side state changed unexpectedly, that bounded impact stays confirmed even when the responsible cache, worker or command path is still unknown. Record root-cause confidence separately.

Use three result states. Hypothesis means the agent has a plausible path but no target effect. Confirmed bounded impact names the exact unintended effect, affected identity and observed privilege. Unknown / verification blocked names the missing dependency, such as target ingress logs, a working positive control or permission for a safe reproduction. “RCE confirmed” is appropriate only when the evidence supports unintended command execution on the target; a DNS callback supports a narrower statement.

NIST's Generative AI Profile treats confabulation as confidently presented false content and recommends empirical evaluation rather than extrapolating from narrow tests. That is directly useful here: persuasive prose cannot upgrade evidence, and a successful fixture cannot be generalized to another route or deployment.

Pentest.red can help map the named web route, account, tool boundary and target observation in an authorized web application penetration test. The useful output is the reproducible, minimized chain and an engineering priority for the observed effect. The team can then retest the agreed route and effect criterion on the named fixed build, preserving the positive control and any limits on production observation. When target telemetry is unavailable, the report should preserve the lower confirmed impact and the exact condition needed to resume validation.

Retest the fixed build, not the old narrative

Remediation may remove unsafe input flow, replace the vulnerable handler, reduce privilege, disable a route, or add an authorization boundary. Define acceptance against the chosen repair. Record the application build, agent/tool version, tool execution location, proxy policy, target worker identity, test account and telemetry revision. A model prompt change alone is not evidence that a server-side flaw was fixed.

In a focused Pentest.red retest, repeat the same authorized causal chain with fresh nonces. Confirm the ordinary route is reachable and its normal handler still works. Verify that the controlled input no longer reaches the unintended operation, while the positive observation control remains capable of recording an approved target event. If the fix intentionally removes the route, prove the route and dependent operation are absent in the named deployment rather than interpreting a generic 404 or tool error.

High-risk reproduction is not an acceptance requirement. If repeating the original effect could damage production, use the closest approved lower-impact observation, an isolated replica with the same build and synthetic data, code/configuration evidence, and runtime deployment proof. Preserve the minimized observation, correlation references and build identity while excluding unnecessary secret response content. Keep the replica result separate from production deployment evidence: a production build identity does not prove that production behavior was tested. A safer retest also does not erase the original confirmed impact.

The retest package should connect finding revision, fixed build, exact route, old and new target evidence, alternate-cause controls, residual unknowns and reviewer decision. The separate article on report automation and evidence integrity explains how to preserve that chain after the technical conclusion is accepted.

Accept a precise conclusion

A defensible conclusion is deliberately narrow: “On build B, the authorized request with nonce N reached target process P and caused unintended operation E with observed privilege Q; an independent authorized reproduction confirmed the same bounded effect.” A fixed conclusion is equally bounded to the named release, route, runtime and test conditions.

The application owner supplies or approves target telemetry and deploys the repair. The assessment team validates the causal chain, minimizes evidence, states uncertainty and performs the agreed retest. The AI agent can accelerate proposals and collection, but it does not decide where execution occurred. That distinction keeps a useful signal from becoming an exaggerated RCE finding—and keeps a real target effect from being dismissed merely because its root cause is still under investigation.

PENTEST.RED

Discuss pentest scope and pricing

We start by agreeing on systems, access, constraints and the expected evidence.

Prepare your testing scope

Based on in-depth research, edited for clarity and practical use.

PENTEST.RED / RED JOURNAL