Skip to content

This project implements a real-time behavioral and cognitive authentication system for mobile apps, focused on user verification through subtle patterns like typing cadence, swipe behavior, and hesitation flow. It can authenticate users accurately with as few as 7 samples.

Notifications You must be signed in to change notification settings

ESR-style/SurakshaMitra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ SurakshaMitra: Advanced Cognitive-Behavioral Continuous Authentication Framework for Mobile Devices

Expo Build React Native TypeScript License

Revolutionizing mobile security through multi-layered cognitive-behavioral biometric authentication with breakthrough low-dataset machine learning models

🌟 Overview

SurakshaMitra (Sanskrit: Guardian Friend) is a cutting-edge mobile security framework that implements continuous authentication through multiple sophisticated security layers. This innovative system combines physical device security, behavioral biometrics, and cognitive psychology to create an unprecedented level of mobile device protection.

🎯 Key Innovations

  • 🧠 Cognitive Layer Authentication: Leverages human psychology and reflexive responses
  • πŸ“± Behavioral Biometric Analysis: Advanced keystroke dynamics and touch pattern recognition
  • πŸ” Physical Security Detection: Comprehensive device integrity verification
  • πŸ€– Breakthrough ML Model: Siamese neural network inspired binary classification method achieving high accuracy with just 7 training samples
  • ⚑ Continuous Authentication: Real-time security monitoring without user friction

πŸ“± Quick Start

Installation Options

Option 1: Install Pre-built APK (Recommended)

Download and install the latest build:

https://expo.dev/accounts/esr-style/projects/my-expo-app/builds/93d417e8-89ca-4352-9353-e038bbf83432

Option 2: Local Development

# Clone the repository
git clone https://github.com/ESR-style/SurakshaMitra.git
cd SurakshaMitra/app/my-expo-app

# Install dependencies
npm install

# Start the development server
npx expo start

# Launch on Android
# Press 'a' for Android emulator or USB-connected device

Prerequisites

  • Node.js 18+
  • Expo CLI
  • Android Studio (for emulator) or physical Android device
  • Separate Backend Server (required for authentication models)

πŸ—οΈ Multi-Layered Security Architecture

SurakshaMitra implements a revolutionary three-tier security framework that continuously validates user authenticity through multiple behavioral and physical indicators.

πŸ”’ Layer 1: Physical Security Detection

The foundation layer performs comprehensive device integrity analysis:

Device Integrity Verification

  • Root Detection: Advanced multi-vector root detection using system property analysis
  • Emulator Detection: Sophisticated emulator identification through hardware fingerprinting
  • Developer Mode Monitoring: Real-time detection of USB debugging and development settings
  • Smart Sensor Analysis: Accelerometer, gyroscope, and magnetometer pattern validation

Hardware Fingerprinting

  • User-Agent Verification: Device model and manufacturer validation
  • Hardware Sensor Authenticity: Sensor noise pattern analysis to distinguish real devices
  • System Property Inspection: Deep analysis of Android build properties and system characteristics
// Physical layer detection metrics
interface SecurityMetrics {
  isEmulator: boolean;
  isRooted: boolean;
  isDeveloperMode: boolean;
  deviceFingerprint: string;
  sensorAuthenticity: number;
  hardwareValidation: boolean;
}

🧬 Layer 2: Behavioral Biometric Authentication

Advanced Keystroke Dynamics

Our proprietary keystroke analysis captures over 25+ behavioral metrics:

  • Temporal Patterns:

    • Dwell time (key press duration)
    • Flight time (inter-key intervals)
    • Typing rhythm and cadence
    • Pause patterns and hesitations
  • Touch Biometrics:

    • Pressure sensitivity analysis
    • Touch area and finger contact patterns
    • Coordinate precision and drift
    • Multi-touch gesture characteristics
  • Error Recovery Patterns:

    • Backspace usage frequency
    • Correction timing and methodology
    • Error pattern consistency
    • Recovery behavior analysis

Machine Learning Innovation

Our breakthrough Neural Network model achieves:

  • βœ… High Accuracy with minimal training data
  • βœ… Only 7 samples required for user authentication
  • βœ… Real-time inference capabilities
  • βœ… Adaptive learning for improved accuracy over time
// Behavioral metrics captured
interface BiometricData {
  flightTimes: number[];
  dwellTimes: number[];
  pressureVariance: number;
  touchAreaVariance: number;
  sessionEntropy: number;
  typingPatternVector: number[];
  errorRecoveryMetrics: object;
}

🧠 Layer 3: Cognitive Authentication

Psychological Response Analysis

Leveraging principles of cognitive psychology and human reflexive behavior:

  • Contextual Decision Making: Time-sensitive security questions that test natural human responses
  • Reflex Pattern Analysis: Measuring decision-making speed and consistency
  • Cognitive Load Assessment: Analyzing response patterns under different mental states
  • Habituation Detection: Identifying learned vs. natural response patterns

Continuous Cognitive Monitoring

  • Two-Factor Authentication Preferences: User choice patterns and consistency
  • WiFi Safety Decisions: Network selection behavior analysis
  • Navigation Method Preferences: UI interaction pattern recognition
  • First Action Tendencies: Initial response behavior in security scenarios
// Cognitive layer metrics
interface CognitiveMetrics {
  decisionLatency: number;
  choiceConsistency: number;
  reflexiveResponse: boolean;
  cognitiveLoad: number;
  behaviorPattern: string;
}

πŸ”¬ Technical Implementation

Backend Architecture

  • Separate Backend Required: The ML models and authentication logic run on an independent server
  • API Endpoints: RESTful APIs for real-time authentication
  • Model Training: Continuous learning pipeline for user adaptation
  • Data Security: Encrypted communication and secure data handling

Frontend Framework

  • React Native + Expo: Cross-platform mobile development
  • TypeScript: Type-safe development
  • Real-time Data Collection: High-frequency sensor and input monitoring
  • Secure Storage: Local data encryption and secure transmission

Machine Learning Pipeline

Data Collection β†’ Feature Extraction β†’ NN β†’ Binary Classification β†’ Continuous Learning

πŸ“Š Metrics & Analytics

Captured Biometric Features

Category Metrics Count
Keystroke Dynamics Dwell times, flight times, rhythm patterns 8+
Touch Biometrics Pressure, area, coordinates, gestures 7+
Behavioral Patterns Error recovery, typing speed, consistency 6+
Cognitive Responses Decision timing, choice patterns, reflexes 4+
Device Characteristics Hardware fingerprint, sensor data 5+

Performance Metrics

  • Authentication Accuracy: >85% with just 7 training samples
  • Response Time: <100ms for real-time decisions
  • Battery Impact: <1% additional drain

Research Collaboration

For academic partnerships and research collaboration opportunities, please reach out through my mail.



πŸ† Acknowledgments

  • Siamese Neural Network Research: Inspiration from breakthrough biometric authentication research
  • Behavioral Biometrics Community: Ongoing research in keystroke dynamics
  • Mobile Security Researchers: Contributions to device integrity detection methods
  • Cognitive Psychology: Integration of human behavioral patterns in security

πŸ›‘οΈ "Security through Understanding Human Behavior"

SurakshaMitra - Where Technology Meets Psychology for Ultimate Mobile Security

Made with ❀️ in India

About

This project implements a real-time behavioral and cognitive authentication system for mobile apps, focused on user verification through subtle patterns like typing cadence, swipe behavior, and hesitation flow. It can authenticate users accurately with as few as 7 samples.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published