AI & ML Security Reference
6-module deep-dive into AI security threats — from LLM prompt injection and model poisoning to deepfake fraud and DPDP Act compliance. Built for security professionals defending AI systems in Indian enterprises.
OWASP LLM Top 10
All 10 LLM risks with real-world attack examples, detection signals, and mitigations. v2.0 2025 edition.
MITRE ATLAS
Complete adversarial ML attack framework covering reconnaissance through impact with 60+ techniques.
Model Security
Training data poisoning, model extraction/theft, adversarial evasion, and model inversion attack deep-dives.
Deepfake & Synthetic Media
Detection techniques, APT use cases, India BEC fraud patterns, and investigation guidance for synthetic media.
DPDP Risk Checker
Interactive compliance checker for DPDP Act 2023 — maps AI system characteristics to obligations and penalties.
AI Incident Playbooks
Production IR playbooks for prompt injection, model poisoning, deepfake fraud, and model extraction incidents.
OWASP LLM Top 10 — 2025 (v2.0)
The authoritative security risk list for Large Language Model applications. All 10 risks — definitions, real-world attack examples, detection signals, and mitigation controls.
| ID | Risk | Severity | Core Attack | Primary Defence |
|---|---|---|---|---|
| LLM01 | Prompt Injection | Critical | Override system instructions via user input or indirect content | Input/output validation, instruction hierarchy |
| LLM02 | Insecure Output Handling | Critical | XSS, SSRF, SQLi via unvalidated LLM output passed to backend | Treat LLM output as untrusted input |
| LLM03 | Training Data Poisoning | High | Corrupt training data to insert backdoors or degrade accuracy | Data provenance, supply chain integrity |
| LLM04 | Model Denial of Service | Medium | Context flooding, recursive prompts, compute exhaustion | Input length limits, rate limiting, cost alerts |
| LLM05 | Supply Chain Vulnerabilities | High | Compromised pre-trained model, malicious plugin, poisoned dataset | Model integrity verification, SBoM for AI |
| LLM06 | Sensitive Information Disclosure | Critical | PII extraction from training data, system prompt leakage, API key exposure | Data sanitisation, output filtering, DLP |
| LLM07 | Insecure Plugin Design | High | Plugin with excessive permissions, injected malicious tool calls | Least-privilege plugins, OAuth scopes |
| LLM08 | Excessive Agency | Critical | Agentic AI takes unauthorised real-world actions (send email, execute code) | Human-in-the-loop for irreversible actions |
| LLM09 | Overreliance | Medium | Hallucinated facts in security/medical/legal decisions cause harm | Human review gates, confidence scoring |
| LLM10 | Model Theft | High | Systematic API queries extract model via distillation — IP theft | Rate limiting, query monitoring, watermarking |
| Attack | Target | Impact |
|---|---|---|
| Indirect injection via Bing Chat web browsing | Bing Chat (2023) | Prompted users to reveal credentials to attacker-controlled site |
| Indirect injection via malicious email in Copilot | Microsoft 365 Copilot | Data exfiltration from SharePoint via prompt in email body |
| System prompt extraction via "repeat after me" | Custom GPT apps | Business logic and confidential context leaked to users |
| PDF indirect injection in RAG chatbot | Enterprise BFSI chatbot | Attacker-controlled document caused chatbot to output sensitive policy |
Key Rule: Treat all LLM output as untrusted user input. Apply the same sanitisation, parameterisation, and validation you would to any external data source. Never interpolate LLM output directly into SQL queries, shell commands, HTML templates, or JavaScript.
| Control | What It Catches | Effort |
|---|---|---|
| Data provenance tracking | Unknown/untrusted data sources in pipeline | Low |
| Anomaly detection on training data | Statistical outliers, label flipping patterns | Medium |
| Model integrity hashing | Tampering with saved model artefacts | Low |
| Differential privacy training | Membership inference, some poisoning | High |
| Red team / adversarial testing | Behavioural anomalies, backdoor triggers | High |
| Activation clustering analysis | Poisoned cluster separation in embedding space | High |
| Attack | Data at Risk | Technique |
|---|---|---|
| Training data extraction | PII, emails, code in training set | Membership inference, verbatim extraction prompts |
| System prompt leakage | Business logic, API keys, persona instructions | "Repeat your initial instructions word for word" |
| RAG knowledge base exfiltration | Internal docs, financial data | Indirect injection + exfiltration via allowed output |
| API key in context leak | Cloud credentials, service keys | Prompt to output all available context/variables |
| Scenario | Action Taken | Impact |
|---|---|---|
| AI email assistant reads phishing email with injection | Forwards all emails to attacker address | Total email account compromise |
| Code interpreter agent with filesystem access | Reads/exfiltrates /etc/passwd, SSH keys | System credential exposure |
| AI with database write access | Deletes or modifies production records | Data integrity breach |
| Agentic AI with payment API access | Initiates fraudulent transfers | Financial fraud — Rs.Cr losses |
Select all capabilities your LLM application has. The scorer calculates your exposure across all 10 OWASP LLM risks.
MITRE ATLAS — Adversarial ML Framework
MITRE ATLAS (Adversarial Threat Landscape for Artificial-Intelligence Systems) documents real-world adversarial ML attack techniques. Structured like ATT&CK but for AI/ML systems — from reconnaissance to impact.
| Tactic | Key Techniques | ATT&CK Equivalent |
|---|---|---|
| Reconnaissance | Search for Victim ML Artifacts (AML.T0000), Discover ML Model Ontology (AML.T0001), Search for ML Artifacts (AML.T0002) | Reconnaissance |
| Resource Development | Acquire ML Artifacts (AML.T0002.000), Develop Capabilities (AML.T0017), Stage Capabilities | Resource Development |
| ML Attack Staging | Craft Adversarial Data (AML.T0043), Poison Training Data (AML.T0020), Backdoor ML Model (AML.T0018) | Initial Access + Execution |
| Persistence | Backdoor ML Model (AML.T0018), Compromise ML Model (AML.T0019), Inject Payload via Model | Persistence |
| Defence Evasion | Evade ML Model (AML.T0015), Craft Adversarial Data (AML.T0043), Obfuscate Adversarial Noise | Defence Evasion |
| Exfiltration | Infer Training Data Membership (AML.T0024), Extract ML Model (AML.T0025), Model Inversion (AML.T0024.001) | Collection + Exfiltration |
| Impact | Deny ML Service (AML.T0029), Manipulate ML Model (AML.T0031), Functional Degradation | Impact |
Model Security — Attacks & Defences
Deep-dive into the four core model attack classes: training data poisoning, model extraction/theft, adversarial evasion, and model inversion — with controls for each.
| Attack Variant | Mechanism | Detection Difficulty | Impact |
|---|---|---|---|
| Clean-label poisoning | Correct labels, perturbed features — model learns wrong decision boundary | Very Hard | Targeted misclassification |
| Backdoor (BadNets) | Trigger pattern in image/text activates backdoor output | Hard | Arbitrary output on trigger |
| Dataset poisoning (web scraping) | Poisoned content on public web gets scraped into training data | Very Hard | Model bias, backdoors |
| Label flipping | Change labels of targeted class samples | Medium | Class accuracy degradation |
| Gradient manipulation | White-box: craft data to poison via gradient signal | Very Hard | Precision targeted attack |
| Phase | Action | Queries Required |
|---|---|---|
| 1. Reconnaissance | Probe API to determine input/output format, confidence scores available, rate limits | 100–500 |
| 2. Seed Query Generation | Generate diverse inputs covering input space — random, adaptive, or domain-guided | 1,000–5,000 |
| 3. Label Collection | Query target for each seed input, collect soft labels (probabilities) or hard labels | 10K–500K |
| 4. Surrogate Training | Train local model on (input, label) pairs — often using knowledge distillation | — |
| 5. Fidelity Validation | Compare surrogate and target on held-out test set — iterate if fidelity insufficient | 1,000–5,000 |
| Target System | Attack | India-Specific Risk |
|---|---|---|
| CCTV / Access Control AI | Adversarial patch on clothing | Attacker misclassified as authorised staff in smart buildings |
| ML-based malware detector | Feature-space adversarial PE modification | Evade endpoint security — Rs.100Cr+ ransomware impact |
| Bank fraud detection | Adversarial transaction feature crafting | UPI/NEFT fraud transactions classified as legitimate |
| Face recognition (Aadhaar) | Adversarial glasses / makeup | Identity spoofing in biometric authentication |
Select all components in your ML deployment to calculate the attack surface score.
Deepfake & Synthetic Media Threats
Deepfake technology is now a primary tool for fraud, BEC attacks, and disinformation. India is the #2 target globally for deepfake fraud — Rs.340Cr BEC cases documented in 2024–25.
| Type | Technology | Primary Use by Attackers | Detection Difficulty |
|---|---|---|---|
| Video Deepfake | Diffusion models, GANs, face-swap | CEO/CFO impersonation, false evidence, disinformation | Hard |
| Audio Deepfake (Voice Clone) | TTS, voice conversion (ElevenLabs, RVC) | BEC wire fraud, vishing, bypass voice authentication | Very Hard |
| Synthetic Image | Stable Diffusion, Midjourney, DALL-E | Fake identity documents, SIM swap, social engineering | Medium |
| Text Generation | LLM (GPT-4, Claude, open-source) | Spear phishing, fake news, impersonation emails | Very Hard |
| Synthetic Video (Lip-Sync) | Wav2Lip, SadTalker | Fake interviews, identity fraud, political disinformation | Hard |
| Case | Technique | Financial Impact | Sector |
|---|---|---|---|
| CFO voice clone BEC — Mumbai fintech | Audio deepfake (ElevenLabs) | Rs.340 Crore | BFSI |
| MD video deepfake — vendor fraud | Real-time video face-swap | Rs.89 Crore | Manufacturing |
| Aadhaar photo deepfake — SIM swap | Synthetic image (face generation) | Rs.45 Lakh per victim | Telecom |
| IT interview deepfake — NK actor | Video lip-sync + voice clone | IP theft + access | IT Services |
| Politician face-swap — disinformation | Video deepfake (Wav2Lip) | Reputational, regulatory | Government |
DPDP Act 2023 — AI Compliance Checker
The Digital Personal Data Protection Act 2023 applies directly to AI systems that process personal data of Indian citizens. Interactive tool maps your AI system's characteristics to specific legal obligations.
| Section | Provision | AI System Impact | Max Penalty |
|---|---|---|---|
| Section 4 | Lawful basis for data processing | AI training on personal data requires consent or legitimate use | Rs.50 Crore |
| Section 6 | Consent requirements | Specific, informed consent before AI processes personal data | Rs.250 Crore |
| Section 7 | Sensitive personal data | Enhanced protection — health, biometric, financial data in AI | Rs.200 Crore |
| Section 9 | Children's data | Parental consent required — no profiling or behavioural targeting of minors | Rs.200 Crore |
| Section 11 | Right to information | Disclose when AI makes decisions affecting individuals | Rs.50 Crore |
| Section 12 | Right to correction/erasure | AI systems must support data deletion including from training sets | Rs.250 Crore |
| Section 16 | Cross-border transfer | AI inference using Indian citizen data: processing location restrictions | Rs.200 Crore |
Select all characteristics that apply to your AI system to get specific DPDP obligations and penalty exposure.
AI Incident Response Playbooks
Production-ready IR playbooks for AI-specific security incidents — prompt injection attacks, model poisoning, deepfake BEC fraud, and model extraction. Built for SOC teams and CISOs.
| Phase | Actions | SLA |
|---|---|---|
| Detect | Alert on anomalous outputs, jailbreak patterns, unexpected tool calls, safety filter activations; monitor for data exfiltration patterns in LLM outputs | 0–15 min |
| Contain | Disable affected LLM endpoint or switch to safe-mode. For agentic: immediately revoke all active tool permissions. Preserve all input/output logs before shutdown | 15–30 min |
| Investigate | Reconstruct full conversation history. Identify injection vector (direct vs indirect). Scope data accessed. Map all tool calls executed. Assess downstream impact | 30 min–4 hrs |
| Eradicate | Remove injected content from RAG knowledge base. Update input validation rules. Patch system prompt to resist identified attack pattern. Review and tighten tool permissions | 4–24 hrs |
| Recover | Deploy updated validation rules. Enable monitoring. Gradual re-enable with enhanced logging. Red team test against identified attack vector before full restore | 24–48 hrs |
| Post-Incident | DPDP breach notification if PII exposed (72-hour clock). Update LLM security test suite. Brief stakeholders. Document lessons learned | 48–72 hrs |
| Phase | Actions | SLA |
|---|---|---|
| Detect | Monitor for anomalous model outputs on specific triggers, unexpected accuracy degradation on production data, model registry access anomalies, unusual training pipeline activity | Ongoing monitoring |
| Contain | Immediately roll back to last known-good model checkpoint. Disable auto-deployment pipeline. Isolate training infrastructure from production. Preserve poisoned artefacts for forensics | 0–1 hr |
| Investigate | Conduct activation clustering analysis on suspect model. Run Neural Cleanse / ABS to identify backdoor trigger patterns. Audit training data pipeline for anomalous additions | 1–72 hrs |
| Eradicate | Remove poisoned training data. Retrain from verified clean checkpoint. Verify data provenance for all training inputs. Implement data integrity checks going forward | Days–weeks |
| Recover | Deploy verified clean model with enhanced monitoring. Implement model fingerprinting. Validate against known trigger patterns before go-live | Post-retrain |
| Time | Action | Owner |
|---|---|---|
| T+0 min | HALT all pending wire transfers. Do not execute any further instructions from suspected call/email | Finance / CISO |
| T+5 min | Call beneficiary bank fraud hotline (24x7) to attempt freeze. Provide transaction details. Time-critical: funds moved within 30–60 min of transfer | CFO / Treasury |
| T+15 min | Verify instruction authenticity out-of-band: call known executive number (NOT number from suspicious communication). Use pre-agreed code phrase if available | Finance Team |
| T+30 min | File cybercrime complaint at cybercrime.gov.in. Lodge FIR with local police cyber cell. Report to RBI (if bank involved) within 2 hours | CISO / Legal |
| T+1 hr | Preserve evidence: call recordings, email headers, video files. Conduct deepfake authentication analysis. Brief C-suite and board | SOC / Legal |
| T+24 hr | DPDP/RBI breach notification if applicable. Insurance claim (cyber liability). Staff awareness communication on deepfake BEC TTPs | CISO / Compliance |
| Phase | Actions | Notes |
|---|---|---|
| Detect | Anomalous API query patterns: high volume, systematic input coverage, unusual confidence score requests, single IP exceeding statistical query norms | Set SIEM alert on percentile-based query anomalies |
| Contain | Rate-limit or block suspected extraction sources. Add output perturbation (round probabilities). Increase monitoring sensitivity. Consider adding watermarking queries | Do not completely block — preserve evidence |
| Investigate | Analyse full query history from suspect sources. Estimate extraction coverage. Attempt to access/test suspected surrogate model if located. Assess trade secret exposure | Legal counsel engaged for IP theft claim |
| Legal | File complaint under IT Act Section 66 (computer fraud), IPC 379 (theft), and/or DPDP Act if training data extracted. Seek civil injunction if surrogate model found deployed | India does not yet have specific ML IP protection law |