CAPECattack pattern

CAPEC-660 Root/Jailbreak Detection Evasion via Hooking

Very High Official page ↗
Abstraction
Detailed
Status
Stable
Likelihood of attack
Medium
Typical severity
Very High
CAPEC version
3.9

Description

An adversary forces a non-restricted mobile application to load arbitrary code or code files, via Hooking, with the goal of evading Root/Jailbreak detection. Mobile device users often Root/Jailbreak their devices in order to gain administrative control over the mobile operating system and/or to install third-party mobile applications that are not provided by authorized application stores (e.g. Google Play Store and Apple App Store). Adversaries may further leverage these capabilities to escalate privileges or bypass access control on legitimate applications. Although many mobile applications check if a mobile device is Rooted/Jailbroken prior to authorized use of the application, adversaries may be able to "hook" code in order to circumvent these checks. Successfully evading Root/Jailbreak detection allows an adversary to execute administrative commands, obtain confidential data, impersonate legitimate users of the application, and more.

Execution flow

1. [Explore] [Identify application with attack potential] The adversary searches for and identifies a mobile application that could be exploited for malicious purposes (e.g. banking, voting, or medical applications). 2. [Experiment] [Develop code to be hooked into chosen target application] The adversary develops code or leverages existing code that will be hooked into the target application in order to evade Root/Jailbreak detection methods. 3. [Exploit] [Execute code hooking to evade Root/Jailbreak detection methods] Once hooking code has been developed or obtained, execute the code against the target application to evade Root/Jailbreak detection methods.

Prerequisites

• The targeted application must be non-restricted to allow code hooking.

Skills required

• [High] Knowledge about Root/Jailbreak detection and evasion techniques. • [Medium] Knowledge about code hooking.

Consequences

• Integrity, Authorization: Execute Unauthorized Commands • Confidentiality, Access Control, Authorization: Gain Privileges • Confidentiality, Access Control: Read Data

Mitigations

• Ensure mobile applications are signed appropriately to avoid code inclusion via hooking. • Inspect the application's memory for suspicious artifacts, such as shared objects/JARs or dylibs, after other Root/Jailbreak detection methods. • Inspect the application's stack trace for suspicious method calls. • Allow legitimate native methods, and check for non-allowed native methods during Root/Jailbreak detection methods. • For iOS applications, ensure application methods do not originate from outside of Apple's SDK.

Related

Att&ck technique · MITRE ATT&CK (1)

  • T1055 Process Injection technique

Child of · CAPEC (1)

  • CAPEC-251 Local Code Inclusion attack pattern

Weakness · CWE (1)

  • CWE-829 Inclusion of Functionality from Untrusted Control Sphere weakness

Referenced by CAPEC · can precede (1)

  • CAPEC-661 Root/Jailbreak Detection Evasion via Debugging attack pattern

Referenced by CWE · attack pattern (1)

  • CWE-829 Inclusion of Functionality from Untrusted Control Sphere weakness