Pakete, Repositories und App-Kategorien suchen

Paketdetailsv4.0.0

security_plus

Ein neuer Flutter-Plugin zur Erkennung mehrerer Sicherheitswarnungen wie Root, Jailbreak, Emulator, Entwicklungsmodus und externe Speicherlaufzeit.

AndroidiOS
30-Tage-Downloads
3630
Likes
26
Pub-Punkte
160

Paket installieren

flutter pub add security_plus

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

security_plus ist ein Flutter-Plugin, das entwickelt wurde, um die App-Sicherheit durch die Erkennung mehrerer potenzieller Bedrohungen zu verbessern, darunter Root-Zugriff, Jailbreak-Erkennung, Emulator-Umgebungen, Entwicklungsmodus und Nutzung externer Speicher. Es hilft Entwicklern dabei, ihre Anwendungen vor gängigen Schwachstellen zu schützen, die auf kompromittierten oder debuggenden Geräten auftreten können. Das Paket integriert sich nahtlos in Android- und iOS-Plattformen und bietet Echtzeit-Prüfungen während der Laufzeit. Durch die frühzeitige Erkennung riskanter Zustände ermöglicht es proaktive Maßnahmen wie Funktionsbeschränkungen oder Sitzungsbeendigungen. Ideal für Apps, die sensible Daten verarbeiten, stärkt es die Gesamtsicherheitslage ohne komplizierte Implementierung.

Anwendungsfälle

  • Schutz von Finanzanwendungen vor unbefugtem Zugriff
  • Erkennung von Emulatoren in Gaming-Apps
  • Verhinderung der Verwendung des Debug-Modus in der Produktion
  • Sicherung von Gesundheits- und persönlichen Daten-Apps
  • Ausführung auf gerooteten Geräten blockieren
  • Durchsetzung sicherer Umgebungsprüfungen

Hauptmerkmale

  • Root- und Jailbreak-Erkennung
  • Emulator- und Simulatordetektion
  • Entwicklungsmodus-Erkennung
  • Überwachung der Nutzung externer Speicher
  • Plattformübergreifende Unterstützung (Android & iOS)
  • Echtzeit-Sicherheitswarnungen

Geeignet für

  • Apps, die sensible Nutzerdaten verarbeiten
  • Finanz- und Bankanwendungen
  • Gesundheits- und Datenschutz-fokussierte Apps
  • Spiele, die Anti-Cheat-Maßnahmen erfordern
  • Unternehmensmobilsolutionen

Hinweise

  • Kann bei bestimmten Geräten Falschpositiva auslösen
  • Erfordert sorgfältige Behandlung erkannter Bedrohungen
  • Beschränkt auf grundlegende Sicherheitsprüfungen
  • Kein Ersatz für eine umfassende Sicherheitsarchitektur
  • Leistungseinfluss bei hochfrequenten Überprüfungen

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

Security Plus

A comprehensive Flutter security plugin that provides advanced security features for your Flutter applications, including root detection, emulator detection, and various security checks.

pub package License: MIT

Features

  • 🛡️ Advanced Root Detection

    • Multiple detection layers
    • Frida anti-tampering protection
    • Magisk detection
    • SuperSU detection
    • Common root app detection
  • 📱 Emulator Detection

    • Comprehensive emulator environment checks
    • Build properties analysis
    • Hardware characteristics verification
  • 🔒 Security Checks

    • Development mode detection
    • Mock location detection
    • External storage checks
    • Runtime integrity verification
    • System tampering detection

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  security_plus: ^3.0.1

Platform Setup

Android

1.Add the following permissions to your AndroidManifest.xml file:

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
</manifest>

2.Add permission_handler for runtime permission management:

dependencies:
  permission_handler: ^10.4.3
iOS

Add the following to your Info.plist file:

<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to location when open to verify device security.</string>

Usage

Import the package
import 'package:security_plus/security_plus.dart';
import 'package:permission_handler/permission_handler.dart';
Handle Permissions and Security Checks
Future<void> checkDeviceSecurity() async {
  // Request location permission first
  if (Platform.isAndroid) {
    final status = await Permission.location.request();
    if (!status.isGranted) {
      // Handle permission denied
      return;
    }
  }

  // Perform security checks
  try {
    final isRooted = await SecurityPlus.isRooted;
    final isEmulator = await SecurityPlus.isEmulator;
    final isDevelopmentMode = await SecurityPlus.isDevelopmentModeEnable;
    final isMockLocation = await SecurityPlus.isMockLocationEnabled;
    final isExternalStorage = await SecurityPlus.isOnExternalStorage;

    // Handle security check results
    if (isRooted || isEmulator || isMockLocation) {
      // Handle security risks
    }
  } catch (e) {
    // Handle errors
  }
}
Individual Security Checks
Root Detection
try {
  bool isRooted = await SecurityPlus.isRooted;
  if (isRooted) {
    // Handle rooted device
  }
} catch (e) {
  // Handle errors
}
Emulator Detection
try {
  bool isEmulator = await SecurityPlus.isEmulator;
  if (isEmulator) {
    // Handle emulator detection
  }
} catch (e) {
  // Handle errors
}
Development Mode Check
try {
  bool isDevelopmentMode = await SecurityPlus.isDevelopmentModeEnable;
  if (isDevelopmentMode) {
    // Handle development mode
  }
} catch (e) {
  // Handle errors
}
Mock Location Check
try {
  bool isMockLocation = await SecurityPlus.isMockLocationEnabled;
  if (isMockLocation) {
    // Handle mock location
  }
} catch (e) {
  // Handle errors
}
External Storage Check
try {
  bool isOnExternalStorage = await SecurityPlus.isOnExternalStorage;
  if (isOnExternalStorage) {
    // Handle external storage detection
  }
} catch (e) {
  // Handle errors
}

Security Features

Root Detection Mechanisms

The plugin employs multiple layers of root detection:

  1. RootBeer Integration: Uses the advanced RootBeer library for base root detection
  2. Frida Detection: Actively searches for Frida-related processes and libraries
  3. File System Checks: Scans for common root-related files and directories
  4. Package Analysis: Detects known root management applications
  5. Runtime Integrity: Checks for system modifications and hooks
Anti-Tampering Protection
  • Process monitoring for known tampering tools
  • Library injection detection
  • System property verification
  • Runtime integrity checks

Example

Check out the example directory for a complete sample application demonstrating all features.

Platform Support

Android iOS
✅ 🚧

Contributing

Contributions are welcome! If you find a bug or want a feature, please open an issue.

License

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

Author

Created and maintained by Abdelrahman Bonna.

Acknowledgments

  • RootBeer - For root detection capabilities
  • The Flutter team and community for their amazing work

Disclaimer

This plugin provides security features but should not be considered as the sole security measure for your application. Always implement multiple layers of security and keep your security measures up to date.

Kategorien

Abhängigkeiten

Abhängigkeiten 1 Einträge

  • plugin_platform_interface^2.0.2

Quell-Repository

Projekte, die dieses Paket verwenden

Noch keine Daten verfügbar.