
Zero-Trust Cellular Defense Sub-Service for Android (IMSI-Catcher, 2G SMS Blaster, and 4G aLTEr Detection & Safe Routing)
RadioGuard is an open-source, production-ready, and Google Play Store-compliant Android security application and background sub-service. It actively detects rogue cell towers (IMSI-catchers / Cell-Site Simulators / SMS Blasters), identifies hostile 2G/4G cellular manipulation, and deploys cryptographic safe-routing quarantine to protect mobile devices on untrusted cellular links.
Cellular networks (2G, 3G, and 4G LTE) suffer from foundational protocol weaknesses:
The RadioGuard Philosophy: Treat the cellular link like an untrusted public network (Zero-Trust Radio). Instead of hoping the tower is legitimate, the phone autonomously monitors cellular telemetry and encapsulates traffic inside authenticated cryptographic tunnels.
┌─────────────────────────────────────────────────────────────────────────────┐
│ RadioGuard Architecture Topology │
├─────────────────────────────────────────────────────────────────────────────┤
│ [ UI Layer (Jetpack Compose) ] │
│ • DashboardScreen: Real-time threat gauge, active telemetry, controls │
│ • Device Integrity Banner: Displays kernel/root compromise warnings │
│ • Forensic Incident Exporter: Generates JSON evidence dumps │
├─────────────────────────────────────────────────────────────────────────────┤
│ [ Core Service Layer ] │
│ • RadioGuardService: Foreground sentry monitoring TelephonyCallback │
│ • Telemetry Liveness Watchdog: Polls modem every 5s to defeat RIL freeze │
│ • Emergency 911/112 Fail-Safe: Auto-suspends killswitch during calls │
│ • SafeTunnelVpnService: Native VPN killswitch (TunnelCrack hardened) │
│ • ShizukuRadioBridge: Privileged non-root band locker & airplane pulse │
├─────────────────────────────────────────────────────────────────────────────┤
│ [ Analytical Engine ] │
│ • AnomalyEngine: Normalized Bayesian multi-factor anomaly scoring │
│ • Macro-Cell Shadow Clone Detector: Step-gradient Delta-RSRP tracking │
│ • Hysteresis Buffer: 2-sample window filters Carrier Aggregation flits │
│ • SmsFilterHelper: PDU inspector catching Type-0 Silent SMS pings │
├─────────────────────────────────────────────────────────────────────────────┤
│ [ Storage & Integrity Layer ] │
│ • TowerDatabase (Room SQLite): Local OpenCelliD / BeaconDB baseline │
│ • Circular Storage Pruning: Caps incident log to 1,000 to prevent DoS │
│ • AppIntegrityValidator: Runtime SHA-256 APK signing cert verification │
│ • RuntimeAntiHijackGuard: Anti-ptrace & /proc/self/maps hook scanner │
│ • DeviceIntegritySentry: Hardware TEE, SELinux, and rootkit auditor │
└─────────────────────────────────────────────────────────────────────────────┘
VpnService with setBlocking(true) as an OS-enforced killswitch./1 Route Splitting: Defeats TunnelCrack (CVE-2023-36672 / CVE-2023-35838) by splitting routes into 0.0.0.0/1 and 128.0.0.0/1, overriding any malicious local subnet routing redirects.9.9.9.9, 1.1.1.1) with SPKI certificate pinning to prevent pre-tunnel aLTEr DNS hijacking.TelephonyCallback.CallStateListener.ByteBuffer.allocate(32768)) and PDU byte arrays are strictly bounds-checked. Overflows throw managed IndexOutOfBoundsException rather than corrupting memory.pruneOldIncidents) that keeps the latest 1,000 records, preventing malicious towers from filling the device's flash memory.RadioGuard has been hardened against published bypass techniques:
To ensure RadioGuard cannot be compromised by malicious apps or local malware:
AppIntegrityValidator.kt):
Process.killProcess()).RuntimeAntiHijackGuard.kt):
/proc/self/status every 3 seconds. Detects ptrace attachments, gdb, and Frida agents./proc/self/maps for dynamic library injections (frida-agent.so, xposed.so, zygisk, sandhook).The UI is built with Jetpack Compose (Material 3) featuring a dark cyber-defense theme:
The project includes an executable verification test suite (test_suite.py) that validates all algorithms, state transitions, and math bounds:
python test_suite.py
test_01_normal_macro_cell_passes ......................... [OK]
test_02_involuntary_2g_downgrade ......................... [OK]
test_03_macro_cell_shadow_clone_jump ..................... [OK]
test_04_hysteresis_filtering ............................. [OK]
test_05_spatial_drift_detection .......................... [OK]
test_06_tunnelcrack_dual_route_coverage .................. [OK]
test_07_storage_bounds_circular_pruning .................. [OK]
test_08_emergency_call_fail_safe_transitions ............. [OK]
Ran 8 tests in 0.001s - OK (100% Passing)
Additionally, unit tests for Android Studio / Gradle builds are located at:
When submitting RadioGuard to the Google Play Developer Console, declare permissions as follows:
# Clone or open workspace
cd C:\Users\pushk\.gemini\antigravity\scratch\radioguard
# Build debug APK
./gradlew assembleDebug
# Build release APK (configured with ProGuard & R8)
./gradlew assembleRelease
su binaries, Magisk, SELinux in Permissive mode, test-keys, or missing hardware KeyStore/TEE).| Attack Vector | Source Paper / CVE | Hardened Countermeasure |
|---|
| Macro-Cell Shadow Clone | USENIX Security (FBS-Radar) | Step-Gradient Tracking: Flags sudden $\Delta\text{RSRP} > 25\text{ dB}$ surges on identical Cell IDs within $< 4\text{ seconds}$. |
| TunnelCrack VPN Bypass | USENIX Security (CVE-2023-36672) | Dual /1 Route Splitting: 0.0.0.0/1 and 128.0.0.0/1 override any rogue local subnet redirects. |
| aLTEr DNS Bootstrap Hijack | IEEE S&P (CVE-2018-18544) | IP Literals & SPKI Pinning: Direct connection to hardcoded resolver IPs (9.9.9.9) eliminates cleartext bootstrap DNS. |
| Baseband RIL Freeze | Black Hat / ACM CCS | Telemetry Liveness Watchdog: Actively polls modem telemetry every 5 seconds if callbacks stall for $> 12\text{ seconds}$. |
| Carrier Aggregation Flapping | Real-World LTE Deployment | Hysteresis Buffer: Requires 2 consecutive anomaly cycles over 10 seconds before declaring critical quarantine. |
/system/bin/cmd paths and strips LD_PRELOAD from subprocess execution environments.| Permission | Play Store Policy Justification |
|---|
ACCESS_FINE_LOCATION | Required by Android OS to query CellIdentity (Cell ID, TAC, PCI). Explicitly state in the app's privacy policy that coordinates are evaluated locally on-device against an offline SQLite database and are never transmitted to any remote server. |
FOREGROUND_SERVICE & FOREGROUND_SERVICE_CONNECTED_DEVICE | Required for continuous real-time background monitoring of baseband state changes and rogue tower luring. |
BIND_VPN_SERVICE | Required to provide the local loopback quarantine tunnel and native OS kill-switch to isolate untrusted cellular links. |