Sitemap

#aisecurity #ethicalhacking #threatmodelling #ai #owasptop10

Hacking AI - 101

11 min readMay 31, 2026

--

Hi everyone! Hope you’re all doing well and keeping that curious spirit alive.

Recently, with AI entering the picture, many of us have slipped into a mild panic — Will it take our jobs? Will machines replace us? It’s a completely understandable reaction. But here’s the truth: AI is here to assist us, not replace us. The real opportunity lies in how well we learn to shape and direct it for our own needs.

Now, since AI is in its booming phase, its security landscape is evolving just as rapidly. Think of where AI security stands today as similar to where Application and Web Security stood back in the early 2000s — when software development was exploding and security was still catching up. It was chaotic, exciting, and full of opportunity for those willing to dive in early. We are in that exact same moment right now with AI.

That’s precisely why I’m here — to share everything I’ve been exploring in this space, one learning at a time.

Press enter or click to view image in full size

As many of you already know, I come from the offensive side of cybersecurity. So today, we’re going to walk through the initial phases of a Security Assessment for AI systems — specifically, Threat Modelling.

Buckle up, because this is going to be a good one. 🚀

Threat Modelling

Many of us are already familiar with the concept of Threat Modelling — but for those who aren’t, let me break it down simply.

Threat Modelling is essentially the process of identifying all possible threat actors — anyone who might attempt to attack your system — and mapping out every potential attack vector, meaning the different ways they could try to do it. Think of it as putting on the attacker’s hat before they even show up.

Press enter or click to view image in full size

For this, we’re going to use a real-world, relatable example — a customer-facing AI chatbot, similar to the ones you see on platforms like Amazon or Flipkart, designed to help users with their queries and support needs.

Threat Actors

Now, let’s put on our thinking caps. Who would actually want to attack such a chatbot?

Here are the most common threat actor categories to keep in mind:

😈 Malicious User: This is your everyday bad actor — someone who uses the chatbot with deliberate ill intent. Their goals could range from extracting unauthorized discounts, gaining access to features they shouldn’t have, or simply trying to damage the company’s reputation through manipulated outputs.

🕵️ Curious Insider: Not every threat comes from outside. Developers, support staff, or anyone with internal access might attempt to probe the system out of curiosity — trying to peek into privileged documents, access restricted features, or test boundaries they know they shouldn’t cross. Insider threats are often underestimated, but they’re very real.

🏢 Competitors: A well-resourced competitor might target your chatbot with a clear business motive — stealing intellectual property, reconstructing your model, or harvesting your training data. If your AI is a competitive advantage, you can be sure someone out there wants a piece of it.

🤖 Automated Bots: Not all attacks are human-driven. Scripted bots can bombard your chatbot with high volumes of requests designed to scrape sensitive information, probe for vulnerabilities, clone model behaviour, or simply exhaust your resources — driving up costs and degrading performance for legitimate users.

🦹 Criminal & Motive-Driven Attackers: This is arguably the most dangerous category. These attackers use the chatbot as a stepping stone — a way to gather information or gain access that fuels larger criminal operations. Think of ransomware groups, hacktivists, or politically motivated actors who see your AI system as a gateway, not just a target.

Press enter or click to view image in full size

The key takeaway here is that threats don’t come from just one direction. A well-rounded security assessment must account for all of these personas — because in the real world, any one of them could be knocking on your chatbot’s door right now.

Assets

Now that we have a clearer picture of who might attack our chatbot, let’s shift our focus to what they’re actually after — in security terms, these are called Assets.

An asset is anything of value within your system that an attacker would want to steal, manipulate, or abuse. For an AI chatbot, the attack surface is broader than most people realize.

Here’s a breakdown:

🧠 Model Parameters: The underlying weights and configuration of your AI model. If your model is proprietary and privately trained, an attacker could attempt to clone or steal it — essentially walking away with your most valuable intellectual property.

📚 Training Data: The data your model was trained on can often contain sensitive, confidential, or personally identifiable information (PII). If exposed, this could lead to serious privacy violations and regulatory consequences.

🗂️ Private RAG Data: RAG (Retrieval-Augmented Generation) systems pull from private knowledge bases to generate responses. These repositories frequently hold internal documents, confidential records, or customer data that were never meant to be public.

