7 min read
How to security-test AI agents: OWASP LLM Top 10 and MITRE ATLAS
A practitioner's method for AI agent security testing in the UAE: prompt injection, tool misuse, memory poisoning and data exfiltration, mapped to OWASP and MITRE ATLAS.
Security-testing an AI agent means attacking the whole chain, not just the model: untrusted inputs, retrieval, memory, tools and the permissions behind them. A good test starts with a threat model, covers direct and indirect prompt injection, excessive agency, tool misuse, memory poisoning and output handling, maps findings to the OWASP LLM Top 10, the OWASP Top 10 for Agentic Applications and MITRE ATLAS, and ends with a retest.
An AI agent that reads email, queries your ERP and drafts payments is a new kind of privileged user. It takes instructions in natural language, from anyone whose text it reads, and it acts on them with real credentials. Testing it like a web form misses most of the risk.
This guide sets out how we security-test LLM applications and agents in practice: what makes agents different, which frameworks to map against, a step-by-step method, and what a useful report contains.
Why agents are not chatbots
A chatbot answers questions. An agent combines four things that, together, create a new attack surface:
- Untrusted input. Agents read documents, emails, tickets, web pages and other agents’ output. Any of it can carry instructions.
- Tools. Agents call APIs, run queries, send messages and sometimes execute code, using service accounts that often have more access than any single user.
- Memory. Agents store context across sessions and retrieve from vector stores. Poison that store and you influence future decisions.
- Autonomy. Agents plan multi-step tasks with limited human review, so a manipulated step can cascade.
The core problem is that the model cannot reliably separate data from instructions. Every control has to assume that, at some point, the agent will follow text it should have ignored.
The frameworks
OWASP Top 10 for LLM Applications (2025)
The OWASP list remains the baseline for any LLM application:
| ID | Risk |
|---|---|
| LLM01 | Prompt Injection |
| LLM02 | Sensitive Information Disclosure |
| LLM03 | Supply Chain |
| LLM04 | Data and Model Poisoning |
| LLM05 | Improper Output Handling |
| LLM06 | Excessive Agency |
| LLM07 | System Prompt Leakage |
| LLM08 | Vector and Embedding Weaknesses |
| LLM09 | Misinformation |
| LLM10 | Unbounded Consumption |
OWASP Top 10 for Agentic Applications
Released on 9 December 2025, the OWASP agentic list covers risks that only appear once a model can act: ASI01 Agent Goal Hijack, ASI02 Tool Misuse, ASI03 Identity and Privilege Abuse, ASI04 Agentic Supply Chain Vulnerabilities, ASI05 Unexpected Code Execution, ASI06 Memory and Context Poisoning, ASI07 Insecure Inter-Agent Communication, ASI08 Cascading Failures, ASI09 Human-Agent Trust Exploitation and ASI10 Rogue Agents.
MITRE ATLAS
MITRE ATLAS is the ATT&CK-style knowledge base for attacks on AI systems. Its 2026.07 data release defines 16 tactics, including Reconnaissance, Initial Access, AI Model Access, Execution, Persistence, Privilege Escalation, Credential Access, Exfiltration and Impact (ATLAS data). We use ATLAS to structure the threat model and to describe attack chains in terms a SOC already understands; OWASP IDs are better for categorising individual findings.
A practical test methodology
This is the sequence we follow. Each step feeds the next.
- Threat model the agent. Map every input source, tool, data store, memory and approval step. Identify who can put text in front of the agent: customers, suppliers, the public internet, other agents. Rank assets by impact: payments, patient records, KYC files, outbound email.
- Scope tools and permissions. List each tool, the service account behind it and what it can actually do, not what the prompt says it should do. Excessive agency usually lives here: a “read-only” agent whose database user can write, or an email tool that can send to any address.
- Direct prompt injection. Attempt to override system instructions through the user interface: role-play, instruction smuggling, encoding tricks and multi-turn escalation. Test in English, Modern Standard Arabic, Gulf dialect and mixed scripts, because filters tuned on English often miss Arabic.
- Indirect prompt injection. Plant instructions in content the agent will read: a claim form PDF, an email body, hidden text in a Word file, a web page, a calendar invite, a retrieved policy document. This is where most real-world agent compromises start.
- Data exfiltration and disclosure. Try to extract the system prompt, other users’ data, retrieved documents outside the user’s permissions and secrets in tool responses. Test exfiltration channels such as rendered links and images, outbound email and webhook tools.
- Tool misuse and privilege abuse. Chain an injection into a tool call: change a payment beneficiary, approve a claim, export a customer list, escalate through an agent that holds broader credentials than the user.
- Memory and retrieval poisoning. Insert content into long-term memory or the vector store and check whether it changes later answers for other users. Check that document-level access control survives indexing.
- Output handling. Treat model output as untrusted. Test whether it reaches SQL, shell, HTML, templates or downstream APIs without validation, which turns prompt injection into classic injection.
- Logging and detection. Confirm that prompts, retrieved sources, tool calls and approvals are logged with enough context for an investigator, and that high-risk patterns raise alerts.
- Retest. Verify fixes against the same cases, and convert successful attacks into regression tests the team can run on every model or prompt change.
Risk-to-control mapping with UAE examples
The examples below are illustrative and sanitised; they describe the pattern, not a working payload.
| Risk | Example attack on a UAE use case | Key controls |
|---|---|---|
| Indirect prompt injection (LLM01, ASI01) | An insurer’s claims agent reads a submitted PDF containing hidden text telling it to mark the claim as pre-approved | Isolate untrusted content, classify document text as data, require human approval for claim decisions |
| Arabic-language injection (LLM01) | Instructions written in Gulf dialect bypass an English-only input filter on a customer service agent | Multilingual guardrails, Arabic test cases in the evaluation set |
| Excessive agency (LLM06, ASI03) | A bank’s KYC agent uses a service account that can also update customer risk ratings | Least-privilege service accounts per tool, scoped tokens, separate read and write agents |
| Sensitive disclosure (LLM02, LLM08) | An HR assistant retrieves salary files because the whole file share was indexed into one vector store | Carry document ACLs into retrieval, filter by user identity at query time |
| Tool misuse (ASI02) | An exchange house finance agent is induced, via an email it summarises, to send a remittance file to an external address | Allow-listed recipients, approval gates, rate limits on outbound actions |
| Memory poisoning (ASI06, LLM04) | A forged “policy update” saved to agent memory changes how later refund requests are handled | Write controls on memory, provenance tagging, periodic memory review |
| Improper output handling (LLM05) | Model output is inserted into a SQL query in a reporting tool | Parameterised queries, schema validation of model output |
| Unbounded consumption (LLM10) | Crafted inputs force long reasoning loops and inflate GPU or token costs | Token and step limits, per-user quotas, cost alerts |
UAE context
AI security is now a policy priority, not only a technical one:
- In July 2026 the UAE Cyber Security Council published the National Cyber Security Policy for AI, setting minimum security requirements for AI adoption, including frameworks for AI incident response and forensics.
- The Council, Cisco and Open Innovation AI set up a National AI Test and Validation Lab for continuous AI red teaming and vulnerability testing. Coverage reports that it benchmarks against ISO/IEC 42001, MITRE ATLAS, NIST AI RMF and OWASP guidance (WAM).
- ISO/IEC 42001 is spreading across UAE government and telecoms, with certifications at e& (LRQA) and Dubai Police (Bureau Veritas).
- IBM’s 2026 Cost of a Data Breach findings for the Middle East put the average breach at USD 8.0M and found that 26% of malicious breaches were AI-enabled (IBM).
For banks, insurers and exchange houses, the CBUAE AI guidance adds governance and third-party due diligence expectations, and testing evidence is the simplest way to show controls work. Organisations operating across the GCC will meet similar expectations elsewhere, for example Saudi NCA controls for systems handling Saudi data.
What a good report contains
A useful AI security report is something an engineer can fix from and an auditor can rely on. Look for:
- Scope and architecture. The agent, its tools, data sources, models and versions tested, with a data-flow diagram.
- Threat model. Assets, trust boundaries and attacker profiles, mapped to MITRE ATLAS tactics.
- Findings with evidence. Each finding mapped to an OWASP LLM or agentic ID, with reproduction steps, transcripts, business impact and a severity that reflects what the agent can actually do.
- Attack chains. How individual weaknesses combine, for example indirect injection leading to tool misuse leading to data exfiltration.
- Specific remediation. Changes to permissions, architecture, guardrails and approval flows, not just “improve the system prompt”.
- Regression suite. Successful attack cases packaged as tests for your evaluation harness.
- Retest results. Confirmation of what was fixed, for your risk committee and auditors.
A report that only lists jailbreak screenshots is not an assessment. The question that matters is what an attacker can make the agent do with its real permissions.
How HAFR helps
HAFR’s founders build AI agents and break them for a living, and we ship them to production, so our testing covers the model, the integrations and the infrastructure together. Our AI security assessment follows the method above for LLM applications and agents, alongside conventional penetration testing for the surrounding web, API and cloud layers. If you are building agents, we can design them with these controls from the start through our AI agents work. We work with regulated organisations across the UAE and the GCC from our Dubai base. Get in touch to scope a test.
This article is general information, not legal or tax advice. Gulf rules change quickly; check the current text or ask a local adviser before acting.