
A vendor-neutral detection pack shipping Sigma, YARA, and Suricata rules plus a forensic artifact catalog for defenders investigating AI/ML incidents in authorized environments.
| Tool | depalmar/ai-dfir-toolkit — open-source detection signatures and forensic artifact catalog for AI/ML attacks and breaches |
| Category | Detection engineering / DFIR rule pack (Sigma, YARA, Suricata) |
| Primary Use | Deploying vendor-neutral detections for LLM prompt injection, MCP tool poisoning, model supply-chain poisoning, and agent endpoint abuse across SIEM, EDR, and network sensors |
| Safe Use | Built for blue teams running authorized defensive monitoring, incident response on systems they own, and lab-based detection tuning and research |
| Telemetry Note | This is a defensive tool — it consumes logs, files, and traffic; deploying its rules creates SIEM alerts and YARA/Suricata hits, leaving no attacker-side footprint beyond the detection coverage itself |
depalmar/ai-dfir-toolkit is one of the more serious attempts to close a gap that most detection programs have not yet acknowledged: almost nobody has coverage for attacks against AI infrastructure. The repository, an Apache-2.0 licensed personal project with roughly 160 stars and a Python codebase, ships 70 rule files containing 161 individual signatures in three open formats — Sigma (.yml) for log-based detection, YARA (.yar) for file and memory artifacts, and Suricata (.rules) for network traffic. The stated rationale in the README is blunt: existing detection content for AI/ML attacks is either locked inside vendor SIEMs or scattered across blog posts, so this pack deliberately uses open standards that convert to any modern detection stack via pySigma backends.
The coverage map is organized into nine attack-class directories plus a cross-tool endpoint set. 01-llm-prompt-injection/ handles prompt injection, jailbreaks, and system-prompt extraction; 02-mcp-attacks/ covers Model Context Protocol tool poisoning, config tampering, and rug pulls; 03-model-supply-chain/ targets pickle exploits, HuggingFace-based distribution, and dependency confusion; 04-ai-infrastructure/ addresses what the README names as ShadowRay, Triton, MLflow, and GPU abuse. Further directories cover M365 Copilot and coding-assistant abuse, RAG/vector database exposure and poisoning, malware calling LLM APIs at runtime, agentic orchestration and AI-service C2, and agent memory persistence and context poisoning. Each directory carries its own README.md plus rules in their native format.
What elevates this above a simple rule dump is the mapping discipline. Every rule is cross-referenced in MAPPINGS.md to MITRE ATLAS techniques, the OWASP LLM 2026 list, and the newer OWASP Agentic list — the coverage table in the README breaks down per-category signature counts against those frameworks. The README warns that the 2026 OWASP LLM list changed the meaning of eight of ten IDs from 2025, which is a genuinely useful operational caveat: an analyst quoting an older report against these rules would be mapping to the wrong category. Pinned frameworks for the threat-intel layer include ATLAS 2026.10, ATT&CK 20.0, CISA KEV, and the OWASP 2026 lists, refreshed weekly by scheduled workflows that auto-merge when only reference data changed.
The artifacts/ directory is arguably the most distinctive component: a machine-readable catalog of endpoint artifacts left by AI coding agents, local LLM runtimes, agent frameworks, MCP hosts, and related tooling across eleven categories — install paths, credential storage locations, MCP config paths, listening ports, process relationships, and registry keys, each rated by forensic value and sourcing confidence. For IR triage this answers the acquisition question before you know which agent stack a host runs. The catalog exports to ForensicArtifacts format for Plaso, GRR, and Timesketch, to KAPE targets, to Velociraptor artifacts, and to plain CSV/JSON — a pragmatic acknowledgment that DFIR shops live in heterogeneous toolchains.
Deployment follows the standard open-detection workflow. For Elastic, the README shows installing sigma-cli and pysigma-backend-elasticsearch and running sigma convert -t lucene over the .yml files; other SIEMs work through the pySigma backend list. The YARA rules are pointed directly at model directories or at suspect MCP configs such as claude_desktop_config.json, and the Suricata rules drop into /etc/suricata/rules/ with a suricata -T validation pass before reload. That is the full extent of the operational surface here — this is a defensive pack, and every invocation example in the README is about scanning your own estate or validating rules, never about attacking anything.
One engineering detail worth reading carefully is the case-sensitivity note for the Elastic backend. The keyword-based rules (prompt injection, jailbreak, system-prompt extraction) follow the Sigma convention that contains matching is case-insensitive, so rules are written in lowercase and rely on backend case folding. On Elastic, matched content fields must be mapped as analyzed text rather than keyword, or capitalized attacker input will silently miss. The README explicitly warns against trying to force this with the re|i modifier because Lucene's regex engine lacks a (?i) flag and the resulting query is invalid. This is the kind of failure mode that produces quietly degraded detection coverage, and the author documenting it signals real deployment experience.
Rule quality is managed through tuning metadata rather than blind trust. Every rule carries a falsepositives: section listing known FP scenarios, a level: field from low to critical, and tunable selectors for scoping to specific orgs, users, or namespaces. The recommended rollout is conservative: seven days in a test index, triage hits, tune the selection and filter blocks, then promote to production starting at high severity and above. For a pack covering behavioral signals like agent activity, that staged approach is the correct default rather than optional hygiene.
The tests/ directory contains both malicious and benign sample artifacts for validating rule correctness via ./validate.sh, with an expected result of 15 passes and zero failures. A thoughtful touch: the suite hard-exits if the yara binary is missing instead of reporting a clean run, because absent tooling would otherwise score every "expect no matches" assertion as a pass — the suite would look healthy while testing nothing. That class of silent self-deception is common in detection testing harnesses, and guarding against it is a mark of care. Contribution requirements reinforce the same discipline: every submitted rule must reference an ATLAS technique, CVE, or published research, and must ship test data.
On top of the catalog sits a threat-intel layer with 20 actor profiles and 22 case studies carrying 221 indicators, each profile derived from the cases that cite it and linking techniques to the specific repository rules that detect them. Exports include intel.json, a STIX 2.1 bundle for OpenCTI or MISP, and Maltego-style import CSVs. Case studies record analyst disagreement in a contested field rather than resolving it — an honest provenance model. For defenders building AI-era detection programs, this repository functions as both a deployable rule set and a structured curriculum for what AI incident response actually looks like; everything here is designed for authorized monitoring of systems you own, and nothing in it provides offensive capability.
depalmar/ai-dfir-toolkit.Educational analysis for authorized security professionals. Use only in controlled, authorized environments.
Related coverage
0 comentários:
Post a Comment
Note: Only a member of this blog may post a comment.