Você está na página 1de 18

Laboratório de Análise de Vulnerabilidades

Sniffer

1. Wireshark

Verificar se filezilla (FTP Server) está rodando no XAMP-ENG

Startar o wireshark no BT interno


Escolher uma interface de captura

Escolher interface eth0 (clicar em Start)


Do firewall Ubuntu tentar acessar o serviço FTP

root@ubuntu:~# ftp 172.16.50.40


Connected to 172.16.50.40.
220-FileZilla Server version 0.9.32 beta
220-written by Tim Kosse (Tim.Kosse@gmx.de)
220 Please visit http://sourceforge.net/projects/filezilla/
Name (172.16.50.40:cassio): teste
331 Password required for teste
Password:
530 Login or password incorrect!
Login failed.

Após concluir a tentativa de acesso no firewall parar a captura no


wireshark e ver pacotes capturados no BT interno
Ver toda a sessão FTP - botão direito em qualquer pacote da sessão FTP
(Follow TCP Stream)

Verificar senha capturada


Salvar arquivo como captura.pcap em /root

Verificar se o arquivo foi salvo e seu formato


Abrir o arquivo captura.pcap com o tcpdump
tcpdump -r captura.pcap
2. TCPDUMP
No BT externo
# tcpdump -ni eth0

No Windows 2003 XAMP - acessar o google


Ver no BT externo

No BT externo filtrar a captura pelo host 172.16.49.100

Windows 2003 XAMP fazer um ping em 8.8.8.8


No BT externo visualizar a filtragem

root@bt:~# tcpdump -ni eth0 host 172.16.49.100


tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
20:36:52.039497 IP 172.16.49.100 > 8.8.8.8: ICMP echo request, id 512, seq 13056, length 40
20:36:57.054838 ARP, Request who-has 172.16.49.2 tell 172.16.49.100, length 46
20:36:57.538715 IP 172.16.49.100 > 8.8.8.8: ICMP echo request, id 512, seq 13312, length 40
20:37:02.388161 IP 8.8.8.8 > 172.16.49.100: ICMP echo reply, id 512, seq 13056, length 40
20:37:03.040069 IP 172.16.49.100 > 8.8.8.8: ICMP echo request, id 512, seq 13568, length 40
20:37:06.427283 IP 8.8.8.8 > 172.16.49.100: ICMP echo reply, id 512, seq 13312, length 40
20:37:10.549202 IP 8.8.8.8 > 172.16.49.100: ICMP echo reply, id 512, seq 13568, length 40
^C
8 packets captured
8 packets received by filter
0 packets dropped by kernel
root@bt:~#

Filtrar a captura pelo host de origem

Fazer o ping 8.8.8.8 no windows 2003 XAMP


No BT externo visualizar a captura

root@bt:~# tcpdump -ni eth0 src host 172.16.49.100


tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
20:42:19.539300 IP 172.16.49.100 > 8.8.8.8: ICMP echo request, id 512, seq 14848, length 40
20:42:20.591583 IP 172.16.49.100 > 8.8.8.8: ICMP echo request, id 512, seq 15104, length 40
20:42:21.585902 IP 172.16.49.100 > 8.8.8.8: ICMP echo request, id 512, seq 15360, length 40
20:42:24.543405 ARP, Request who-has 172.16.49.2 tell 172.16.49.100, length 46
4 packets captured
4 packets received by filter
0 packets dropped by kernel
root@bt:~#

Exercício:
1 - Fazer filtragem pelo host de destino (dst host 8.8.8.8)
2 - Fazer filtragem pela rede e protocolo (net 172.16 and icmp)
3 - Fazer filtragem pela porta de origem ou destino (src or dst port 80).
Acessar o google para testar o filtro.
4 - Fazer filtragem para um site especifico (dst host www.uol.com.br)
5 - Gravar a captura em /root/captura1.pcap
# tcpdump -ni eth0 host www.uol.com.br -w /tmp/captura1.pcap
6 - Ler captura no wireshark
3. Ettercap
Selecione Unified sniffing

eth0 e ok
hosts -> scan for hosts

host lists
Start Sniffing

Fazer o acesso telnet do Windows 2003 XAMP para o Firewal


Fazer o acesso FTP do FW Ubuntu ao servidor Windows 2003 XAMP

Verficar senhas capturadas


4. DNS Spoofing

Startar Web Server no BT externo

No BT interno procurar o arquivo etter.dns


Alterar os seguintes campos (criar linhas para facebook.com), salvar e
fechar arquivo

ettercap -G (fazer todo o procedimento inicial para encontrar hosts)


Verificar plugin dns_spoof

2 clique em dns_spoof
Ping Facebook do windows 2003 XAMP

Você também pode gostar