Skip to content

RootShield : The Ultimate Shield for Rooted Android Devices - Protect your rooted Android device from unauthorized file operations and process executions! πŸ›‘οΈ RootShield is a powerful kernel module that ensures your device remains secure by monitoring and preventing risky activities. RootShield is your device’s ultimate defense mechanism. πŸ› οΈπŸ”₯

License

Notifications You must be signed in to change notification settings

ImKKingshuk/RootShield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RootShield

v3.0.0 - The Ultimate Kernel Security Module

RootShield : The Ultimate Shield for Rooted Android Devices & Linux Systems - Advanced kernel-level security with comprehensive monitoring, behavioral analysis, and enterprise-grade protection! πŸ›‘οΈ RootShield v3.0 is a revolutionary security module that transforms your device into an impenetrable fortress. Built with cutting-edge technology, it provides multi-layered protection against sophisticated attacks. πŸ› οΈπŸ”₯πŸ€–

Features Status Legend

Tag Meaning
βœ… Fully Working - Feature is complete and operational
πŸ”§ Functional - Core functionality works, with some limitations
🚧 Coming Soon - Placeholder/under development

Core Security Monitors βœ…

πŸ›‘οΈ Execution Protection βœ…

  • Binary Execution Monitoring βœ…: Intercepts do_execveat_common via kprobe
  • Suspicious Command Detection βœ…: Blocks su, busybox, tcpdump, strace, frida
  • Process Termination βœ…: Kills violating processes on detection
  • Event Notification βœ…: Sends alerts to userspace via Netlink

πŸ“ File System Protection βœ…

  • Write Monitoring βœ…: kprobe on vfs_write for protected paths
  • Open Monitoring βœ…: kprobe on vfs_open for sensitive files
  • Protected Paths βœ…: /dev/block, /system/bin, /proc/kallsyms, /proc/kcore
  • Access Control βœ…: Blocks unauthorized root process access

πŸ—‘οΈ Process Protection βœ…

  • File Deletion Monitoring βœ…: Protects critical system paths via do_unlinkat
  • Fork Monitoring βœ…: Detects suspicious process creation patterns
  • Ptrace Protection βœ…: Prevents memory injection attempts
  • Anti-Tampering βœ…: Blocks code injection via ptrace

🌐 Network Monitoring βœ…

  • Outgoing Traffic Analysis βœ…: Netfilter hook on NF_INET_LOCAL_OUT
  • Suspicious Port Blocking βœ…: Blocks 1337, 4444, 5555, 31337, 12345
  • TCP/UDP Inspection βœ…: Analyzes both protocols
  • Root Process Filtering βœ…: Monitors only elevated processes

πŸ” System Call Protection βœ…

  • Sensitive Syscall Monitoring βœ…: ptrace, capset, mount, init_module
  • kprobe Intercepts βœ…: Multiple syscall hooks
  • Suspicious Process Detection βœ…: Identifies malicious syscall patterns
  • Real-Time Blocking βœ…: Terminates violating processes

πŸ’Ύ Memory Protection βœ…

  • Large Allocation Detection βœ…: Flags allocations over 10MB
  • Executable Memory Monitoring βœ…: Detects set_memory_x calls
  • Buffer Overflow Detection βœ…: Identifies suspicious memory patterns
  • Code Injection Prevention βœ…: Blocks attempts to make memory executable

πŸ“¦ Module Loading Protection βœ…

  • Module Loading Intercept βœ…: kprobe on load_module
  • Suspicious Name Detection βœ…: Blocks "hide", "root", "hack", "inject"
  • Real-Time Alerts βœ…: Immediate notification on detection

Advanced Security Features βœ…

🧠 AI Behavioral Analysis βœ…

  • Statistical Modeling βœ…: Mean, variance, standard deviation tracking
  • Z-Score Anomaly Detection βœ…: Configurable threshold (default: 3.0)
  • Sliding Window Analysis βœ…: Time-based behavior profiling
  • Per-Process Profiling βœ…: Individual process behavior tracking
  • Global Baseline βœ…: System-wide anomaly detection
  • Feature Extraction βœ…: Syscall frequency, process spawn rate, file access, network connections

