cdmkdirrepocd~/repogitclonehttps://github.com/Dewalt-arch/pimpmykalicdpimpmykalisudo./pimpmykali.sh# Select Option A for MAPT course toolssudoaptupdate&&sudoaptupgrade-y&&sudoaptautoremove-ysudoaptinstalladbdefault-jdkjadxjarsigner# Apktool# make sure to get the latest apktool_*.jar link for the following wgetsudowgethttps://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.9.2.jar-O/usr/local/bin/apktool.jarsudowgethttps://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool-O/usr/local/bin/apktoolsudochmod+x/usr/local/bin/apktool*#Path-apkcd~/repogitclonehttps://github.com/NickstaDB/patch-apk.git# Android Studio #sudodpkg--add-architecturei386sudoaptupdate&&sudoaptinstall-ylibc6:i386libncurses5:i386libstdc++6:i386lib32z1libbz2-1.0:i386sudo wget https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2023.1.1.26/android-studio-2023.1.1.26-linux.tar.gz -O /tmp/android-studio.tar.gz
sudotarxvfz/tmp/android-studio.tar.gz-C/optsudochmod+x/opt/android-studio/bin/*.shsudorm-f/tmp/android-studio.tar.gz## Run with:cd/opt/android-studio/bin./studio.sh## Proceed with the Setup Wizard selecting all the available components to install## Open a New project and go to Tools > Create Command-line Launcher & Create Desktop Entry# Genymotion #sudoaptinstall-yadbvirtualboxvirtualbox-dkmsvirtualbox-ext-packsudowgethttps://dl.genymotion.com/releases/genymotion-3.6.0/genymotion-3.6.0-linux_x64.bin-O/tmp/genymotion.binsudochmod+xgenymotion.binsudo./genymotion.bincd/opt/genymobile/genymotion./genymotion
Android Studio is recommended for a Windows host machine, while Genymotion is a suitable alternative within the Kali VM due to Android Studio's instability.
Uncheck Launch in .. tool window in the Emulator Settings.
Use the Android Studio Device Manager to create 2 new Android Virtual Devices (AVD)
one with the Q Release (Android 10.0/API Level 29) Google Play image
one with the x86 Marshmallow Release (Android 6.0/API Level 23)
Tap on the Build number several times to enable Developer Options.
Enter System > Developer options.
Set the following options:
Enable OEM Unlocking
Disable Automatic system updates
Enable USB debugging
Enable Wireless debugging
Enable Disable adb authorization timeout
Enable Stay awake (while charging) (if wanted)
📌 I will use a physical Android Sony device for this course. To enable automatic USB connection to the Kali VM, I've added a line to the kali.vmx VM config file, obtaining the vid and pid values from the vmware.log file.
Android Device Emulator is running on the HOST machine
# Start adb on host machineadb-anodaemonserver# if port is already in use, kill the process firsttaskkill/f/t/imadb.exe# Windowsadbkill-server# Linux# Connect to the emulator via LANadb-H<host_machine_IP>-P5037shell
MobSF
sudomkdir-p~/docker/mobsfchown9901:9901~/docker/mobsfdocker run -it --rm --name mobsf -p 8000:8000 -v ~/docker/mobsf:/home/mobsf/.MobSF opensecurity/mobile-security-framework-mobsf:latest
# Set the above command as "mobsf" bash/zsh alias
Frida & Objection
# Frida with pipx# Install pipx to manage frida-tools in its own VirtualEnvsudoaptupdatesudoaptinstall-ypython3python3-pippython3-venvpipx# sudo rm -rf ~/.local/pipxpython3-mpipxensurepathpipxinstallfrida-toolspipxupgradefrida-tools# Restart zsh terminal