CAPEC Details
Name Root/Jailbreak Detection Evasion via Hooking
Likelyhood of attack Typical severity
Medium Very High
Summary 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.
Prerequisites The targeted application must be non-restricted to allow code hooking.
Execution Flow
Step Phase Description Techniques
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
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.
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.
Solutions 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 Weaknesses
CWE ID Description
CWE-829 Inclusion of Functionality from Untrusted Control Sphere
Related CAPECS
CAPEC ID Description
CAPEC-251 The attacker forces an application to load arbitrary code files from the local machine. The attacker could use this to try to load old versions of library files that have known vulnerabilities, to load files that the attacker placed on the local machine during a prior attack, or to otherwise change the functionality of the targeted application in unexpected ways.
Taxonomy: ATTACK
Entry ID Entry Name
1055 Process Injection