T1204.005 Malicious Library
Executionon attack.mitre.org
ATT&CK Enterprise 20.0 · 20.1 released, update in review
How MITRE detects it
DET0252 User-Initiated Malicious Library Installation via Package Manager (T1204.005)
AN0698 Linux
User-initiated installation of Python (pip), NodeJS (npm), or other language libraries, followed by unexpected network connections, credential access, or startup file modifications. Defender sees `pip install` or `npm install` commands run by a non-root user, followed shortly by new `.py`, `.sh`, or `.js` files in hidden directories, or interpreter-based execution during boot/login.
| MITRE log source | In Microsoft Sentinel |
|---|---|
auditd:SYSCALLexecve: Execution of pip, npm, gem, or similar package managers | Not mapped to Sentinel yet. |
auditd:PATHNew .py/.js/.sh files written to ~/.local/, ~/.cache/, or /tmp/ within 5 min of package install | Not mapped to Sentinel yet. |
NSM:Flowhttp::request: Network connection to package registry or C2 from interpreter shortly after install | Not mapped to Sentinel yet. |
AN0699 Windows
Execution of `pip.exe`, `npm.cmd`, or MSI installers within user context, followed by script interpreter startup (e.g., python.exe) or PowerShell with unusual child processes or file writes in `%APPDATA%`, `%TEMP%`, or `%LOCALAPPDATA%`. Defender correlates command-line install tools with Sysmon and Event Logs to trace downstream behavior.
| MITRE log source | In Microsoft Sentinel |
|---|---|
WinEventLog:SysmonEventCode=1 |
Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent. |
WinEventLog:SysmonEventCode=11 |
Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent. |
AN0700 macOS
Execution of Homebrew, pip3, npm, or manually downloaded PKGs from Terminal or shell, followed by the creation of startup agents, interpreter spawns, or outbound connections to unfamiliar domains. Defender links Terminal commands to plist creation, unsigned binary launches, and `python3` or `node` processes connecting to remote endpoints.
| MITRE log source | In Microsoft Sentinel |
|---|---|
macos:unifiedlogCommand line invocation of pip3, brew install, npm install from interactive Terminal | Not mapped to Sentinel yet. |
macos:unifiedlogCreation of new LaunchAgent or LoginItem plist files in ~/Library/LaunchAgents/ | Not mapped to Sentinel yet. |
NSM:FlowOutbound HTTP/S initiated by newly installed interpreter process | Not mapped to Sentinel yet. |
Content Hub rules tagged with it (0)
No Content Hub rule is tagged with this technique.
In Sigma rules
Mitigations
MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.