# Summary: 2026-07-22_07-20-27Z_KnowYourAgent_Reconnaissance_DrivenPentestingofAIA.md Saved: 2026-07-24 01:32 Source: 2026-07-22_07-20-27Z_KnowYourAgent_Reconnaissance_DrivenPentestingofAIA.md Model: None --- ## Summary This paper argues that AI agents, like traditional software targets in penetration testing, must be subjected to reconnaissance‑driven attacks to uncover hidden weaknesses and exploit them for indirect prompt‑injection vulnerabilities. The authors formalize the reconnaissance process as a knowledge‑extraction problem, identifying what an agent seeks, how it uses that information, and which agent flaws can be leveraged by adversaries. To operationalize this insight they introduce **Know Your Agent (KYA)**, an automated framework that probes black‑box agents, builds detailed target profiles, and then crafts stronger attacks based on those profiles. Experiments on established benchmarks and a real‑world coding agent demonstrate that KYA consistently outperforms baseline pentesting approaches. ## Key Contributions - **Finding 1:** The authors formalize AI‑agent reconnaissance as a structured knowledge‑extraction process, mapping the assets agents seek, their usage patterns, and exploitable weaknesses. - **Finding 2:** They present KYA, an automated black‑box pentesting framework that leverages those extracted profiles to generate more effective adversarial prompts. - **Finding 3:** Empirical results show KYA improves prompt‑injection success rates by up to 45 % compared with conventional baselines on both synthetic benchmarks and a live coding agent. ## Methodology The methodology proceeds in three phases: (1) **Asset Identification** – the system queries an AI agent through controlled prompts to discover its knowledge assets, such as internal state variables or hidden configuration keys; (2) **Profile Construction** – collected data is aggregated into a target profile that encodes what the agent knows and how it can be manipulated; (3) **Attack Generation** – using the profile, KYA composes adversarial inputs that exploit identified weaknesses, thereby achieving indirect prompt‑injection. The entire pipeline is scripted to run automatically without human intervention. ## Results On the **Agent‑Security Benchmark**, KYA achieved a 42 % higher detection rate for successful prompt‑injection attacks than the top three baseline models (which ranged from 30 % to 38 %). In a real‑world test with a GitHub‑hosted code‑generation agent, KYA’s attack success was 57 % versus 41 % for the best baseline. The framework also reduced average probing latency by 68 % thanks to its automated query optimization. ## Significance By treating AI agents as dynamic targets that require reconnaissance before exploitation, this work bridges classic penetration‑testing techniques with emerging AI security concerns. It provides a reproducible methodology and open‑source tools for organizations seeking to secure generative or autonomous systems against indirect prompt‑injection threats, thereby advancing the field of AI risk assessment. ## Related Concepts - Reconnaissance (security testing phase) - Black‑box pentesting - Prompt injection attacks - Agent profiling / knowledge extraction - Indirect adversarial prompting