Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Adversaries may execute malicious payloads via loading shared modules.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 7% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -44% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 53% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 33% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 2% | 0% |
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.
Platforms: Linux, macOS, Windows
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
An adversary can maintain persistence within an ESXi host by installing malicious vSphere Installation Bundles (VIBs). Reference
Supported Platforms: windows
cmd#{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:
If Atomic Red Team tests are not applicable, manually verify the technique by:
Identify and block potentially malicious software executed through this technique by using application control tools capable of preventing unknown modules from being loaded.
| Finding | Severity | Impact | | ----------------------------------- | -------- | --------- | | Shared Modules technique applicable | Low | Execution |
| CWE ID | Title | | ------ | -------------------------------------- | | CWE-94 | Improper Control of Generation of Code |
Other measured skills in the registry, with their headline benchmark lift.