Root/Jailbreak Detection Lock
Potency Medium
Resilience Medium
Cost Medium
Tags: root, jailbreak, code lock
Description
The Root/Jailbreak Detection Lock locks code so that it can detect rooted devices (in the case of Android) or jailbroken devices (in the case of iOS), so that your applications can, for instance, refuse to run on these devices. When your code is executed in a device that is rooted or jailbroken, it will execute one or more Countermeasures.
Consider combining this transformation with obfuscation transformations to harden the resulting code making it more resilient to automated de-obfuscator tools and harder to understand by a human.
Compatibility
Currently, this lock works/has been tested on React Native and Ionic Corbova/Capacitor applications.
Code Annotation Example
Option Types
Name | Required | Default Value | Description |
countermeasures | Yes | {"breakApplication": true,"realTimeNotifications": false,"dataExfiltrationPrevention": false,"selfDestruct": false} | List of available countermeasures |
Countermeasures
Name | Description |
customCallback | Name of the function to be called as a countermeasure. |
breakApplication | Breaks the application's functionality. |
realTimeNotifications | Sends a notification when a violation occurs. |
dataExfiltrationPrevention | Prevents a malicious actor from carrying out an unauthorized data transfer by blocking network requests. |
selfDestruct | Attempts to damage the state and behavior of the application and/or the environment that is running the application. |
API Parameters
Example:
{
"keys": {
"accessKey": "XXXXXX",
"secretKey": "YYYYYY"
},
"applicationId": "ZZZZZZ",
"params": [
{
"name": "rootJailbreakDetectionLock",
"options": {
"countermeasures": {
"customCallback": null,
"breakApplication": true,
"realTimeNotifications": false,
"dataExfiltrationPrevention": false,
"selfDestruct": false
}
}
}
]
}