👤 User PII: The chatbot interacts with real users — which means it handles real data. Names, email addresses, support ticket history, and more. A breach here directly impacts your customer’s privacy and your brand’s trust.

⚙️ Agentic Tools & Capabilities: Modern AI agents don’t just chat — they act. They can send and read emails, make web requests, and even execute system commands. If an attacker manages to abuse these capabilities, the consequences can go far beyond a data leak.

🔑 API Keys & Secrets: Behind every AI system are integrations — internal services, third-party tools, and AI API endpoints. The keys and secrets that authenticate these connections are prime targets. Compromise one, and an attacker potentially gains access to your entire ecosystem.

Press enter or click to view image in full size

As you can see, the attack surface of an AI system is surprisingly wide — and many of these assets are unique to AI, which is exactly what makes this field so critical and fascinating to explore.

Attack Surfaces

Now that we know who might attack and what they’re after, it’s time to address the most critical question — how do they actually get in?

In security, this is what we call the Attack Surface — the sum of all the different points where an attacker could potentially interact with, probe, or exploit your system. For AI systems, the attack surface is significantly larger and more nuanced than traditional applications.

Let’s break it down:

⌨️ Input Channels: The most obvious and most abused entry point. Any prompt, message, or file that a user can submit and the model processes is fair game for an attacker. This includes crafted prompts designed to manipulate the model’s behaviour — something we’ll dive much deeper into later in this series.

🔍 Retrieval / RAG Layer: If your chatbot uses a RAG system to fetch context from a knowledge base, that pipeline itself becomes an attack surface. Attackers could inject malicious documents into the retrieval pool or attempt vector database poisoning — subtly corrupting the data your model retrieves and trusts.

🔧 Tools & Plugins: Modern AI agents are powerful because they can do things — browse the web, send emails, run code. But every tool the agent can interact with is also a potential pivot point for an attacker. A compromised or abused plugin could turn your helpful assistant into an unintentional insider threat.

Get Anurag Tiwari’s stories in your inbox

Join Medium for free to get updates from this writer.

🏗️ Supply Chain: Just like traditional software, AI systems depend on external components — pre-trained models, libraries, APIs. Any of these could be backdoored or tampered with upstream, meaning the vulnerability enters your system long before you even write a single line of your own code. This is one of the most underappreciated risks in AI security today.

📋 Logging Systems: Logs are essential for debugging and monitoring — but they can also be a goldmine for attackers. If your logging pipeline captures raw prompts, model responses, or API interactions, it may inadvertently store sensitive model details or user PII that becomes exposed in a breach.

🛠️ Admin & Debug Endpoints: Development convenience can quickly become a production liability. Admin panels and debug endpoints left exposed or poorly secured can leak system configurations, internal architecture details, API keys, and credentials — essentially handing an attacker a map of your entire system.

☠️ Training Data: The risk here starts even before deployment. If your training data is poisoned — either before initial training or during fine-tuning — the model itself becomes compromised. Attackers can subtly influence model behaviour, introduce biases, or plant backdoors that are incredibly difficult to detect after the fact.

Press enter or click to view image in full size

Understanding your attack surface is the foundation of any solid security assessment. You cannot protect what you haven’t mapped — and as you can see, AI systems have plenty of ground to cover.

Risks and Impact

Now that we’ve mapped out the attack surface, let’s talk about something that often hits hardest — the real-world consequences. Understanding the how is important, but understanding the why it matters is what turns a security assessment from a checkbox exercise into a business-critical priority.

Here’s what’s actually at stake:

💸 Leakage of PII / Sensitive Data: This is arguably the most immediately damaging outcome. A data breach involving personally identifiable information doesn’t just hurt your users — it hurts your business at every level. You’re looking at hefty regulatory fines (think GDPR, IT Act), a serious erosion of customer trust that can take years to rebuild, and worst of all, the leaked data often becomes a launchpad for further criminal activity — phishing, identity theft, account takeovers, and more. One breach rarely stays contained.

🧠 Model or Training Data Stolen: Your AI model represents months — sometimes years — of investment, proprietary data, and competitive advantage. If an attacker manages to clone or reconstruct your model, you’ve not only lost that edge to a competitor, but you’ve also handed them a blueprint of your system. They now know its strengths, its quirks, and — most dangerously — its weaknesses, making you significantly more vulnerable to targeted attacks down the line.

