---
title: "CAPEC-660: Root/Jailbreak Detection Evasion via Hooking"
url: https://radicalnotion.ai/capec/capec-660
type: capec
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."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-660: Root/Jailbreak Detection Evasion via Hooking

- **Abstraction:** Detailed
- **Status:** Stable
- **Typical severity:** Very High
- **Likelihood of attack:** Medium
- **CAPEC catalog 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

### Step 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).

- Search application stores for mobile applications worth exploiting

### Step 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.

- Develop code or leverage existing code to bypass Root/Jailbreak detection methods.
- Test the code to see if it works.
- Iteratively develop the code until Root/Jailbreak detection methods are evaded.

### Step 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.

- Hook code into the target application.

## 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.

## Resources required

- The adversary must have a Rooted/Jailbroken mobile device.
- The adversary needs to have enough access to the target application to control the included code or file.

## Consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Integrity, Authorization | Execute Unauthorized Commands | Through Root/Jailbreak Detection Evasion via Hooking, the adversary compromises the integrity of the application. |
| Confidentiality, Access Control, Authorization | Gain Privileges | - |
| Confidentiality, Access Control | Read Data | An adversary may leverage Root/Jailbreak Detection Evasion via Hooking in order to obtain sensitive information. |

## 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.

## Example instances

An adversary targets a non-restricted iOS banking application in an attempt to compromise sensitive user data. The adversary creates Objective-C runtime code that always returns "false" when checking for the existence of the Cydia application. The malicious code is then dynamically loaded into the application via the DYLD\_INSERT\_LIBRARIES environment variable. When the banking applications checks for Cydia, the hooked code returns "false", so the application assumes the device is stock (i.e. not Jailbroken) and allows it to access the application. However, the adversary has just evaded Jailbreak detection and is now able to glean user credentials and/or transaction details.

An adversary targets a mobile voting application on an Android device with the goal of committing voter fraud. Leveraging the Xposed framework, the adversary is able to create and hook Java code into the application that bypasses Root detection methods. When the voting application attempts to detect a Rooted device by checking for commonly known installed packages associated with Rooting, the hooked code removes the suspicious packages before returning to the application. As a result, the application believes the device is stock (i.e. not Rooted) when in actuality this is not the case. Having evading Root detection, the adversary is now able to cast votes for the candidate of their choosing as a variety of different users.

## Related weaknesses (CWE)

- [CWE-829](https://radicalnotion.ai/cwe/cwe-829): Inclusion of Functionality from Untrusted Control Sphere

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Parent | [CAPEC-251](https://radicalnotion.ai/capec/capec-251) | Local Code Inclusion |
| Related | [CAPEC-661](https://radicalnotion.ai/capec/capec-661) | Root/Jailbreak Detection Evasion via Debugging |

## Taxonomy mappings

| Taxonomy | Entry | Id |
| --- | --- | --- |
| ATTACK | Process Injection | 1055 |

## Frequently asked questions

### What is CAPEC-660?

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.

### How does a Root/Jailbreak Detection Evasion via Hooking attack work?

It typically unfolds over 3 phases. It begins with: \[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).

### How do you prevent CAPEC-660?

Ensure mobile applications are signed appropriately to avoid code inclusion via hooking.

### What weaknesses does CAPEC-660 target?

CAPEC-660 exploits one CWE weakness: CWE-829 (Inclusion of Functionality from Untrusted Control Sphere).

### How severe is CAPEC-660?

MITRE rates CAPEC-660 as Very High severity with medium likelihood of attack.

Primary source: [MITRE CAPEC](https://capec.mitre.org/data/definitions/660.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/capec/capec-660). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
