| name | T1204.005_malicious-library |
| description | Adversaries may rely on a user installing a malicious library to facilitate execution. |
| category | input-validation |
| version | 18.1 |
| author | cyberstrike-official |
| tags | ["mitre-attack","enterprise","t1204.005","execution","linux","macos","windows","sub-technique"] |
| technique_id | T1204.005 |
| tactic | execution |
| all_tactics | ["execution"] |
| platforms | ["Linux","macOS","Windows"] |
| mitre_url | https://attack.mitre.org/techniques/T1204/005 |
| tech_stack | ["linux","macos","windows"] |
| cwe_ids | ["CWE-94"] |
| chains_with | ["T1204","T1204.001","T1204.002","T1204.003","T1204.004"] |
| prerequisites | ["T1204"] |
| severity_boost | {"T1204":"Chain with T1204 for deeper attack path","T1204.001":"Chain with T1204.001 for deeper attack path","T1204.002":"Chain with T1204.002 for deeper attack path"} |
T1204.005 Malicious Library
Sub-technique of: T1204
High-Level Description
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.
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.
Kill Chain Phase
Platforms: Linux, macOS, Windows
What to Check
How to Test
Manual Testing
-
Identify Attack Surface: Determine if the target environment is susceptible to Malicious Library by examining the target platforms (Linux, macOS, Windows).
-
Assess Existing Defenses: Review whether mitigations for T1204.005 are in place. If defenses are absent or misconfigured, this technique may be exploitable.
-
Execute Test: Use tools and methods described in the MITRE ATT&CK page and external references below.
Note: No Atomic Red Team tests available for this technique. See Atomic Red Team GitHub for updates.
Remediation Guide
M1033 Limit Software Installation
Where possible, consider requiring developers to pull from internal repositories containing verified and approved packages rather than from external ones.