OpenParable
Skip to content
← Back to skills

T1129_shared-modules

DevOps & Security

Adversaries may execute malicious payloads via loading shared modules.

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/T1129_shared-modules/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/t1129-shared-modules, 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.

T1129 Shared Modules

High-Level Description

Adversaries may execute malicious payloads via loading shared modules. Shared modules are executable files that are loaded into processes to provide access to reusable code, such as specific custom functions or invoking OS API functions (i.e., Native API).

Adversaries may use this functionality as a way to execute arbitrary payloads on a victim system. For example, adversaries can modularize functionality of their malware into shared objects that perform various functions such as managing C2 network communications or execution of specific actions on objective.

The Linux & macOS module loader can load and execute shared objects from arbitrary local paths. This functionality resides in dlfcn.h in functions such as dlopen and dlsym. Although macOS can execute .so files, common practice uses .dylib files.

The Windows module loader can be instructed to load DLLs from arbitrary local paths and arbitrary Universal Naming Convention (UNC) network paths. This functionality resides in NTDLL.dll and is part of the Windows Native API which is called from functions like LoadLibrary at run time.

Kill Chain Phase

  • Execution (TA0002)

Platforms: Linux, macOS, Windows

What to Check

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

How to Test

Atomic Red Team Tests

The following tests are from Atomic Red Team and provide actionable ways to test this technique:

Atomic Test 1: ESXi - Install a custom VIB on an ESXi host

An adversary can maintain persistence within an ESXi host by installing malicious vSphere Installation Bundles (VIBs). Reference

Supported Platforms: windows

#{pscp_file} -pw #{vm_pass} #{vib_file} #{vm_user}@#{vm_host}:/tmp
echo "" | "#{plink_file}" "#{vm_host}" -ssh  -l "#{vm_user}" -pw "#{vm_pass}" -m "#{vib_install}"

Dependencies:

  • Check if plink and pscp are available.

Manual Testing

If Atomic Red Team tests are not applicable, manually verify the technique by:

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

  2. Assess Existing Defenses: Review whether mitigations for T1129 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.

Remediation Guide

M1038 Execution Prevention

Identify and block potentially malicious software executed through this technique by using application control tools capable of preventing unknown modules from being loaded.

Detection

Behavior-chain, platform-aware detection strategy for T1129 Shared Modules

Risk Assessment

FindingSeverityImpact
Shared Modules technique applicableLowExecution

CWE Categories

CWE IDTitle
CWE-94Improper Control of Generation of Code

References