Detecting AI Model Prompt Injection Attacks

'Detects prompt injection attacks targeting LLM-based applications using a multi-layered defense combining regex pattern matching for known attack signatures, heuristic scoring for structural anomalies, and transformer-based classification with DeBERTa models. The detector analyzes user inputs before they reach the LLM, flagging direct injections (system prompt overrides, role-play escapes, instruction hijacking) and indirect injections (encoded payloads, multi-language obfuscation, delimiter-based escapes). Based on the OWASP LLM Top 10 (LLM01:2025 Prompt Injection) and Simon Willison''s prompt injection taxonomy. Activates for requests involving prompt injection detection, LLM input sanitization, AI security scanning, or prompt attack classification. '

thedixitjain 3bceb46 4 files · 41.3 KB Updated 2 repo stars

File contents

thedixitjain/the-mega-skill-library/tree/main/library/prompt-engineering/detecting-ai-model-prompt-injection-attacks commit 3bceb466f5

Frequently asked questions

npx skillmds add thedixitjain/detecting-ai-model-prompt-injection-attacks