advanced_root_detection 0.0.5
advanced_root_detection: ^0.0.5 copied to clipboard
Flutter RASP plugin for Android & iOS: detects rooted/jailbroken devices, Frida/Xposed hooking, emulators, debuggers, and app tampering with NDK-level detection.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.0.5 - 2026-08-24 #
Changed #
RootDetectionGuardnow blocks only on acritical-severity threat in a blocking category (privilegedAccess,runtimeManipulation,integrityViolation), and drives the blocked-screen message from that same set. Signals that also occur on clean, non-rooted devices are reported athigh/mediumand are surfaced but no longer trigger a block. Every definitive root/jailbreak indicator (su binary, Magisk daemon/socket/mounts/app-dir/properties, Zygisk injection, root-manager app,/systemmounted read-write, Frida/Xposed hooks, wrong APK signer) is reported atcritical, so genuinely rooted or jailbroken devices are still blocked.RootDetectionGuardblocked screen now shows a fixed user-facing message (the default "This device is rooted or jailbroken." text, or the providedblockedMessage) with a "Show error logs" link that opens a popup listing every blocking threat. Previously the first detected threat's raw description was shown as the headline, which could surface a non-blocking finding (e.g. an attached debugger) as the apparent block reason.
Fixed #
- Access Denied on clean, non-rooted devices caused by non-root heuristics that fell into a blocking category regardless of severity — an enabled accessibility service (e.g. the Grammarly keyboard or password managers), rwxp JIT pages (ART on Android 10+), test-keys / userdebug builds (GSI, AOSP, some OEM ROMs), an unlocked bootloader (developer phones), BusyBox, or permissive SELinux. These are now reported without blocking (see Changed).
- False "Native ptrace/TracerPid check: debugger attached" block on ordinary, non-debugged devices. The native
isDebuggerPresent()check used aptrace(PTRACE_TRACEME)self-attach that marked the process as traced by its parent and could not be undone from the tracee side, polluting the subsequent/proc/self/statusTracerPid read with a non-zero parent pid. The check now relies solely on the non-destructive TracerPid read (0 when clean, the tracer pid when a debugger is attached).
0.0.4 - 2026-04-27 #
Added #
bypassInDebugModeflag onRootDetectionGuard— when set totrue, the root/jailbreak check is skipped entirely in debug builds (kDebugMode == true), allowing installation and testing on normal (non-rooted) developer devices without triggering the blocked screen. Has no effect in profile or release builds.
0.0.3 - 2026-04-26 #
Changed #
- Shortened package description to comply with pub.flutter-io.cn 180-character limit
- Added
homepage,repository, andissue_trackerURLs topubspec.yaml
0.0.1 - 2026-04-26 #
Added #
- Initial release of
advance_root_detectionFlutter RASP plugin - Android root detection:
subinaries, Magisk/Zygisk artifacts, test-keys, dangerous props, root manager packages - Android hooking detection: Frida (port + process + maps), Xposed/LSPosed/EdXposed, Cydia Substrate
- Android emulator detection: Build fingerprint, QEMU props, telephony, sensor count, emulator files
- Android debugger detection:
Debug.isDebuggerConnected,FLAG_DEBUGGABLE,TracerPid, native ptrace anti-attach - Android app integrity: APK signing certificate SHA-256, installer package, package name, APK hash
- Android environment signals: screen capture, accessibility services, VPN, developer mode/ADB
- Android NDK C++ hardening layer: native ptrace anti-debug, syscall-level
/proc/self/mapsscan, inline-hook detection, JNIEnv integrity,.textsegment integrity, XOR-obfuscated strings - iOS jailbreak detection: classic + modern paths (Dopamine, palera1n, rootless), URL schemes, sandbox escape, writability tests
- iOS hooking detection: Frida gadget scan, Cycript, Substrate, libhooker,
DYLD_INSERT_LIBRARIES - iOS debugger detection:
sysctlP_TRACED,ptrace(PT_DENY_ATTACH) - iOS app integrity: provisioning profile, bundle ID, code-signing, install source
- iOS simulator detection:
TARGET_OS_SIMULATOR, env vars, hardware model - Dart public API:
performCheck(),startMonitoring(),stopMonitoring(),verifyBeforeSensitiveOp(),threatStream ThreatReport,Threat,ThreatCategory,Severity,SecurityConfig,AndroidConfig,IOSConfigdata models- MethodChannel (
flutter_security_shield/methods) + EventChannel (flutter_security_shield/threats) - Example app with Material 3 dashboard showing live threat status per category
- Dart unit tests with mocked MethodChannel