Active reconnaissance
Packet crafting
Building one packet by hand — choosing every flag and field — to probe a target a single reply at a time.
Packet crafting is building one packet by hand, choosing every flag and field, and reading the single
reply. hping3 and nping do it over raw sockets, so they need root. A lone SYN (hping3 -S) draws a
SYN-ACK (flags=SA) from an open port, a [[tcp-reset|reset]] (flags=RA) from a refused one, and nothing from
a dropped one: the firewall's policy, read off the wire ([[drop-vs-reject]]). No connection is ever completed.
Read next
- Firewalking Using a port the firewall allows, plus TTL-limited probes, to map the routers and hosts hidden behind it.
- Drop or reject Two ways to refuse a packet: silence, or an explicit answer.
- Stateful firewall A firewall that remembers connections, so it can allow replies while refusing new connections in.
- TCP reset A TCP packet that aborts a connection; the answer to a SYN for a port with no listener.
- Half-open scan Probing a TCP port with a SYN and hanging up after the reply, so no connection is ever made.
- Three-way handshake SYN, SYN-ACK, ACK: how TCP opens a connection, each side agreeing on starting sequence numbers.