VeriKQL by Kaushik Saha

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 sourceIn Microsoft Sentinel
auditd:SYSCALLexecve: Execution of pip, npm, gem, or similar package managersNot mapped to Sentinel yet.
auditd:PATHNew .py/.js/.sh files written to ~/.local/, ~/.cache/, or /tmp/ within 5 min of package installNot mapped to Sentinel yet.
NSM:Flowhttp::request: Network connection to package registry or C2 from interpreter shortly after installNot 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 sourceIn Microsoft Sentinel
WinEventLog:SysmonEventCode=1
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (1)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (1)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

WinEventLog:SysmonEventCode=11
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (11)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (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 sourceIn Microsoft Sentinel
macos:unifiedlogCommand line invocation of pip3, brew install, npm install from interactive TerminalNot 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 processNot mapped to Sentinel yet.

Content Hub rules tagged with it (0)

No Content Hub rule is tagged with this technique.

Rules tagged with this technique (or a sub-technique) in their metadata. Whether one fits your connectors is the coverage view (M2).

In Sigma rules

No SigmaHQ rule names it in their tags outright.

Community rules, not Microsoft's, and not checked by VeriKQL (Sigma is not KQL). From SigmaHQ/sigma at f083329, under the Detection Rule License (DRL) 1.1; each rule is credited to its author.

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.