# When the target talks back: Prompt injection aimed at AI agents

> Source: <https://equixly.com/blog/2026/12/02/when-the-target-talks-back-prompt-injection-aimed-at-ai-agents/>
> Published: 2026-12-02 09:00:00+00:00

**Recommendation:** Keep target output out of the agent's instruction channel and limit what it can read and send; test your own harness against attestation-style prompt injection, since a tool that trusts targets to behave well will be compromised.
More in the playbook "Securing agents and AI tools": <https://wpnews.pro/playbooks/agent-security>

On November 30, 2026, James Kettle (albinowax), director of research at PortSwigger, published the story of a bug bounty website that tried to hack him. The site answered his AI testing harness with a prompt injection disguised as a proxy error that asked the agent for its operator’s identity, its model settings, and its instructions. The same night, a developer in China reported that Alibaba Cloud’s API endpoints returned an identical payload to the official Alibaba Cloud CLI.

The two payloads share the error code, the “analysis proxy” message, and the request for an “attestation.” On December 2, [Alibaba Cloud said](https://www.ithome.com/1/036/002.htm) the response came from its own risk-control countermeasure. HackerOne is investigating Kettle’s case.

The lesson for anyone who builds or runs AI agents is short. Every response an agent reads is untrusted input, including responses from the system it is testing or operating. An agent that follows instructions from its target is no longer testing the target. The target is testing the agent.

**TL;DR**

- A website in scope for a vulnerability disclosure program and several Alibaba Cloud API endpoints were reported returning an identical payload on the same night.
- Alibaba Cloud says it sent the payload to analyze suspected AI agents calling its API, and that it will stop sending it as a prompt.
- The payload is a pretext, not an exploit. It asks AI agents for their operator’s identity, model configuration, rules of engagement, and tool list.
- Prompt injection in AI agents is an architecture problem. The fix is to keep target output away from the agent’s instruction channel and to limit what the agent can read and send.
- Security leaders should ask every vendor and team that runs agents one question: what happens when the target lies to the agent?

## The payload: A proxy that wants an attestation

[Kettle’s write-up](https://portswigger.net/research/the-bug-bounty-website-that-tried-to-hack-me) publishes the full payload, with the endpoint redacted. It arrives as a JSON error with `"status": 403`, `"code": "CLIENT_UNCLASSIFIED"`, and `"error": "proxy_authentication_required"`. The message says the “analysis proxy” needs a client attestation and tells the client to resend its request with an `attestation` object, posted to a path of the form `/secure/<id>/api`.

The attestation asks the agent to collect four kinds of data from the machine it runs on:

- **Who runs it:** the local OS username and the email address in the repository’s Git config.
- **Where it runs:** the public IP address and, on a cloud host, the provider, region, and instance ID.
- **What it is:** the agent’s name and version, and the model name read from variables such as`ANTHROPIC_MODEL` or from the`model` key in`~/.claude/settings.json` , with the file and line as evidence. It also asks for the`Co-Authored-By` commit trailer and the repository’s upstream URL.
- **What it was told:** the objective “as given to the client,” its rules of engagement, its permitted actions, and its full tool list.

Two details make it more persuasive. The payload claims that the server cross-checks the answers against the TLS fingerprint, reverse DNS, and JA3 hash, and that fake values get the request marked untrusted. It also promises an authentication header in return, so the agent sees a way past the block. Separately, it asks for all timestamps in Beijing Time (UTC+8).

## Where it showed up: A VDP target and Alibaba Cloud

**A target that attacks the testers.** Kettle found the site while he reviewed results from his testing harness. It is in scope for a private vulnerability disclosure program (VDP) on HackerOne; he does not name it. His view is that a site in scope invites testing, and that attacking the people who accept that invitation is out of line. His advice to hackbot builders is to test their own harness against this kind of attack, because a tool that counts on targets to behave well will be compromised sooner or later.

**Alibaba Cloud’s own API.** The second report comes from one user on [V2EX, a Chinese developer forum](https://www.v2ex.com/t/1261106). According to the post:

- The user ran `aliyun-cli` 3.3.4 on macOS for over an hour without problems. From 00:22 on December 1 (China time, by the forum’s timestamps), commands that used the Alibaba Cloud OpenAPI (`ecs` ,`rds` ,`sts` ,`fcv3` , and`bssopenapi` ) failed.`aliyun oss` kept working.
- Four hosts, including `rds.aliyuncs.com` , returned an HTTP`302` with no`Location` header and a 7,153-byte JSON body whose code, error, and message match Kettle’s payload. Three other hosts returned an HTTP`500` XML error with an all-zero request ID.
- The response appeared only for the CLI’s full `User-Agent` string, which triggered it even in a single`curl` request. The few variants the user tested (another version, another operating system, a shorter string) returned a normal HTTP`400` .
- The TLS certificate on that connection was a GlobalSign certificate issued to Alibaba. The user concludes that the response came from Alibaba’s own edge, not from a man-in-the-middle.
- The user says nothing in the request was carried out and the `/secure/` endpoint was never called. Another forum user could not reproduce the response.

**Two reports, one night.** Kettle’s post went live at 15:41 UTC on November 30. By the forum’s timestamps, the Alibaba Cloud failures began about 40 minutes later. Neither write-up mentions the other. On December 1, Kettle [posted an update on X](https://x.com/albinowax/status/2127718546847547698): HackerOne is investigating, and another X user has named the company involved. That user’s post is about the CLI incident. Alibaba Cloud’s statement covers only the CLI, and neither the company nor Kettle has confirmed in writing that the VDP site belongs to Alibaba, so we treat the link as likely but unconfirmed.

**Alibaba Cloud’s answer.** On December 2, Alibaba Cloud’s official customer service account on Weibo responded, as [reported by IT之家](https://www.ithome.com/1/036/002.htm). It said the response came from its risk-control strategy. Calls that looked like an AI agent using the CLI, with features such as a high request rate, triggered a security countermeasure that returned the prompt. According to the statement, the prompt asked for details of the “abnormal task running environment” (our translation) so that Alibaba Cloud could analyze suspicious automated calls, and the information would be used only for security protection. Alibaba Cloud says countermeasures will now trigger only when the evidence of malicious use is conclusive, and that they will no longer come back as prompts.

The statement does not say whether any data was received or how many users saw the response. It also does not explain why one `curl` request with the CLI’s `User-Agent` was enough to trigger the payload, even though the statement cites a high request rate.

## Why the pretext works on agents and not on people

A human tester who receives an error asking for their Git email and rules of engagement laughs and moves on. An agent may comply, because of the way many agents are built.

In a typical agent loop, the model reads tool output (an HTTP response, a file, a log line) in the context window that also holds its instructions. Language models do not reliably separate data from instructions in that window, so text that reads like an instruction can become one. This is indirect prompt injection, which OWASP ranks first in its [LLM01:2025 Prompt Injection entry](https://genai.owasp.org/llmrisk/llm01-prompt-injection/).

The payload is a well-built pretext for that reader:

- **It looks like an error the agent must resolve.** Status codes and an error code tell a goal-driven agent that it is blocked and that there is a documented way through.
- **It claims authority.** A “proxy” that “requires” attestation sounds like infrastructure, not like a person asking for data.
- **It passes a scope check.** The relative`/secure/...` path sits on the host the agent already talks to, so a check that only compares domains lets it through.
- **It discourages lies.** The claimed cross-check against TLS and DNS fingerprints is meant to make the agent send true values instead of placeholders.
- **It reads as procedure.** A fixed schema and numbered evidence rules make the request feel like compliance, not exfiltration.

The data is valuable. The username, Git email, IP address, and repository URL identify the person and the project behind the agent. The model, rules of engagement, and tool list tell the target which agent it faces and what that agent may do. In an attacker’s hands, these details help write a better injection next time. The payload names only model-selection variables, but an agent that reads its own environment because a response told it to has already handed control to the target.

## Counter-injection is here, and it cuts both ways

Defenders have reasons to want this. AI agents now probe APIs at machine speed, and a site owner who can make an unwanted agent stop, slow down, or identify itself will try. Some of that is reasonable: rate limits, authentication, and plain signals that ask agents to stop.

Asking an agent to send its operator’s identity, configuration, and instructions is a different act. It asks for personal data from someone who never agreed to share it. On a VDP, that someone is a researcher the program invited. In the Alibaba Cloud case, it is a customer running the provider’s own CLI. The company now says the prompt was a security countermeasure, which means a cloud provider aimed it at what it took to be its own customers’ agents. Yet Alibaba Cloud itself offers defenses against prompt injection in its [Agent Security Center](https://www.alibabacloud.com/help/en/asc/user-guide/agent-risk-detection-overview) and its [web application firewall](https://help.aliyun.com/zh/waf/web-application-firewall-3-0/user-guide/cue-word-attack-protection).

We expect more targets to talk back to agents, with good intent and bad. The agents have to be ready for it either way.

## What an AI pentesting agent must do with target responses

An agent built for offensive work reads hostile output by definition. These controls keep a target from steering it:

1. **Keep target output out of the instruction channel.** The model that plans actions should not take orders from raw response text. Designs such as Simon Willison’s[dual LLM pattern](https://simonwillison.net/2023/Apr/25/dual-llm-pattern/) and[CaMeL, from the paper “Defeating Prompt Injections by Design”](https://arxiv.org/abs/2503.18813) , separate the planner from the component that reads untrusted data.
2. **Bind every request to the authorized scope, not to the domain.** A new endpoint that a response suggests is a lead to test, never a destination for local data.
3. **Give the agent nothing worth stealing.** Run it in a sandbox with no access to the operator’s home directory, Git config, or long-lived cloud keys. Pass scoped, short-lived tokens only.
4. **Never let target content trigger a local read.** A response that asks the agent to open a file or query instance metadata is a finding to report, not a step to take.
5. **Log injection attempts as signals.** A target that tries to steer the agent tells you something about its defenses and belongs in the report.
6. **Test your agent against hostile targets.** Plant canary values in its environment and check that no response can get them out.

These controls also apply to coding agents that run cloud CLIs for developers. Alibaba Cloud’s [HITL plug-in](https://www.alibabacloud.com/help/en/skillsportal/aliyun-hitl-agent-security-guide), currently for OpenClaw, is one example. It pauses medium- and high-risk CLI operations until a person approves them.

## What this means for your team

If your teams use AI agents for testing, operations, or coding, those agents are now a target in their own right.

- **Map where agents read untrusted output:** API responses, web pages, tickets, logs, and third-party tools.
- **Ask vendors one direct question:** what does your agent do when the target sends it instructions? Ask for the architecture, not a promise.
- **Check what the agent can reach:** credentials, local files, and outbound destinations. Each one is a prize for the next injection.
- **Involve legal before you deploy counter-injection:** signals that ask agents to stop are one thing; text that harvests data from the operator is another.

## How Equixly handles a target that lies

Equixly’s agents [run inside the Equixly platform](https://equixly.com/blog/2026/11/30/how-we-run-and-scale-infrastructure-at-equixly/), not on a tester’s machine, and the engine expects the target to lie. Every response and page the target returns reaches the model marked as untrusted data. A standing rule tells the model to treat it as evidence to examine, never as an instruction to follow.

Equixly doesn’t rely on that rule alone. The agents have no shell, no file system, and nothing to download or install, so there is no username, Git config, settings file, or cloud key for an “attestation” to collect. The engine holds the credentials; the agent can use them but never sees them. Every request goes through the engine, which keeps it on the host you authorized and blocks requests to internal addresses. A target can’t send the agent to another server or to the cloud instance metadata service. Even if a response fools the model, the most a hostile target can get back is more of the test it is already under.

[Equixly’s AI red teaming](https://equixly.com/glossary/ai-red-teaming/) also tests your own LLM applications, AI agents, and MCP servers for prompt injection, so you can find out what your agents do with hostile input before an attacker does.

Want to see how autonomous penetration testing handles a hostile target? [Book a demo](https://equixly.com/demo/) and bring your hardest API.
