Execution · ATT&CK v20
T1204.005 User Execution: Malicious Library
A Execution technique. Running the attacker’s code on a system.
- T1204.005Technique ID
- ExecutionTactic
- 1Places taught
What the attacker does
The developer or a build system installs a malicious package (npm, PyPI and others): a typosquatted name or a hijacked popular package. Its install script runs right away with the user's rights.
How it shows up in the logs
- npm, node, pip or python starting shells, curl or wget during an install (postinstall scripts).
- The install process reading credentials: ~/.npmrc, ~/.aws/credentials, .env files, SSH keys.
- Outbound connections from the build or developer machine to a new domain right after the install.
Questions to ask in triage
- Which package and version, and where else is it installed (other machines, CI)?
- What did the install script read and send?
- Rotate every secret that was on the machine or in the pipeline.
Read T1204.005 on attack.mitre.org
A sub-technique of T1204.
Where you meet it in CyberSim
In the cases
Part of the answer in 1 investigation, in these learning paths:
Which case is not said here: finding it is the case.
More Execution techniques
- T1047 Windows Management Instrumentation
- T1059.001 Command and Scripting Interpreter: PowerShell
- T1059.004 Command and Scripting Interpreter: Unix Shell
- T1059.007 Command and Scripting Interpreter: JavaScript
- T1072 Software Deployment Tools
- T1204.002 User Execution: Malicious File
- T1204.004 User Execution: Malicious Copy and Paste
- T1569.002 System Services: Service Execution
- T1698 Indirect Prompt Injection
Source: MITRE ATT&CK T1204.005, tactic TA0002.