🤡 Chatbot Jailbroken: A jailbroken chatbot is essentially a rogue employee with no filters and full system access. Once manipulated into bypassing its guardrails, it can produce harmful, offensive, or misleading content, take actions it was never intended to perform, and seriously damage your brand’s reputation in a very public way. On the lighter end, attackers could trick it into issuing unauthorized discounts or leaking internal policies. On the darker end, the consequences can be far more severe — and far harder to explain to your customers.

🚪 Internal Access / Privilege Escalation: Perhaps the most dangerous risk of all. When attackers use the chatbot as a foothold into your internal systems, the real attack is only just beginning. From here, they can move laterally across your infrastructure — accessing internal tools, databases, admin panels, and credentials. This is how chatbot compromises turn into full-scale ransomware attacks, data exfiltration operations, or acts of corporate espionage. The chatbot wasn’t the target — it was just the door.

Press enter or click to view image in full size

The bottom line? The risks aren’t just technical — they’re financial, reputational, and operational. This is precisely why security assessments for AI systems need to be taken just as seriously as those for any other critical business application.

Open-Source Resources

Before we dive into the hands-on reconnaissance phase, let’s equip ourselves with the right resources. Just like any good craftsman, a security professional is only as effective as the tools and frameworks they rely on.

Here are two essential references that will serve as our foundation:

📋 OWASP Top 10 for LLMs

If you’ve spent any time in application security, you’ve almost certainly come across the OWASP Top 10 — the gold standard reference for the most critical vulnerabilities found in real-world assessments. The good news is that OWASP has now extended this framework specifically for Large Language Model (LLM) applications.

This list captures the ten most prevalent and impactful vulnerabilities discovered in real-world AI deployments — from prompt injection to insecure output handling. We’ll be referencing this heavily as we move into our testing examples, so it’s worth bookmarking right now.

🗺️ ATLAS Matrix

Think of ATLAS as the MITRE ATT&CK framework — but built specifically for AI systems. If you’re not familiar with MITRE ATT&CK, it’s the industry-standard framework used by security professionals worldwide to understand and map out cyberattacks in structured, actionable detail.

ATLAS does the same for the AI threat landscape. It maps out the entire lifecycle of an AI-focused attack — covering the different phases an attacker moves through, the threat actor profiles, attack vectors, tools commonly used, surfaces targeted, and even attack timelines. It’s an incredibly comprehensive reference that gives you a structured way to think about AI threats rather than approaching them ad hoc.

Press enter or click to view image in full size

Both of these resources are free, community-driven, and actively maintained — which makes them invaluable in a field that’s evolving as fast as AI security is. I’d strongly recommend spending some time exploring both before we move forward.

Wrapping Up

And that’s a wrap on Part 1 of our AI Security series!

We covered a lot of ground today — and intentionally so. Before you can think like an attacker, you need to understand the full picture of what you’re protecting and who you’re protecting it from.

Let’s do a quick recap of everything we walked through:

  • 🎯 Who can attack your AI chatbot — from malicious users to state-level threat actors
  • 💎 What they’re after — model parameters, training data, user PII, agentic capabilities, and more
  • 🚪 How they get in — mapping out the complete attack surface of an AI system
  • 💥 Why it matters — the very real financial, reputational, and operational consequences of getting this wrong
  • 🛠️ The frameworks that will guide our assessments — OWASP Top 10 for LLMs and the ATLAS Matrix
Press enter or click to view image in full size

This is the foundation — and like any strong structure, everything we build going forward stands on top of it.

In Part 2, we’re getting our hands dirty. We’ll be diving deep into the Reconnaissance phase — exploring how an attacker actually begins probing an AI system in the real world, complete with real-world examples, tools, and techniques that you can follow along with and apply yourself.

If you’re someone who learns by doing, that one’s going to be right up your alley. 🙌

If you found this helpful, drop a clap — it genuinely helps more people in the community discover this content. And if you have questions, thoughts, or your own experiences with AI security, I’d love to hear from you in the comments below. I share regular insights, findings, and explorations across my socials — come say hi! 👇

🔗 LinkedIn

🐦 Twitter

Until next time — keep exploring, keep questioning, and most importantly, be happy. 🤗🫡😇

See you in Part 2. Stay curious, stay secure. 🔐

--

--