T1040

Network Sniffing

Capturing or analysing network traffic to find credentials and cleartext protocols.

How it shows up on Hack The Box

It may be a .pcap you find on the box or tcpdump with capabilities: filter for HTTP, FTP, LDAP or Telnet and look for cleartext passwords.

Techniques in our catalog that match this one (the number is their machines):

Machines to practice it

Sorted from easiest to hardest. The ▶ link takes you to the minute of the IppSec video where it is used.

Guides

Commands

Taken from our cheatsheets and tool pages. Type your details and they are filled into every command.

Wireshark y tshark › Capture

Does my ping arrive? (confirm command execution) Attacker
sudo tcpdump -i tun0 icmp
Save a capture
sudo tcpdump -i eth0 -w captura.pcap

Wireshark y tshark › Analyse a pcap

TCP conversations
tshark -r captura.pcap -q -z conv,tcp
HTTP requests
tshark -r captura.pcap -Y 'http.request' -T fields -e http.host -e http.request.uri
FTP passwords
tshark -r captura.pcap -Y 'ftp.request.command == "PASS"' -T fields -e ftp.request.arg
Export files transferred over HTTP
tshark -r captura.pcap --export-objects http,objetos/
Wireshark filter for submitted forms
http.request.method == "POST"

Tools