Android Pentest Environment Setting Up

Automation Setup

BrutDroid - Android Studio Pentest Automator - https://github.com/Brut-Security/BrutDroidarrow-up-right

Manual Setup

  1. Step By Step

    • Rooting Emulator:

      • Step 1: Install rootAVDarrow-up-right for Download Magisk

      • Step 2: Using rootAVD for installing Magisk on the Emulator

      • Step 3: Cold Boot for Patch System Image

      • Step 4: Finalize Root

    • Install Burp Suite Certificate:

      • Step 1: Install AlwaysTrustUserCertsarrow-up-right β†’ This is a Magisk module designed to make the system trust Burp Suite's certificate (PortSwigger CA)

      • Step 2: Run BurpSuite and install the BurpSuite certificate (PortSwigger CA) on your local machine with .crt extension

      • Step 3: Use ADB to push AlwaysTrustUserCerts.zip and PortSwigger CA from your local machine to /sdcard on the AVD

      • Step 4: On your AVD, go to Settings β†’ Security β†’ Encryption & credentials β†’ Install a certificate β†’ CA certificate, and select the PortSwigger CA from /sdcard

      • Step 5: Go to Magisk Application β†’ Modules β†’ Install from storage β†’ Add AlwaysTrustUserCerts.zip from /sdcard and Reboot AVD

      • Step 6: On your AVD, go to Settings β†’ Security β†’ Encryption & credentials β†’ Trusted credentials β†’ SYSTEM, and check that the PortSwigger CA is installed

    • Install Frida: https://frida.re/docsarrow-up-right

      • Note: Make sure to use the same version of Frida Server and Frida Client.

      • Install Frida Client:

        • Install using pip: pip install frida-tools

        • Verify installation using: frida --version

      • Install Frida Server: https://github.com/frida/fridaarrow-up-right

        • Step 1: Check your device's CPU type: adb shell getprop ro.product.cpu.abilist

        • Step 2: Go to the Release Page on Github: https://github.com/frida/frida/releases/arrow-up-right

        • Step 3: Install the Frida Server that matches the version of the Frida Client and the CPU architecture of the AVD

        • Step 4: Extract the .xz file using WinRAR or 7-Zip, then rename the extracted file to frida-server using the mv command

        • Step 5: Now, let’s get it running on your device:

        • Step 6: Check if Frida is running by executing the following command

Alternatively, you can use a different Technology Stack like:

Other Blog Setup using Android Studio:

Series for Android Pentest:

Last updated