CAPECattack pattern

CAPEC-661 Root/Jailbreak Detection Evasion via Debugging

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

Description

An adversary inserts a debugger into the program entry point of a mobile application to modify the application binary, 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). Rooting/Jailbreaking a mobile device also provides users with access to system debuggers and disassemblers, which can be leveraged to exploit applications by dumping the application's memory at runtime in order to remove or bypass signature verification methods. This further allows the adversary to evade Root/Jailbreak detection mechanisms, which can result in execution of administrative commands, obtaining confidential data, impersonating 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] [Debug the target application] The adversary inserts the debugger into the program entry point of the mobile application, after the application's signature has been identified, to dump its memory contents. 3. [Experiment] [Remove application signature verification methods] Remove signature verification methods from the decrypted code and resign the application with a self-signed certificate. 4. [Exploit] [Execute the application and evade Root/Jailbreak detection methods] The application executes with the self-signed certificate, while believing it contains a trusted certificate. This now allows the adversary to evade Root/Jailbreak detection via code hooking or other methods.

Prerequisites

• A debugger must be able to be inserted into the targeted application.

Skills required

• [High] Knowledge about Root/Jailbreak detection and evasion techniques. • [Medium] Knowledge about runtime debugging.

Consequences

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

Mitigations

• Instantiate checks within the application code that ensures debuggers are not attached.

Related

Can precede · CAPEC (2)

  • CAPEC-660 Root/Jailbreak Detection Evasion via Hooking attack pattern
  • CAPEC-68 Subvert Code-signing Facilities attack pattern

Child of · CAPEC (1)

  • CAPEC-121 Exploit Non-Production Interfaces attack pattern

Weakness · CWE (1)

  • CWE-489 Active Debug Code weakness

Referenced by CWE · attack pattern (1)

  • CWE-489 Active Debug Code weakness