Skip to content

nabz0r/SS7-Guardian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ SS7 Guardian

Android API License Kotlin Version

Open-source Android app for detecting SS7/cellular network attacks through indirect monitoring.

⚠️ Note: This is a detection tool, NOT a protection tool. It cannot block SS7 attacks or prevent IMSI capture.

🎯 The Problem

SS7 (Signaling System 7) vulnerabilities allow attackers to:

  • πŸ“ Track your location via silent SMS pings
  • πŸ“ž Intercept calls and SMS through network manipulation
  • πŸ“Ά Force 2G downgrades to exploit weaker encryption
  • πŸ†” Clone your identity via IMSI harvesting

SS7 Guardian uses publicly available Android APIs to detect anomalies suggesting an attack.

πŸ“Έ Screenshots

Dashboard Alert Settings
Coming Soon Coming Soon Coming Soon

πŸ” Detection Capabilities

Threat Detection Method Root Required
IMSI Catcher Cell tower anomaly analysis ❌ No
2G Downgrade Attack Network type monitoring ❌ No
Silent SMS (Class 0) Broadcast receiver ❌ No
Location Tracking Cell change frequency ❌ No
Stingray Detection Signal strength analysis ❌ No

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      SS7 Guardian                            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  Cell Monitor  β”‚  β”‚Network Monitor β”‚  β”‚  SMS Monitor   β”‚ β”‚
β”‚  β”‚ β€’ Cell ID/LAC  β”‚  β”‚ β€’ Network Type β”‚  β”‚ β€’ Class 0 SMS  β”‚ β”‚
β”‚  β”‚ β€’ Signal RSSI  β”‚  β”‚ β€’ 2G Detection β”‚  β”‚ β€’ WAP Push     β”‚ β”‚
β”‚  β”‚ β€’ MCC/MNC      β”‚  β”‚ β€’ Downgrade    β”‚  β”‚ β€’ Binary SMS   β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚
β”‚                              β–Ό                               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚             Anomaly Detection Engine                   β”‚  β”‚
β”‚  β”‚  β€’ Baseline Learning    β€’ Pattern Matching            β”‚  β”‚
β”‚  β”‚  β€’ Threat Scoring       β€’ Historical Analysis         β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                              β–Ό                               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ Alert System   β”‚  β”‚ Local Database β”‚  β”‚ Trust Scoring  β”‚ β”‚
β”‚  β”‚ β€’ Notificationsβ”‚  β”‚ β€’ Cell History β”‚  β”‚ β€’ Tower Trust  β”‚ β”‚
β”‚  β”‚ β€’ Threat Level β”‚  β”‚ β€’ Events Log   β”‚  β”‚ β€’ Risk Assess  β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

For detailed architecture documentation, see docs/ARCHITECTURE.md.

πŸš€ Quick Start

Prerequisites

  • Android Studio Hedgehog (2023.1.1) or newer
  • JDK 11 or newer
  • Android SDK 34
  • An Android device or emulator (API 26+)

Build & Install

# Clone the repository
git clone https://github.com/nabz0r/SS7-Guardian.git
cd SS7-Guardian

# Build debug APK
./gradlew assembleDebug

# Install on connected device
adb install app/build/outputs/apk/debug/app-debug.apk

Or simply open the project in Android Studio and click Run.

πŸ“ Project Structure

