패키지, 저장소 및 앱 카테고리 검색

패키지 상세v4.0.0

security_plus

루트, 제일브레이크, 에뮬레이터, 개발 모드 및 외부 저장소 실행과 같은 여러 가지 보안 경고를 감지하는 새로운 Flutter 플러그인입니다.

AndroidiOS
30일 다운로드
3.6천
좋아요
26
Pub 점수
160

패키지 설치

flutter pub add security_plus

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

security_plus는 루트 접근, 잠금 해제 감지, 에뮬레이터 환경, 개발 모드, 외부 저장소 사용 등 여러 잠재적 위협을 탐지하여 앱 보안을 강화하도록 설계된 Flutter 플러그인입니다. 이는 변조되거나 디버깅된 기기에서 발생하는 일반적인 취약점으로부터 앱을 보호하는 데 도움을 줍니다. 패키지는 Android 및 iOS 플랫폼과 원활하게 통합되어 런타임 중 실시간 검사를 제공합니다. 위험한 상태를 조기에 식별함으로써 기능 제한 또는 세션 종료와 같은 사전 대응이 가능해집니다. 민감한 데이터를 처리하는 앱에 이상적이며, 복잡한 구현 없이도 전체 보안 수준을 강화합니다.

사용 사례

  • 불법 접근으로부터 금융 앱 보호
  • 게임 앱에서 에뮬레이터 감지
  • 생산 환경에서 디버그 모드 사용 방지
  • 건강 및 개인 데이터 앱 보호
  • 루트된 디바이스에서의 실행 차단
  • 안전한 환경 검사 강제 실행

주요 기능

  • 루트 및 재브레이크 감지
  • 에뮬레이터 및 시뮬레이터 감지
  • 개발 모드 감지
  • 외부 저장소 사용 모니터링
  • 크로스 플랫폼 지원 (Android 및 iOS)
  • 실시간 보안 알림

적합한 대상

  • 민감한 사용자 데이터를 처리하는 앱
  • 금융 및 은행 애플리케이션
  • 건강 및 개인정보 보호에 중점을 둔 앱
  • 안티 cheat 조치가 필요한 게임
  • 기업 모바일 솔루션

고려 사항

  • 특정 장치에서 잘못된 긍정 결과를 유발할 수 있습니다
  • 감지된 위협을 주의 깊게 처리해야 합니다
  • 기본 보안 검사에 제한됨
  • 포괄적인 보안 아키텍처의 대체가 아님
  • 고주파 체크에서의 성능 영향

원본 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

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.