-- ThreatDeck detection pack (osquery) version 2026.11.22-6eeea832 -- Generated 2026-11-22. 2 queries. -- Source: https://threatdeck.net/detections/ . Hunting queries are starting points: tune before alerting. Defensive use only. -- ATT&CK ids are MITRE ATT&CK Enterprise v20.1. Adapted rules keep their original licence (see attribution lines). -- s1ngularity (Nx) artifacts: AI CLI bypass runs in shell history and /tmp/inventory.txt -- id: s1ngularity-host-artifacts-osquery | maturity: hunt | techniques: LLM03, AML.T0010, AML.T0055, ASI02 -- MITRE ATT&CK: T1195.002, T1552.001 -- log source: osquery on macOS / Linux developer machines (scheduled or live query) -- page: https://threatdeck.net/detections/s1ngularity-host-artifacts-osquery/ -- source: https://www.stepsecurity.io/blog/supply-chain-security-alert-popular-nx-build-system-package-compromised-with-data-stealing-malware -- source: https://www.wiz.io/blog/s1ngularity-supply-chain-attack -- source: https://github.com/nrwl/nx/security/advisories/GHSA-cxm3-wv7p-598c -- source: https://github.com/osquery/osquery/tree/master/specs SELECT 'shell_history' AS source, u.username AS owner, sh.command AS detail, sh.history_file AS path FROM users u CROSS JOIN shell_history sh USING (uid) WHERE sh.command LIKE '%--dangerously-skip-permissions%' OR sh.command LIKE '%--trust-all-tools%' OR sh.command LIKE '%--dangerously-bypass-approvals-and-sandbox%' OR (sh.command LIKE '%--yolo%' AND (sh.command LIKE '%gemini%' OR sh.command LIKE '%codex%')) UNION ALL SELECT 'inventory_file' AS source, CAST(f.uid AS TEXT) AS owner, datetime(f.mtime, 'unixepoch') AS detail, f.path AS path FROM file f WHERE f.path IN ('/tmp/inventory.txt', '/tmp/inventory.txt.bak'); -- AI agent transcripts or credential stores held open by an unexpected process -- id: ai-transcript-or-credential-store-opened-by-other-process | maturity: hunt | techniques: AML.T0083, AML.T0085, LLM02, AML.T0055 -- MITRE ATT&CK: T1552.001, T1005 -- log source: osquery on macOS / Linux (process_open_files joined with processes) -- page: https://threatdeck.net/detections/ai-transcript-or-credential-store-opened-by-other-process/ -- source: https://code.claude.com/docs/en/claude-directory -- source: https://learn.chatgpt.com/docs/config-file/config-advanced -- source: https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-config-dir-reference -- source: https://www.akamai.com/blog/security/cursorjacking-every-cursor-user-is-vulnerable-to-api-key-theft-by-rogue-extensions -- source: https://boostsecurityio.github.io/bagel/probes/ai-cli/ -- source: https://github.com/osquery/osquery/tree/master/specs SELECT p.pid, p.name, p.path AS process_path, p.cmdline, p.uid, pof.path AS opened_file FROM process_open_files pof JOIN processes p USING (pid) WHERE (pof.path LIKE '%/.claude/projects/%' OR pof.path LIKE '%/.claude/history.jsonl' OR pof.path LIKE '%/.claude/.credentials.json' OR pof.path LIKE '%/.codex/sessions/%' OR pof.path LIKE '%/.codex/history.jsonl' OR pof.path LIKE '%/.codex/auth.json' OR pof.path LIKE '%/.gemini/tmp/%' OR pof.path LIKE '%/.gemini/oauth_creds.json' OR pof.path LIKE '%/.copilot/session-state/%' OR pof.path LIKE '%/.copilot/providers.json' OR pof.path LIKE '%/Cursor/User/globalStorage/state.vscdb%') AND p.name NOT IN ('claude', 'node', 'codex', 'gemini', 'copilot', 'Cursor', 'Cursor Helper', 'Cursor Helper (Plugin)', 'Cursor Helper (Renderer)') AND p.path NOT LIKE '%/.local/share/claude/versions/%';