パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v4.0.0

security_plus

ルート、ジャイルブレイク、エミュレータ、開発モード、および外部ストレージ実行などの複数のセキュリティアラートを検出する新しいFlutterプラグイン。

AndroidiOS
30日間ダウンロード
3630
いいね数
26
Pub ポイント
160

パッケージをインストール

flutter pub add security_plus

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

security_plus は、rootアクセス、ジャイルブレイク検出、エミュレータ環境、開発モード、外部ストレージの使用など、複数の潜在的な脅威を検出することにより、アプリのセキュリティを強化するためのFlutterプラグインです。このプラグインは、改ざんまたはデバッグされたデバイスに存在する一般的な脆弱性からアプリケーションを保護するのに役立ちます。AndroidおよびiOSプラットフォームとシームレスに統合され、実行時にリアルタイムチェックを提供します。リスクのある状態を早期に特定することで、機能制限やセッションの終了といったプロアクティブな対応が可能になります。機密データを取り扱うアプリに最適であり、複雑な実装なしに全体的なセキュリティ体制を強化します。

用途

  • 不正アクセスから金融アプリを保護する
  • ゲームアプリにおけるエミュレータの検出
  • 本番環境でのデバッグモードの使用を防ぐ
  • 健康および個人データアプリのセキュリティ確保
  • ルート済みデバイスでの実行をブロックする
  • セキュアな環境チェックの実施

主な機能

  • ルートおよびジャイルブレイク検出
  • エミュレータおよびシミュレータの検出
  • 開発モードの検出
  • 外部ストレージの使用状況の監視
  • クロスプラットフォーム対応(Android および iOS)
  • リアルタイムセキュリティアラート

適している対象

  • 機密ユーザー情報を扱うアプリ
  • 金融および銀行アプリケーション
  • ヘルスケアとプライバシーに焦点を当てたアプリ
  • アンチチート対策を必要とするゲーム
  • エンタープライズモバイルソリューション

注意事項

  • 特定のデバイスで誤検出を引き起こす可能性があります
  • 検出された脅威の取り扱いには注意が必要です
  • 基本的なセキュリティチェックに限定
  • 包括的なセキュリティアーキテクチャの代替にはなりません
  • 高頻度チェックにおけるパフォーマンスへの影響

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

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.

カテゴリー

依存関係

依存関係一覧 1 件

  • plugin_platform_interface^2.0.2

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。