RootShield
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. ๐ ๏ธ๐ฅ
Install / Use
/learn @ImKKingshuk/RootShieldQuality Score
Category
Development & EngineeringSupported Platforms
Tags
README
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_commonvia 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_writefor protected paths - Open Monitoring โ
: kprobe on
vfs_openfor 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_xcalls - 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 statusGET /api/v1/events- Security eventsGET/POST /api/v1/rules- Security rules managementGET /api/v1/plugins- Plugin statusGET /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) โ โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot ๅฏๅชไฝๆถๅ่ฝๅใไฝฟ็จ <qqmedia> ๆ ็ญพ๏ผ็ณป็ปๆ นๆฎๆไปถๆฉๅฑๅ่ชๅจ่ฏๅซ็ฑปๅ๏ผๅพ็/่ฏญ้ณ/่ง้ข/ๆไปถ๏ผใ
