Adversaries may execute their own malicious payloads by hijacking the way operating systems run applications. Hijacking execution flow can be for the purposes of persistence since this hijacked execution may reoccur over time.
There are many ways an adversary may hijack the flow of execution. A primary way is by manipulating how the operating system locates programs to be executed. How the operating system locates libraries to be used by a program can also be intercepted. Locations where the operating system looks for programs or resources, such as file directories, could also be poisoned to include malicious payloads.
| ID | Name | Description |
|---|---|---|
| S0311 | YiSpecter |
YiSpecter has hijacked normal application’s launch routines to display ads.[1] |
| ID | Mitigation | Description |
|---|---|---|
| M1002 | Attestation |
Device attestation could detect unauthorized operating system modifications. |
| M1004 | System Partition Integrity |
Android Verified Boot can detect unauthorized modifications made to the system partition, which could lead to execution flow hijacking.[2] |
| ID | Name | Analytic ID | Analytic Description |
|---|---|---|---|
| DET0694 | Detection of Hijack Execution Flow | AN1807 |
For Android, detect Hijack Execution Flow from documented management, network, or vetting evidence; treat state queries as periodic observations rather than real-time events. Correlate File Access via Application Vetting / Forensic Acquisition [Dynamic filesystem trace or acquired app-container/filesystem artifacts: App loads executable or library from writable external directory (/sdcard/, app cache, /data/local/tmp/) — writable-path library load is exploitable hijack vector]; OS API Execution via Application Vetting / Instrumented Dynamic Analysis [Dynamic API/runtime trace: App loads library or executes component]; Process Creation via Application Vetting / Managed Device Telemetry [App execution triggered with unexpected parent context or via indirect invocation (intent redirect, implicit intent resolution to unexpected handler) — indirect invocation path is the flow hijack confirmation]. Alert on a sequence or state change inconsistent with the device/app baseline, approved management policy, or expected user workflow; do not infer unobserved API calls, file/process activity, or payload content from management state alone. |