Module 3 · Networking for testers · Lesson 12 of 16

Conversations on the wire

Follow a DNS lookup, a TCP handshake and a web request packet by packet, then learn to watch traffic and grab banners.

In this lesson · about 25 minutes

  • Describe the SYN, SYN/ACK, ACK handshake
  • Explain why plain HTTP and Telnet are findings
  • Filter traffic with tcpdump and grab a service banner

Whiteboard · watch and try

Three conversations, packet by packet

Press Play. Notice which conversations anyone on the network could read.

6 steps
Press Play and the tutor will talk you through it while writing on the board. Pause any time to write on the board yourself.

Tip: press Pause, then use the pen to work along on the board. Space plays and pauses; Ctrl+Z undoes your last mark.

Watching traffic

tcpdump prints packets in the terminal; Wireshark shows the same thing in a window and can rebuild whole conversations (right-click a packet, then Follow › TCP Stream). Both need root, and both take filters so you only see what matters:

tcpdumpWireshark display filterShows
host 192.168.56.101ip.addr == 192.168.56.101Everything to or from one host
tcp port 80tcp.port == 80Web traffic on port 80
icmpicmpPings
udp port 53dnsDNS lookups

Talking to services by hand

Many services introduce themselves the moment you connect. nc -nv <ip> <port> (netcat) opens a raw connection and shows the greeting; curl -I http://<ip>/ asks a web server for just its headers. Both often reveal the exact software and version before you run a single scanner.

Check your understanding0 of 2 correct

Question 1

1.What is the main difference between TCP and UDP?

Question 2

2.What is banner grabbing?

Quiz score: 0 of 2

Tip: answer every quiz question correctly first.

For authorized, lab-based learning only. Tana Roasters and every person, address and password in this course are fictional. Every terminal is simulated. "Kali Linux" is a trademark of OffSec; this course is not affiliated with or endorsed by OffSec.