πŸ” Anti-Rootkit Engine βœ…

  • Hidden Module Detection βœ…: Cross-references module list
  • Syscall Hook Detection βœ…: Identifies syscall table modifications
  • Hidden Process Detection βœ…: Task list vs /proc comparison
  • Memory Integrity Checking βœ…: Verifies critical memory regions
  • IDT Integrity Verification βœ…: Detects interrupt table manipulation
  • Periodic Scanning βœ…: Automated background checks

πŸ›‘οΈ Self-Protection βœ…

  • Module Locking βœ…: Prevents forced unloading (try_module_get)
  • SHA-256 Integrity Hashing βœ…: Code section verification
  • Integrity Monitoring βœ…: Continuous integrity checks
  • Tamper Detection βœ…: Identifies modification attempts
  • Protection Levels βœ…: BASIC, STANDARD, HIGH, MAXIMUM
  • Emergency Mode βœ…: Lockdown on severe threats

Infrastructure & Architecture βœ…

πŸ“‘ Event System βœ…

  • Publish-Subscribe Pattern βœ…: Inter-component event communication
  • Circular Buffer Queue βœ…: High-performance event storage (256 events)
  • Async Dispatch βœ…: Workqueue-based processing
  • Event Filtering βœ…: Type, severity, source-based filtering
  • Statistics Tracking βœ…: Total/processed/dropped event metrics

πŸ“‹ Rule Engine βœ…

  • Red-Black Tree Storage βœ…: Fast rule lookup and management
  • Priority-Based Evaluation βœ…: Higher priority rules evaluated first
  • Condition System βœ…: Process name, file path, UID, network, syscall conditions
  • Operators βœ…: Equals, contains, starts_with, ends_with, greater_than, less_than
  • Dynamic Rule Loading βœ…: Runtime rule addition/removal
  • Rule Statistics βœ…: Hit counts, evaluation times

πŸ”Œ Plugin System βœ…

  • Dynamic Registration βœ…: Load/unload plugins at runtime
  • Lifecycle Management βœ…: Init, start, stop, exit states
  • Dependency Resolution βœ…: Automatic dependency checking
  • Event Broadcasting βœ…: Plugin-to-plugin communication
  • Configuration API βœ…: Key-value plugin configuration
  • Health Monitoring βœ…: Plugin health checks and statistics

Management & Monitoring βœ…

🌐 REST API βœ…

  • GET /api/v1/status βœ…: System status and version
  • GET /api/v1/events βœ…: Security events retrieval
  • GET/POST /api/v1/rules βœ…: Rule management
  • GET /api/v1/plugins βœ…: Plugin status
  • GET /api/v1/statistics βœ…: Security statistics
  • SQLite Backend βœ…: Persistent storage
  • JSON Responses βœ…: REST-compliant API

πŸ“Š Real-Time Client βœ…

  • Netlink Communication βœ…: Kernel to userspace notifications
  • Colored Output βœ…: Red (violations), yellow (blocked), blue (stats)
  • Live Event Feed βœ…: Real-time security event display
  • Process Information βœ…: PID, process name, path details

πŸ–₯️ CLI Tool βœ…

  • Status Command βœ…: System status overview
  • Events Command βœ…: Recent events with limit support
  • Rules Command βœ…: List and create security rules
  • Plugins Command βœ…: Active plugin listing
  • Stats Command βœ…: Security statistics display
  • HTTP Client βœ…: libcurl-based API communication
  • JSON Parsing βœ…: json-c based response parsing

πŸ“ˆ Statistics & Reporting βœ…

  • Per-Monitor Counters βœ…: Violations and blocks per monitor
  • Atomic Operations βœ…: Thread-safe statistics
  • Real-Time Updates βœ…: Live statistics tracking
  • Reset Capability βœ…: Statistics reset functionality

Planned Features 🚧

πŸ” Hardware-Assisted Security 🚧

  • TPM Integration 🚧: Trusted Platform Module support
  • Secure Boot Verification 🚧: Boot integrity checking
  • Hardware Key Storage 🚧: Cryptographic key protection

🌐 Enterprise Features 🚧

  • Multi-Tenant Support 🚧: Role-based access control
  • Compliance Reporting 🚧: Automated compliance checks
  • Multi-Device Management 🚧: Centralized orchestration
  • Web Dashboard 🚧: Modern web interface

Requirements

  • Linux Kernel (4.15+ with Kprobes and Netfilter support)
  • Rooted Android Device (or Linux system with root access)
  • GNU Make and build tools
  • Kernel Headers for target kernel version
  • SQLite3 for database backend (API server)
  • libmicrohttpd and json-c for API server
  • GCC with C11 support

Quick Start

1. Build Everything

git clone https://github.com/ImKKingshuk/RootShield.git
cd RootShield
make deps-check  # Check dependencies
make all         # Build kernel module and API server

2. Install and Load

sudo make install    # Install all components
# Or manually:
sudo insmod rootshield.ko

3. Start Userspace Components

# Start the notification client to receive alerts
./client/rootshield_client

# Start the API server (requires libmicrohttpd, json-c, sqlite3)
./api/rootshield_api

4. Access API

The API server listens on http://localhost:8080. Available endpoints:

  • GET /api/v1/status - System status
  • GET /api/v1/events - Security events
  • GET/POST /api/v1/rules - Security rules management
  • GET /api/v1/plugins - Plugin status
  • GET /api/v1/statistics - Security statistics

5. Basic Usage

# Load with default configuration
sudo insmod rootshield.ko

# Load with custom configuration
sudo insmod rootshield.ko exec_monitor_enabled=1 file_monitor_enabled=1 verbose_logging=1

# Monitor system logs
dmesg | grep RootShield

