Anti Jailbreak
Protection ID: anti_jailbreak
This protection prevents the application from running on jailbroken or rooted devices.
This protection is available in the editions:
Enterprise
How It Works
Anti-jailbreak protection employs multiple detection techniques to identify if your application is running on a jailbroken (iOS) or rooted (Android) device. When such a device is detected, the protection can terminate the application or trigger custom responses based on your configuration.
This protection helps prevent unauthorized analysis, debugging, and tampering that is commonly performed on jailbroken or rooted devices. By detecting these compromised environments, Shield helps protect your application from various security threats, including reverse engineering, code injection, and data theft.
Parameters
This protection has no parameters or settings.
Rules configuration
shield.config.json
{
"protections": {
"anti_jailbreak": {}
}
}
Modes
- Default: Detects jailbroken or rooted devices using multiple verification methods and prevents the application from running on these environments.
Code Example
This protection is applied at the assembly level and doesn't require specific code changes. When enabled, Shield automatically inserts detection code at critical points in your application.
The protection works transparently, without requiring any modifications to your source code:
// Your normal application code
public void StartApplication()
{
// Shield automatically checks for jailbreak/root before
// critical operations without any code changes needed
InitializeServices();
LoadUserData();
}
Exclusions
- Exclude with attribute
Include this attribute in your source code:
[Obfuscation(Exclude = false, Feature = "-anti_jailbreak")]
- Exclude from the interface
You can exclude this protection from specific assemblies using the Shield configuration interface.
When to Use
Anti-jailbreak protection enhances your application security in these key scenarios:
- Financial applications: Secures banking, payment processing, and cryptocurrency applications
- Enterprise applications: Protects business-critical data and functionality on mobile devices
- Premium content applications: Safeguards subscription-based services and premium content delivery
- Authentication systems: Strengthens applications that handle sensitive credentials and tokens
- Applications with licensing: Enhances protection for applications with license verification
Shield automatically optimizes anti-jailbreak detection based on your target platform and application type, ensuring robust protection without impacting legitimate users.
Anti-jailbreak protection works seamlessly with other Shield protections to create a comprehensive security strategy. Shield intelligently combines multiple security layers to maximize protection against unauthorized access and tampering.
Compatibility
Framework | Compatibility | Comments |
---|---|---|
.NET Core | ✔ | For mobile and cross-platform apps |
.NET Framework | ✔ | For mobile and cross-platform apps |
.NET (up to 8 version) | ✔ | For mobile and cross-platform apps |
.NET Standard | ✔ | For mobile and cross-platform apps |
Xamarin IOS | ✔ | |
Xamarin Android | ✔ | |
Xamarin MacOs | ✔ | |
WPF | ❌ | Not applicable for desktop applications |
Blazor | ❌ | Not applicable for web applications |
.NET Maui | ✔ | |
Unity | ✔ | For mobile builds |
ASP | ❌ | Not applicable for server applications |
Silverlight | ❌ | Not applicable |
VBa (Visual Basic) or C# (CSharp) | ✔ | For mobile applications |
WinRT | ❌ | Not applicable |
Shield is compatible with all versions of .NET. It automatically adapts to your specific framework, whether you're using .NET 2.0, .NET 4.7, .NET Core 2.1, or Xamarin.Forms 5.0.