SS7-Guardian/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ src/main/
β”‚   β”‚   β”œβ”€β”€ java/com/ss7guardian/
β”‚   β”‚   β”‚   β”œβ”€β”€ data/                    # Data layer
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ dao/                 # Room DAOs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ entity/              # Database entities
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ repository/          # Repository pattern
β”‚   β”‚   β”‚   β”‚   └── AppDatabase.kt       # Room database
β”‚   β”‚   β”‚   β”œβ”€β”€ monitor/                 # Detection monitors
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ CellMonitor.kt       # Cell tower monitoring
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ NetworkMonitor.kt    # Network type monitoring
β”‚   β”‚   β”‚   β”‚   └── SmsMonitor.kt        # SMS monitoring
β”‚   β”‚   β”‚   β”œβ”€β”€ receiver/                # Broadcast receivers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ BootReceiver.kt      # Auto-start on boot
β”‚   β”‚   β”‚   β”‚   └── SmsReceiver.kt       # SMS interception
β”‚   β”‚   β”‚   β”œβ”€β”€ service/                 # Background services
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AlertManager.kt      # Notification handling
β”‚   β”‚   β”‚   β”‚   └── GuardianService.kt   # Main monitoring service
β”‚   β”‚   β”‚   β”œβ”€β”€ ui/                      # User interface
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ adapter/             # RecyclerView adapters
β”‚   β”‚   β”‚   β”‚   └── MainActivity.kt      # Main screen
β”‚   β”‚   β”‚   β”œβ”€β”€ util/                    # Utility classes
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DateUtils.kt         # Date formatting
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ NetworkUtils.kt      # Network type utils
β”‚   β”‚   β”‚   β”‚   └── PermissionUtils.kt   # Permission helpers
β”‚   β”‚   β”‚   └── SS7GuardianApp.kt        # Application class
β”‚   β”‚   └── res/                         # Resources
β”‚   β”‚       β”œβ”€β”€ layout/                  # XML layouts
β”‚   β”‚       β”œβ”€β”€ drawable/                # Icons and shapes
β”‚   β”‚       └── values/                  # Colors, strings, themes
β”‚   └── build.gradle.kts                 # App build config
β”œβ”€β”€ docs/                                # Documentation
β”‚   β”œβ”€β”€ ARCHITECTURE.md                  # Technical architecture
β”‚   └── SECURITY.md                      # Security policy
β”œβ”€β”€ gradle/                              # Gradle wrapper
β”œβ”€β”€ build.gradle.kts                     # Root build config
β”œβ”€β”€ settings.gradle.kts                  # Project settings
β”œβ”€β”€ CONTRIBUTING.md                      # Contribution guide
β”œβ”€β”€ LICENSE                              # MIT License
└── README.md                            # This file

πŸ“± Features

Cell Tower Monitoring

  • πŸ“‘ Continuous monitoring of connected cell towers
  • πŸ“Š Historical database of known trusted towers
  • πŸ” Detection of new/unknown towers
  • πŸ“ˆ Signal strength anomaly detection
  • 🎯 Trust score algorithm for towers

Network Security

  • πŸ“Ά Real-time network type monitoring (5G/4G/3G/2G)
  • ⚠️ Alerts on forced 2G downgrades
  • πŸ”’ Option to auto-disable 2G (Android 12+)

SMS Protection

  • πŸ’¬ Detection of Class 0 (Flash) SMS
  • πŸ“² WAP Push notification monitoring
  • πŸ”’ Binary SMS detection

πŸ”¬ How Detection Works

IMSI Catcher Detection

IMSI catchers (Stingrays) typically exhibit:

  1. Unusually strong signal - Overpowering legitimate towers
  2. New Cell ID - Not in historical database
  3. Rapid handoffs - Forcing reconnection
  4. Missing neighbors - Real towers broadcast neighbor lists

2G Downgrade Detection

Normal: LTE (4G) ────────────────────────► LTE (4G)
Attack: LTE (4G) ──► [Jamming] ──► GSM (2G) ⚠️ ALERT

2G uses A5/1 encryption which can be cracked in real-time, enabling call/SMS interception.

Trust Score Algorithm

Trust Score = Base(0.5) + Observation Bonus + Age Bonus
// More observations + older tower = higher trust

πŸ“Š Threat Levels

Level Color Meaning Action
0 🟒 Green Safe - No anomalies None needed
1 🟑 Yellow Low - Minor anomaly Monitor
2 🟠 Orange Medium - Multiple indicators Investigate
3 πŸ”΄ Red High - Strong attack indicators Take precautions
4 ⚫ Black Critical - Active attack likely Avoid sensitive comms

πŸ” Privacy

  • 🏠 No data leaves your device by default
  • πŸ”’ All processing happens locally
  • πŸ“‚ SQLite database stored in private app storage
  • 🚫 No analytics or tracking
  • πŸ‘οΈ Open source - verify our claims

🀝 Contributing

Contributions are welcome! Please read our Contributing Guide before submitting PRs.

Areas we need help:

  • πŸ§ͺ Testing on different devices
  • 🌍 Translations
  • πŸ“± UI/UX improvements
  • πŸ”¬ Detection algorithm refinement

⚠️ Disclaimer

SS7 Guardian provides detection, not protection. It cannot:

  • Block SS7 attacks
  • Prevent IMSI capture
  • Encrypt your communications
  • Guarantee detection of all attacks

Always use additional security measures for sensitive communications.

πŸ“š Resources

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❀️ for privacy advocates
Report Bug β€’ Request Feature

About

SS7 Guardian v0.1.0 - Complete Android security detection framework Features: - Cell tower monitoring and anomaly detection - 2G downgrade attack detection - Silent SMS (Class 0) detection - Signal strength analysis - Local threat database with Room - Real-time notifications

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages