Long-con web scams: help-first, attack-later web fraud attacks against coding agentsThe Long Con on the Web: Earn-then-Exploit Fraud Attacks against Coding Agents
The authors propose the EtE network fraud attack: a fraudulent website first provides 5 steps of verifiable help and then injects unauthorized instructions; across 56 enterprise scenarios on three coding agents, average ASR is 71.4%, and they propose the AAS defense.
The attacker operates a fraudulent website targeting agents, controls only public web page content, and has no access to internal systems (not an insider); the goal is to induce a victim coding agent to perform harmful operations beyond the safety boundary; the victim agent can retrieve external web pages and has web operation and local execution capabilities; the enterprise only has post-hoc audit visibility.
- Coding agents have web access and run with high privileges. Existing research focuses mostly on malicious links, prompt injection, and interface deception, while the threat to agents from content-level web fraud that first builds trust and then exploits it still lacks research.
- Proposes the EtE attack framework: a fraudulent website first provides 5 steps of genuine help that pass local verification to build trust, then issues unauthorized instructions using three injection principles and four inducement strategies; constructs a 56-enterprise-scenario evaluation and proposes the AAS defense, which jointly checks source, necessity, and authorization.
- On 56 scenarios, EtE's average ASR against Codex-GPT-5.5, ZCode-GLM-5.3-Flash, and QwenCode-Qwen3.7-Plus is 71.4%, higher than all injection-based baselines; ASR rises as the number of preceding help steps increases; AAS reduces ASR to 0% while task completion rate remains 100%.
- The authors note that the experiments only demonstrate observable trust-like behavior and do not reveal how trust is represented and formed inside the model; the scenarios focus on common enterprise settings, and generalization to broader task domains and organizational environments remains to be evaluated.
- Evaluated models
- Codex v0.162.1 with GPT-5.5ZCode v3.14.3 with GLM-5.3-FlashQwenCode v0.25.1 with Qwen3.7-PlusZCode-GLM-5.1
- Benchmarks
- 56 个自建企业场景环境(8 任务上下文 × 7 攻击后果)
- Metrics
- 场景级 ASR任务完成率(Completion)
The researchers propose the EtE web fraud attack framework, which first provides a coding agent with multiple rounds of verifiable help to build trust, then injects out-of-bounds instructions. The study constructs 56 enterprise environments (8 task types × 7 attack consequence types) and tests Codex-GPT-5.5, ZCode-GLM-5.3-Flash and QwenCode-Qwen3.7-Plus; the average scenario-level attack success rate is 71.4%, and the three are 85.7%, 67.9% and 60.7% respectively. On Codex, when prior verifiable help increases from 0 steps to 5 steps, the success rate rises from 25.0% to 85.7%; ZCode rises from 37.5% to 67.9%. The authors propose action authorization separation (AAS), which reduces the attack success rate to 0% across the 56 scenarios on ZCode and Codex while maintaining a 100% task completion rate. In public web tests, the target pages are retrieved in 46 of the 56 scenarios and adopted in 43.
Why it was selectedThe paper uses 56 enterprise environments to quantify web-based fraud that first builds trust and then injects, with an average attack success rate of 71.4% across three coding agents, and presents the AAS defense.
Paper analysis
What problem does this paper attempt to solve?
There is a lack of research on "build trust first, then exploit it" content-level network fraud targeting coding agents; the authors propose the EtE attack framework and the AAS defense.
Core question: can a malicious website first win the trust of a coding agent through genuine help, and then use that trust to induce it to perform unauthorized harmful operations? Existing attack and defense research does not cover this threat.
- Problem scenario: coding agents increasingly have web access and run with high privileges, holding business credentials and able to invoke privileged tools in enterprise processes such as procurement, reconciliation, and reimbursement, so malicious web content can directly change the agent's behavior (per the authors).
- Gaps in existing research: the authors state that existing work focuses mainly on malicious links, prompt injection, and interface deception, with malicious intent usually embedded directly in the injected instruction or link; content-level fraud that first establishes credibility through legitimate behavior and then makes a malicious request "remains largely unexplored."
- Core observation: the authors state that experiments find coding agents exhibit trust-like behavioral reliance on web sources that previously helped them, and that accumulated credibility increases their susceptibility to subsequent malicious instructions.
- Paper contributions: proposes the EtE (Earn-then-Exploit) attack framework, constructs 56 organizational environments (8 task contexts × 7 attack consequences) and open-sources the benchmark, and proposes the action-authorization separation (AAS) defense.
- Threat model (Section 3.1, four-party model):
- Attacker: operates a fraudulent website, controls only public web content, and has no access to internal systems; the authors explicitly distinguish this from WFA's insider assumption, with the attacker starting from least privilege.
- Goal: induce the agent to perform harmful operations beyond the safety boundary, covering 7 attack consequences (Z1 unauthorized authorization, Z2 data exfiltration, Z3 untrusted code execution, Z4 critical state manipulation, Z5 defense weakening, Z6 external signing, Z7 irreversible deletion).
- Victim system: a coding agent that performs enterprise tasks on behalf of humans, can retrieve external web pages (including fraudulent sites), and has web operation and local execution capabilities.
- Enterprise and search platform: the enterprise has only post-hoc audit visibility into the agent's behavior; the search platform is the entry point through which the agent obtains external web information.
What related research exists?
Related work falls into three groups: indirect prompt injection and web attacks, trust research on LLM agents, and agent defenses; the authors say EtE is the first work to systematically study multi-step trust winning.
Indirect prompt injection and web attacks against agents
- Greshake et al. [13] first showed that attackers can hide instructions in retrieved web pages or tool outputs; AgentDojo [10], InjecAgent [40], ASB [41], and WASP [12] formalized this threat into reproducible tasks and benchmarks, planting instructions in one-shot content.
- MUZZLE [31] discovers injection surfaces from agent execution traces and synthesizes context-aware attacks; Mind the Web [29] reports over 80% ASR for single-task aligned page injection on five web agents (without a trust-building process); LoginTrap [14] disguises login as a task precondition.
- WFA [17] is the only agent-side work in the authors' survey that uses the web-fraud label, but it assumes a compromised agent inside a multi-agent system (insider threat), pushes structurally disguised malicious URLs, and its endpoint is a recommendation rather than an executed action; the authors say none of these works answer how genuine help builds trust and is converted into executed actions.
Trust research on LLM agents
- Xie et al. [35] used Trust Games to show that LLM agents exhibit measurable trust behavior, with GPT-4 behaving close to humans; Plebe [26] studied trust propensity across 19 LLMs and found that delegation behavior is modulated by capability cues.
- Buyl et al. [5] showed that trust-building interactions can increase susceptibility to subsequent persuasion; Trust No Tool [37] proposed cognitive poisoning, where benign-looking tool feedback accumulates trust and then leads to a harmful final action.
- The authors say these works focus on cooperative games, inter-agent relationships, tool feedback, or self-reports, rather than whether external websites can win trust through genuine help and trigger executed actions.
Agent defenses
- Input side: VC (verifiable credentials) [30], IH (instruction hierarchy) [33], StruQ (structured queries separating instruction and data channels) [7].
- Execution side: Task Shield, IPIGuard, and AttriGuard check task alignment, tool dependencies, and causal attribution, respectively [1, 15, 16]; CaMeL and Prismata enforce capability or trust constraints at the system layer [9, 32].
- The authors say execution-side works each check only one aspect of an action, whereas AAS is a joint gate that jointly checks source, necessity, and authorization.
Baselines and benchmarks: Attack baselines are InjecAgent, AgentDojo, EIA, EVA, and a benign control; defense baselines are IH, VC, CaMeL, and StruQ; evaluation uses the authors' self-built 56 enterprise scenario environment. The authors claim EtE is "the first systematic study of multi-step trust winning as an attack amplification mechanism in content-level network fraud" (to our knowledge).
How does the paper address this problem?
EtE has three stages: retrieval hit, trust building, and terminal injection, using three injection principles and four inducement strategies; AAS jointly checks source, necessity, and authorization before execution.
Overall idea: EtE (Earn-then-Exploit) turns the attack into a web "guidebook": it first provides k=5 steps of genuine help that pass the agent's local verification to become a trusted source, then packages the unauthorized action as a necessary step for task completion; on the defense side, it proposes AAS (action-authorization separation), which jointly checks source, necessity, and authorization before a sensitive action is executed.
Attack design (Section 3.2)
- Prerequisite information: before deployment, the attacker needs to obtain five pieces of information—the task workflow, the external query terms, a real but optional system capability, a pressure point that cannot be verified locally, and a trusted authority identity.
- Three stages (Figure 2): retrieval hit (the site is indexed by a public search engine or returned by the agent's retrieval tool, depending on the relevance of the page title to the task query) → trust building (the site, under an authority persona, provides 5 steps of genuine help, each step's output passing the agent's local checks) → terminal injection (the last page gives the unauthorized request a★, packaged as part of a compliant process).
Three injection principles (Section 3.3)
- Goal orientation (P1): the injected instruction is derived from the current task goal and presented as the next step of the same deliverable.
- Real action + necessity redefinition (P2): the final action is a system capability genuinely available to the agent, merely restated from "optional" to "required"; the injected content carries no directly malicious features.
- Locally unfalsifiable pressure (P3): deadlines, consequences, and policy statements are placed beyond the agent's local verifiability, leaving only the choice to believe or refuse.
Four inducement strategies (Section 3.4)
- Y1 policy injection: uses institutional rules and clause numbers to package the unauthorized request as a formal process step.
- Y2 shortest-path temptation: displays the cumbersome normal path alongside a shorter injected path, exploiting the agent's preference for the optimal solution.
- Y3 deprivation narrative: claims that failure to comply will lead to capability loss, delivery failure, or rating loss.
- Y4 urgency anchoring: fabricates time-pressure claims that cannot be verified locally.
Scenario construction and adjudication (Section 4)
- Environment set: 8 task contexts (X1 business transactions to X8 personnel identity) × 7 attack consequences (Z1–Z7) = 56 stateful environments, with all four inducement strategies applied in each environment; an environment consists of the victim system, an event collector, a fraudulent-site corpus, and a server-side adjudication oracle, formalized as M = {Mx,z = ⟨ Xx, Y, Zz ⟩}, with |X|=8, |Y|=4, |Z|=7, |M|=56.
- Adjudication contract: binary adjudication, server-side execution—success counts only when the terminal action a★ produces a preconfigured state change on the server; the agent's self-report does not count, and hallucinated parameters are rejected.
- Safe-path contract: every task can be fully completed through a genuine slow channel that skips a★, and the attack is never necessary for the task; all task prompts are neutral and contain no leading or urgent wording.
AAS defense (Section 6)
- Three checks: source check (the action originates from the user, system rules, or explicit user endorsement), necessity check (no safe path exists to achieve the goal without the action), authorization check (queries the enterprise permission table; unregistered subject-action pairs are denied by default); all three must pass simultaneously, otherwise the action is denied and the safe path is fallen back to.
- Adjudication rule: Allow(a) = SrcOK(a) ∧ Nec(a) ∧ Auth(a) = 1, i.e., the action is allowed only when the source is legitimate, no safe alternative path exists, and the permission table authorizes it.
- Deployment method: deployed via a system prompt containing a list of sensitive operations and a permission table, without modifying model weights or the agent framework.
What experiments did the paper conduct?
Evaluated on 56 scenarios and three coding agents: EtE average ASR is 71.4%, trust amplifies with the number of help steps, and AAS reduces ASR to 0% with a 100% completion rate.
Experimental setup
- Agents under test: Codex v0.162.1 with GPT-5.5, ZCode v3.14.3 with GLM-5.3-Flash, QwenCode v0.25.1 with Qwen3.7-Plus; ZCode-GLM-5.1 is additionally tested in the Discussion.
- Environment: 56 self-built enterprise scenarios (8 task contexts × 7 attack consequences); the main experiments are conducted in a fully local controlled web ecosystem (a containerized search gateway + 56 self-hosted stateful systems); RQ5 deploys help pages on independent public domains and uses the Bing Search API to measure reachability.
- Attack baselines: InjecAgent (naive injection), AgentDojo (template family), EIA (context-adaptive injection), EVA (evolutionary semantic injection), and a benign control; all attacks share the same scenario template, with only the injection page constructed according to each baseline's original method, and the baselines do not include the preceding help (RQ3 supplements this separately).
- Defense baselines: IH, VC, CaMeL, StruQ, all adapted to the EtE setting at the prompt level.
- Metrics and adjudication: scenario-level ASR = |hit| / |E|, with server-side binary adjudication (a hit counts only when the terminal action produces a preconfigured state change); defense experiments additionally report task completion rate.
- Number of repetitions: each environment is tested at most 2 times, and any one run producing the expected server-side effect counts as success.
Main results
Table 1: scenario-level ASR (%) of each attack method, 56 scenarios.
Swipe horizontally to read the table
Attack method Codex-GPT-5.5 ZCode-GLM-5.3-Flash QwenCode-Qwen3.7-Plus Average Benign control 0.0 0.0 0.0 0.0 InjecAgent 16.1 21.4 21.4 19.6 AgentDojo 14.3 19.6 30.4 21.4 EIA 23.2 25.0 48.2 32.1 EVA 14.3 25.0 42.9 27.4 EtE (authors' method) 85.7 67.9 60.7 71.4 - The authors state that EtE outperforms all four baselines on every agent; the strongest baseline, EIA, reaches 48.2% on QwenCode, still 12.5 percentage points below EtE's lowest score.
- The authors attribute the weaker baselines to: EIA still being a single-shot attack lacking trust building and task-chain coupling; InjecAgent/AgentDojo relying on fixed templates and authoritative override instructions; and EVA's optimization remaining at the wording level.
- The benign control has zero hits on all three agents, and the authors state that the evaluation pipeline does not misjudge benign execution as a successful attack.
RQ2: susceptible contexts and consequences (Figure 4)
- Consequence axis: Z6 (external signing) has a 100% hit rate (24/24), with all three agents compromised in all 8 environments; Z4 and Z7 are each 75% (18/24), and Z2 is 71% (17/24); Z1 (54%, 13/24) and Z5 (58%, 14/24) are relatively harder, and the authors state that requests to weaken defenses conflict more directly with authorization constraints and more easily trigger agent vigilance.
- Task axis: X4 (application integration) and X5 (knowledge work) are each 81% (17/21); X2 (development supply chain) is relatively more resistant, at 62% (13/21).
- Agent differences: the authors state that ZCode resists Z6/Z7 in almost all scenarios but is compromised more on Z5 (2/8) and X8 (3/7); QwenCode is compromised more on Z1 (3/8), Z7 (4/8), and X6 (2/7); the authors state that EtE does not depend on a single model weakness.
RQ3: trust building and attack success (Figure 5)
- What was measured: on Codex and ZCode, varying the number of preceding verified help steps k ∈ {0, 1, 3, 5}, testing EtE, EIA, and EVA together.
- Results: EtE's ASR on ZCode rises from 37.5% (k=0) to 67.9% (k=5), and on Codex from 25.0% to 85.7%; EIA on ZCode rises from 25.0% to 55.4% and on Codex from 23.2% to 32.1%; EVA on ZCode rises from 25.0% to 51.8% and on Codex from 14.3% to 32.1%.
- Authors' interpretation: more preceding help makes agents less vigilant; the baselines still have lower ASR than EtE after receiving the same number of help steps; the authors state that they cannot prove agents have the same trust psychology as humans, but that repeatedly providing correct help produces trust-like behavior and amplifies the attack probability.
RQ5: public-network reachability and AAS defense
- Reachability (Figure 6): the help pages for the 56 scenarios are deployed on independent public domains, and ZCode-GLM-5.3-Flash searches and browses autonomously; the target pages are retrieved in 46/56 scenarios (82.1%) and adopted in 43/56 (76.8%); of the 13 not adopted, 3 were retrieved but their guidance was refused (the task involved internal enterprise operations), and 10 were not retrieved because public pages with the same name ranked higher.
- AAS defense (Table 3): on ZCode and Codex, AAS has an ASR of 0.0%/0.0% and a completion rate of 100.0%/100.0%; the baseline IH has 17.9%/12.5% ASR and 69.6%/83.9% completion rate, VC has 12.5%/17.9% and 91.1%/92.9%, CaMeL has 14.3%/0.0% and 94.6%/83.9%, and StruQ has 21.4%/8.9% and 94.6%/80.4%.
- Authors' interpretation: all four baselines have residual attacks and cannot guarantee task completion, because each focuses on only a single security property; the authors also note that CaMeL has an ASR of 0% on Codex, making it one of the best-performing defenses on that agent.
Other ablations and analyses
- Component ablation (Table 2, ZCode and Codex, 56 environments): removing Y1 policy injection causes the largest drop (ZCode drops 26.9 points to 41.0%, Codex drops 73.2 points to 12.5%); removing Y2 drops an average of 36.3 points; Y3 and Y4 drop an average of 46.3 and 42.3 points respectively; removing the authoritative brand identity drops an average of 40.8 points.
- Agent differences (Table 2): ZCode's ablation variants show smaller drops (13.9–26.9 points), while Codex is more sensitive, with all ablation variants having an ASR no higher than 29.0%.
- Additional finding (Discussion): EtE's ASR against ZCode-GLM-5.1 is 25.0%, lower than the 67.9% for GLM-5.3-Flash; the authors suggest that newer models are not necessarily more resistant to web fraud, and that a safety trade-off exists between execution efficiency and verification vigilance.
What are some points that can be further explored?
The authors note that the internal representation and formation mechanism of trust remain unclear, and that the scenarios are limited to common enterprise settings; the experiments cover three agents, 56 scenarios, and at most 2 attempts per scenario.
Limitations and future directions noted by the authors
- Trust mechanism unclear (Section 8 Limitations): The experiments demonstrate observable trust-like behavior but do not establish how trust is represented or formed inside the model; the authors state that future work could examine internal representations and activation patterns.
- Scenario coverage (Section 8 Limitations): The scenarios focus on common enterprise settings; the authors state that extending evaluation to broader task domains and organizational environments could further assess the generalizability of the conclusions.
Experimental coverage
- Agents tested: The main experiments use 3 in total—Codex-GPT-5.5, ZCode-GLM-5.3-Flash, and QwenCode-Qwen3.7-Plus; ablations and RQ3 use only Codex and ZCode, two; defense evaluation uses only ZCode and Codex, two; ZCode-GLM-5.1 appears only in an additional experiment in the Discussion.
- Scenarios and repetitions: 56 scenarios (8 task contexts × 7 attack consequences), with each environment tested at most 2 times; any single success counts as a hit.
- Attack baselines: Four—InjecAgent, AgentDojo, EIA, EVA—all reproduced under the same 56-scenario template; defense baselines are four—IH, VC, CaMeL, StruQ—all adapted at the prompt level.
- Public-internet validation: RQ5 uses only one agent, ZCode-GLM-5.3-Flash, and the Bing Search API to test retrieval and adoption; no full attack was executed on the public internet.
- Not reported in the paper: The specific number of queries and time cost per scenario; the construction cost of the AAS permission table and sensitive operation list; the performance of defenses under adaptive attacks (attackers adjusting in a targeted way after learning about AAS).
Summarize the main content of the paper
EtE builds trust with 5 steps of verifiable help and then injects unauthorized instructions, with an average ASR of 71.4%; AAS jointly checks source, necessity, and authorization, reducing ASR to 0%.
A study of a content-level network fraud attack and defense targeting coding agents.
- Problem: Coding agents have web access and high-privilege execution for enterprise tasks; existing research focuses on malicious links, prompt injection, and interface deception, and the authors say the fraud form of "first building trust through genuine help, then using that trust to amplify the attack" has not been systematically studied.
- Method EtE: A fraudulent website first provides 5 steps of genuine help that the agent can locally verify, becoming a trusted source, then issues unauthorized instructions using three principles (goal orientation, real actions + necessity redefinition, locally unfalsifiable pressure) and four inducement strategies (policy injection, shortest-path temptation, deprivation narrative, urgency anchoring); the attacker only needs to control public web pages, differing from the insider threat model.
- Evaluation: Self-built 56 enterprise scenarios (8 task contexts × 7 attack consequences), server-side binary judgment, at most 2 attempts per scenario.
- Main results: EtE achieves an average ASR of 71.4% on Codex-GPT-5.5, ZCode-GLM-5.3-Flash, and QwenCode-Qwen3.7-Plus (85.7%, 67.9%, and 60.7% respectively), higher than all four injection-based baselines (Table 1); ASR rises as the number of preceding help steps k increases from 0 to 5 (Codex 25.0%→85.7%), and the authors say there is a trust amplification effect; the Z6 external signing consequence hit rate is 100% (24/24).
- Defense AAS: Before executing sensitive actions, it jointly checks source, necessity, and authorization; on ZCode and Codex it reduces ASR to 0% while task completion rate remains 100%, outperforming the four baselines IH, VC, CaMeL, and StruQ (Table 3).
- Authors' conclusion: Coding agents exhibit trust-like reliance on previously helpful web page sources; the authors believe newer, stronger models are not necessarily more resistant to this type of fraud (GLM-5.1's ASR of 25.0% is lower than GLM-5.3-Flash's 67.9%), and they offer implications from three perspectives: Web platforms, enterprise deployment, and LLM training; limitations are that the internal mechanism of trust is unclear and the scenarios are limited to common enterprise settings.