OpenParable
Skip to content
← Back to skills

T1204.005_malicious-library

DevOps & Security

Adversaries may rely on a user installing a malicious library to facilitate execution.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/CyberStrikeus/CyberStrike/blob/HEAD/.cyberstrike/skill/mitre_attack/TA0002_execution/T1204.005_malicious-library/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/t1204-005-malicious-library, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

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

  • Execution (TA0002)

Platforms: Linux, macOS, Windows

What to Check

  • Identify if Malicious Library technique is applicable to target environment
  • Check Linux systems for indicators of Malicious Library
  • Check macOS systems for indicators of Malicious Library
  • Check Windows systems for indicators of Malicious Library
  • Verify mitigations are bypassed or absent (3 known mitigations)
  • Assess detection coverage (1 detection strategies)

How to Test

Manual Testing

  1. Identify Attack Surface: Determine if the target environment is susceptible to Malicious Library by examining the target platforms (Linux, macOS, Windows).

  2. Assess Existing Defenses: Review whether mitigations for T1204.005 are in place. If defenses are absent or misconfigured, this technique may be exploitable.

  3. 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.

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.

Detection

User-Initiated Malicious Library Installation via Package Manager (T1204.005)

Risk Assessment

FindingSeverityImpact
Malicious Library technique applicableHighExecution

CWE Categories

CWE IDTitle
CWE-94Improper Control of Generation of Code

References