YARAAlert-ready after reviewAI coding agents on endpoints
YARA: s1ngularity (Nx) telemetry.js payload and shell-profile shutdown line
Matches the Nx postinstall stealer by its combination of AI CLI bypass flags, the /tmp/inventory.txt target and the attacker repository or exfiltration file names (s1ngularity-repository, results.b64), plus the `sudo shutdown -h 0` line it appended to ~/.bashrc and ~/.zshrc. Scan node_modules trees, npm caches and home directories.
- Log source
- File scan of node_modules, npm/yarn/pnpm caches and shell profile files
- Techniques
- LLM03 Supply Chain · AML.T0010 Supply Chain Compromise · ASI04 Agentic Supply Chain Vulnerabilities
- MITRE ATT&CK
- T1195.002Compromise Software Supply ChainT1552.001Credentials In FilesT1546.004Unix Shell Configuration ModificationT1529System Shutdown/Reboot
- Reviewed
- 2026-11-10
Query
rule ThreatDeck_Nx_s1ngularity_telemetry_js
{
meta:
description = "Nx s1ngularity postinstall stealer that drives AI CLIs with approval-bypass flags"
reference = "https://www.wiz.io/blog/s1ngularity-supply-chain-attack"
author = "ThreatDeck"
date = "2026-11-09"
strings:
$inventory = "/tmp/inventory.txt" ascii
$repo = "s1ngularity-repository" ascii
$results = "results.b64" ascii
$flag_claude = "--dangerously-skip-permissions" ascii
$flag_gemini = "--yolo" ascii
$flag_q = "--trust-all-tools" ascii
condition:
filesize < 2MB and $inventory and ($repo or $results) and 2 of ($flag_*)
}
rule ThreatDeck_Nx_s1ngularity_shell_profile_shutdown
{
meta:
description = "Shell profile line appended by the Nx s1ngularity payload"
reference = "https://www.stepsecurity.io/blog/supply-chain-security-alert-popular-nx-build-system-package-compromised-with-data-stealing-malware"
author = "ThreatDeck"
date = "2026-11-09"
strings:
$shutdown = "sudo shutdown -h 0" ascii
condition:
filesize < 256KB and $shutdown
} Expected false positives
- Security research copies of the payload and IOC write-ups
- Admin scripts that legitimately contain `sudo shutdown -h 0` (second rule; only alert when it is in a shell profile)
Sources
- Wiz: s1ngularity — Nx supply chain attack (Aug 2025)
- StepSecurity: Nx build system package compromised with data-stealing malware
- Nx security advisory GHSA-cxm3-wv7p-598c
Reviewed against vendor documentation, not tested in your environment. Defensive use only.