| ID | Name |
|---|---|
| T1204.001 | Malicious Link |
| T1204.002 | Malicious File |
| T1204.003 | Malicious Image |
| T1204.004 | Malicious Copy and Paste |
| T1204.005 | Malicious Library |
Adversaries may rely on a user installing a malicious library to facilitate execution. Threat actors may Upload Malware to package managers such as NPM and PyPi, as well as to public code repositories such as GitHub. User may install libraries without realizing they are malicious, thus bypassing techniques that specifically achieve Initial Access. This can lead to the execution of malicious code, such as code that establishes persistence, steals data, or mines cryptocurrency.[1][2]
In some cases, threat actors may compromise and backdoor existing popular libraries (i.e., Compromise Software Dependencies and Development Tools). Alternatively, they may create entirely new packages and leverage behaviors such as typosquatting to encourage users to install them.
| ID | Name | Description |
|---|---|---|
| G1052 | Contagious Interview |
Contagious Interview has relied on users to install a malicious library from a code repository to infect the victim's device and has led to additional payload distribution and theft of sensitive data.[3][4][5][6][7][8][9][10][11][12] |
| ID | Mitigation | Description |
|---|---|---|
| M1033 | Limit Software Installation |
Where possible, consider requiring developers to pull from internal repositories containing verified and approved packages rather than from external ones. |
| M1031 | Network Intrusion Prevention |
Network prevention intrusion systems and systems designed to scan and remove malicious downloads can be used to block activity. |
| M1017 | User Training |
Train developers to be aware of the existence of malicious libraries and how to avoid installing them. |
| ID | Name | Analytic ID | Analytic Description |
|---|---|---|---|
| DET0252 | User-Initiated Malicious Library Installation via Package Manager (T1204.005) | AN0698 |
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 |
| AN0699 |
Execution of |
||
| AN0700 |
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 |