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.
Currently, this lock works/has been tested on React Native and Ionic Corbova/Capacitor applications.
// @jscrambler define rootJailbreakDetectionLock {countermeasures: {breakApplication: 1, customCallback: testFunction}} as rj1
// @jscrambler enable rj1
Name | Required | Default Value | Description |
---|---|---|---|
countermeasures | Yes | {"breakApplication": true,"realTimeNotifications": false,"dataExfiltrationPrevention": false,"selfDestruct": false} | List of available 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. |
Example:
{
"keys": {
"accessKey": "XXXXXX",
"secretKey": "YYYYYY"
},
"applicationId": "ZZZZZZ",
"params": [
{
"name": "rootJailbreakDetectionLock",
"options": {
"countermeasures": {
"customCallback": null,
"breakApplication": true,
"realTimeNotifications": false,
"dataExfiltrationPrevention": false,
"selfDestruct": false
}
}
}
]
}