r/androidroot • • 27d ago

Support Rat related

Hello everyone,

I am dealing with a situation where an old Android device of mine was compromised at the root level by a custom RAT (Remote Access Trojan). Based on what I have discovered, the malware was mirroring device data and audio logs to an external destination using the Telegram Bot API framework.

I have already moved my active SIM card to a completely new, secure device. The old compromised phone is currently powered off and completely isolated from all networks (Wi-Fi and cellular) to prevent any remote wipe commands from the threat actor.

I need to extract the specific Telegram Bot API token or chat ID string from the old device to keep as unalterable proof of the compromise. Because I need to do this myself without professional forensic tools and ensure the device never reconnects to the network, I am looking for the safest method to do so.

Could anyone guide me on:

What are the safest ways to dump the private application directory (/data/data/) or system cache to an external SD card/USB drive directly from Android Recovery Mode (or a custom bootloader like TWRP)?

Once I have that data dump on an isolated computer, what specific file extensions or directory paths should I search to locate configuration strings or network logs related to the Telegram API?

Are there any specific pitfalls I should avoid to ensure the malware doesn't trigger a self-delete or execution sequence while doing this?

Thank you for your technical guidance.

4 Upvotes

3 comments sorted by

1

u/TwilightX1 27d ago

Dumping /data/data requires root or custom recovery. If your bootloader is already unlocked, flash TWRP.

  • Depending on the phone model, it might be able to decrypt the data partition if you have the unlock password / PIN. All user data on Android phones is encrypted and the key is derived directly from the unlock code, so no code = no data, no matter what method you use. You can then either pull the files to a computer using adb pull or copy them to a USB disk using the built-in file manager.
  • If TWRP doesn't support mounting the data partition on your phone, use it to flash Magisk or KSU (follow the relevant rooting guide for your phone), then boot it normally and pull the files out using adb pull or to a USB disk using a root file manager app like FX File Explorer, or a dedicated backup app like Neo Backup.

If the bootloader is still locked, do not unlock it, since on most phones unlocking the bootloader triggers a factory reset. Use a temporary root tool like DFRoot to get temporary root access without locking the bootloader, then copy the files using one of the methods noted above.

You can get rid of the RAT by flashing the full firmware (stock or custom, whatever you have) - boot, system, recovery (though you'd better keep TWRP just in case) and possibly vbmeta, then wipe and reformat data and cache.

0

u/[deleted] 26d ago

[deleted] — view deleted comment

1

u/kiwitrojan 26d ago

Yes, give me some time please