New to CAPEC? Start Here
Home > CAPEC List > CAPEC-660: Root/Jailbreak Detection Evasion via Hooking (Version 3.9)  

CAPEC-660: Root/Jailbreak Detection Evasion via Hooking

Attack Pattern ID: 660
Abstraction: Detailed
View customized information:
+ 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.
+ Likelihood Of Attack


+ Typical Severity

Very High

+ Relationships
Section HelpThis table shows the other attack patterns and high level categories that are related to this attack pattern. These relationships are defined as ChildOf and ParentOf, and give insight to similar items that may exist at higher and lower levels of abstraction. In addition, relationships such as CanFollow, PeerOf, and CanAlsoBe are defined to show similar attack patterns that the user may want to explore.
ChildOfStandard Attack PatternStandard Attack Pattern - A standard level attack pattern in CAPEC is focused on a specific methodology or technique used in an attack. It is often seen as a singular piece of a fully executed attack. A standard attack pattern is meant to provide sufficient details to understand the specific technique and how it attempts to accomplish a desired goal. A standard level attack pattern is a specific type of a more abstract meta level attack pattern.251Local Code Inclusion
CanFollowDetailed Attack PatternDetailed Attack Pattern - A detailed level attack pattern in CAPEC provides a low level of detail, typically leveraging a specific technique and targeting a specific technology, and expresses a complete execution flow. Detailed attack patterns are more specific than meta attack patterns and standard attack patterns and often require a specific protection mechanism to mitigate actual attacks. A detailed level attack pattern often will leverage a number of different standard level attack patterns chained together to accomplish a goal.661Root/Jailbreak Detection Evasion via Debugging
Section HelpThis table shows the views that this attack pattern belongs to and top level categories within that view.
+ Execution Flow
  1. 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
  1. 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.
  1. 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
[Level: High]
Knowledge about Root/Jailbreak detection and evasion techniques.
[Level: 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
Section HelpThis table specifies different individual consequences associated with the attack pattern. The Scope identifies the security property that is violated, while the Impact describes the negative technical impact that arises if an adversary succeeds in their attack. The Likelihood provides information about how likely the specific consequence is expected to be seen relative to the other consequences in the list. For example, there may be high likelihood that a pattern will be used to achieve a certain impact, but a low likelihood that it will be exploited to achieve a different impact.
Execute Unauthorized Commands
Access Control
Gain Privileges
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.
+ 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.
+ Taxonomy Mappings
Section HelpCAPEC mappings to ATT&CK techniques leverage an inheritance model to streamline and minimize direct CAPEC/ATT&CK mappings. Inheritance of a mapping is indicated by text stating that the parent CAPEC has relevant ATT&CK mappings. Note that the ATT&CK Enterprise Framework does not use an inheritance model as part of the mapping to CAPEC.
Relevant to the ATT&CK taxonomy mapping (also see parent)
Entry IDEntry Name
1055Process Injection
+ References
[REF-624] Ansgar Kellner, Micha Horlboge, Konrad Rieck and Christian Wressnegger. "False Sense of Security: A Study on the Effectivity of Jailbreak Detection in Banking Apps". Technische Universit├Ąt Braunschweig. 2019-06-17. <>. URL validated: 2020-12-15.
[REF-625] San-Tsai Sun, Andrea Cuadros and Konstantin Beznosov. "Android Rooting: Methods, Detection, and Evasion". Technische Universit├Ąt Braunschweig. 2019-06-17. <>. URL validated: 2020-12-15.
[REF-626] Jose Lopes. "Who owns your runtime?". Nettitude Labs. 2015-10-12. <>. URL validated: 2020-12-15.
[REF-627] Suresh Khutale. "Android Root Detection Bypass by Reverse Engineering APK". InfoSec Institute. 2018-03-06. <>. URL validated: 2020-12-15.
+ Content History
Submission DateSubmitterOrganization
(Version 3.4)
CAPEC Content TeamThe MITRE Corporation
More information is available — Please select a different filter.
Page Last Updated or Reviewed: December 17, 2020