Dark Mode

Settings

Capec-640 Detail

Inclusion of Code in Existing Process

Detailed Software Likelihood: Low Typical Severity: High

Parents: 251

Description

The adversary takes advantage of a bug in an application failing to verify the integrity of the running process to execute arbitrary code in the address space of a separate live process. The adversary could use running code in the context of another process to try to access process's memory, system/network resources, etc. The goal of this attack is to evade detection defenses and escalate privileges by masking the malicious code under an existing legitimate process. Examples of approaches include but not limited to: dynamic-link library (DLL) injection, portable executable injection, thread execution hijacking, ptrace system calls, VDSO hijacking, function hooking, reflective code loading, and more.

Not present

External ID Source Link Description
CAPEC-640 capec https://capec.mitre.org/data/definitions/640.html
CWE-114 cwe http://cwe.mitre.org/data/definitions/114.html
CWE-829 cwe http://cwe.mitre.org/data/definitions/829.html
T1505.005 ATTACK https://attack.mitre.org/wiki/Technique/T1505/005 Server Software Component: Terminal Services DLL
T1574.006 ATTACK https://attack.mitre.org/wiki/Technique/T1574/006 Hijack Execution Flow: Dynamic Linker Hijacking
T1574.013 ATTACK https://attack.mitre.org/wiki/Technique/T1574/013 Hijack Execution Flow: KernelCallbackTable
T1620 ATTACK https://attack.mitre.org/wiki/Technique/T1620 Reflective Code Loading
Explore
  1. Determine target process: The adversary determines a process with sufficient privileges that they wish to include code into.

  2. Techniques
    On Windows, use the process explorer's security tab to see if a process is running with administror privileges.
    On Linux, use the ps command to view running processes and pipe the output to a search for a particular user, or the root user.
Experiment
  1. Attempt to include simple code with known output: The adversary attempts to include very simple code into the existing process to determine if the code inclusion worked. The code will differ based on the approach used to include code into an existing process.

Exploit
  1. Include arbitrary code into existing process: Once an adversary has determined that including code into the existing process is possible, they will include code for a targeted purpose, such as accessing that process's memory.

  1. The targeted application fails to verify the integrity of the running process that allows an adversary to execute arbitrary code.

Not present

High
Knowledge of how to load malicious code into the memory space of a running process, as well as the ability to have the running process execute this code. For example, with DLL injection, the adversary must know how to load a DLL into the memory space of another running process, and cause this process to execute the code inside of the DLL.
Integrity Confidentiality
Execute Unauthorized Commands Execute Unauthorized Commands
Read Data Read Data

Not present