# View module parameters
cat /sys/module/rootshield/parameters/*

Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    RootShield v3.0                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚              API Server (Port 8080)                 β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚    β”‚
β”‚  β”‚  β”‚        REST API (libmicrohttpd)             β”‚   β”‚    β”‚
β”‚  β”‚  β”‚     SQLite Database | JSON Responses        β”‚   β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚            User Space Components                    β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚    β”‚
β”‚  β”‚  β”‚   Notification  β”‚ β”‚     Web Dashboard       β”‚   β”‚    β”‚
β”‚  β”‚  β”‚   Client        β”‚ β”‚     (Coming Soon)       β”‚   β”‚    β”‚
β”‚  β”‚  β”‚   (Netlink)     β”‚ β”‚                         β”‚   β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚             Kernel Space Module                     β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚    β”‚
β”‚  β”‚  β”‚  Core   β”‚ β”‚Notific- β”‚ β”‚ Runtime β”‚ β”‚ Stats   β”‚   β”‚    β”‚
β”‚  β”‚  β”‚ Engine  β”‚ β”‚  ation  β”‚ β”‚ Config  β”‚ β”‚ Tracker β”‚   β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚    β”‚
β”‚  β”‚                                                     β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚    β”‚
β”‚  β”‚  β”‚             Security Monitors               β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”   β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β”‚Exec β”‚ β”‚File β”‚ β”‚Proc β”‚ β”‚Net  β”‚ β”‚Sys- β”‚   β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β”‚Mon  β”‚ β”‚Mon  β”‚ β”‚Mon  β”‚ β”‚Mon  β”‚ β”‚call β”‚   β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β””β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”˜   β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”                           β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β”‚Mem  β”‚ β”‚Mod  β”‚                           β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β”‚Mon  β”‚ β”‚Mon  β”‚                           β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β””β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”˜                           β”‚   β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚    β”‚
β”‚  β”‚                                                     β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚    β”‚
β”‚  β”‚  β”‚            Advanced Plugins                 β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β”‚  Anti-Rootkit β”‚ β”‚ Behavioral        β”‚   β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β”‚  (Partial)    β”‚ β”‚ Analyzer          β”‚   β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚   β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                     Hardware/Kernel                         β”‚
β”‚    Kprobes | Netfilter | Netlink | proc/sys interfaces      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

API Documentation

REST Endpoints

Endpoint Method Description Status
/api/v1/status GET System status βœ… Implemented
/api/v1/events GET Security events βœ… Implemented
/api/v1/rules GET List security rules βœ… Implemented
/api/v1/rules POST Create new rule βœ… Implemented
/api/v1/plugins GET Plugin status βœ… Implemented
/api/v1/statistics GET Security statistics βœ… Implemented

CLI Tool (Coming Soon)

rootshield_cli status                    # System status
rootshield_cli events [limit]           # View recent events
rootshield_cli rules list               # List active rules
rootshield_cli rules add <json>         # Add new rule
rootshield_cli plugins                  # List loaded plugins
rootshield_cli config get <key>         # Get configuration
rootshield_cli config set <key> <value> # Set configuration

Configuration Options

Kernel Module Parameters

Option Type Default Description
exec_monitor_enabled bool true Enable/disable execution monitoring
file_monitor_enabled bool true Enable/disable file system monitoring
process_monitor_enabled bool true Enable/disable process monitoring
network_monitor_enabled bool true Enable/disable network monitoring
syscall_monitor_enabled bool true Enable/disable syscall monitoring
memory_monitor_enabled bool true Enable/disable memory monitoring
module_monitor_enabled bool true Enable/disable kernel module monitoring
kill_violating_process bool true Kill processes that violate security policies
notify_only bool false Only log violations without taking action
block_only bool false Block operations without killing the process
verbose_logging bool false Enable verbose logging for debugging

Runtime Configuration Notes

  • Parameters can be set at module load time: insmod rootshield.ko verbose_logging=1
  • Parameters are exposed via sysfs: /sys/module/rootshield/parameters/
  • Security policy validation ensures no conflicting options

Security Best Practices

Deployment

  • Start with notify_only=1 for testing and tuning
  • Enable verbose logging initially for monitoring false positives
  • Monitor system logs and adjust protected paths as needed
  • Regular backup of configurations and logs

Operations

  • Use the netlink client for real-time monitoring
  • Set up log aggregation for security events
  • Regular security audits based on collected statistics
  • Keep system and RootShield updated

Troubleshooting

Common Issues

Module Loading Fails

# Check kernel version compatibility
uname -r
# Verify kernel headers
ls /lib/modules/$(uname -r)/build
# Check dmesg for detailed errors
dmesg | tail -50
# Check if kprobes are enabled
cat /proc/kallsyms | head

High CPU Usage

# Disable verbose logging
sudo insmod rootshield.ko verbose_logging=0
# Disable specific monitors that may be too aggressive
sudo insmod rootshield.ko syscall_monitor_enabled=0

API Server Issues

# Check if port is available
netstat -tlnp | grep 8080
# Verify dependencies
ldd api/rootshield_api
# Check API server logs
./api/rootshield_api 2>&1
# Ensure database directory exists
mkdir -p /var/lib/rootshield

Netlink Client Connection Issues

# Ensure module is loaded first
lsmod | grep rootshield
# Check dmesg for netlink socket errors
dmesg | grep "RootShield.*netlink"

License

GNU General Public License v3.0

RootShield v3.0 - Transforming security through innovation, intelligence, and uncompromising protection. πŸ›‘οΈπŸ€–πŸ”₯

About

RootShield : The Ultimate Shield for Rooted Android Devices - Protect your rooted Android device from unauthorized file operations and process executions! πŸ›‘οΈ RootShield is a powerful kernel module that ensures your device remains secure by monitoring and preventing risky activities. RootShield is your device’s ultimate defense mechanism. πŸ› οΈπŸ”₯

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published