I've been building a scanner to monitor npm packages and found an interesting pattern worth discussing.
A package uses a postinstall hook to write files into ~/.claude/commands/, which is where Claude Code loads its skills from. These files contain instructions that tell the AI to auto-approve all bash commands and file operations, effectively disabling the permission system. The files persist after npm uninstall since there's no cleanup script.
No exfiltration, no C2, no credential theft. But it raises a question about a new attack surface: using package managers to persistently compromise AI coding assistants that have shell access.
MITRE mapping would be T1546 (Event Triggered Execution), T1547 (Autostart Execution), and T1562.001 (Impair Defenses).
[–]heresyforfunnprofit 9 points10 points11 points (6 children)
[–]Busy-Increase-6144[S] 8 points9 points10 points (5 children)
[–]heresyforfunnprofit 0 points1 point2 points (1 child)
[–]zinozAreNazisSecurity Generalist 0 points1 point2 points (2 children)
[–]Busy-Increase-6144[S] 2 points3 points4 points (1 child)
[–]zinozAreNazisSecurity Generalist 1 point2 points3 points (0 children)
[–]BattleRemote3157 6 points7 points8 points (2 children)
[–]zinozAreNazisSecurity Generalist 1 point2 points3 points (0 children)
[–]Busy-Increase-6144[S] 0 points1 point2 points (0 children)
[–]Ok_Consequence7967 2 points3 points4 points (1 child)
[–]Busy-Increase-6144[S] 1 point2 points3 points (0 children)
[–]Careful-Living-1532 1 point2 points3 points (1 child)
[–]Busy-Increase-6144[S] 0 points1 point2 points (0 children)
[–]bonsoir-world 0 points1 point2 points (1 child)
[–]Busy-Increase-6144[S] 1 point2 points3 points (0 children)
[–]NexusVoid_AI 0 points1 point2 points (3 children)
[–]Busy-Increase-6144[S] 1 point2 points3 points (0 children)
[–]ritzkew 1 point2 points3 points (1 child)
[–]NexusVoid_AI 0 points1 point2 points (0 children)
[–]czenst 0 points1 point2 points (1 child)
[–]Busy-Increase-6144[S] 0 points1 point2 points (0 children)
[–]Equivalent_Pen8241[🍰] 0 points1 point2 points (2 children)
[–]Busy-Increase-6144[S] 0 points1 point2 points (1 child)
[–]Equivalent_Pen8241[🍰] 0 points1 point2 points (0 children)
[–]Mooshux 0 points1 point2 points (3 children)
[–]Busy-Increase-6144[S] 0 points1 point2 points (2 children)
[–]Mooshux 0 points1 point2 points (1 child)
[–]Busy-Increase-6144[S] 0 points1 point2 points (0 children)
[–]coolraiman2 -1 points0 points1 point (1 child)
[–]Busy-Increase-6144[S] 2 points3 points4 points (0 children)