TCP/IP weaknesses: spoofing, fragmentation, and session hijacking explained

IP was designed without authentication, which allows spoofed source addresses, fragment tricks, and TCP reset or hijack attacks. Why sequence randomization and ingress filtering matter, and which kernel and network settings defend.

Lesson 9 of 17 · 13 min read · practice only with authorization

Diagram

Where trust in TCP/IP is weak

Follow the path. One example at a time.

Step 1 of 4

Source address

Any host can put any source IP in a packet.

Illustration: Source address
# Source address
# Any host can put any source IP in a packet.

The example on the open step is one illustration, or the fix you can paste into an application you own.

What this page is made of

3 pieces. Each one says what fails, who is affected, what you would notice, and what you change.

  1. IP spoofing

    What fails
    Forged source addresses hide attackers and enable reflection.
    Who is affected
    Victims of reflected traffic and services trusting source IPs.
    What you would notice
    Access rules that trust source IP alone.
    What you change
    Filter at the edge and never treat source IP as authentication.
  2. TCP resets and injection

    What fails
    An off-path attacker who guesses sequence numbers can reset or inject into a connection.
    Who is affected
    Long-lived connections such as BGP sessions.
    What you would notice
    Unencrypted long-lived sessions.
    What you change
    Use TCP-AO or MD5 authentication for BGP, and TLS elsewhere.
  3. Fragmentation

    What fails
    Overlapping or tiny fragments can confuse filters that do not reassemble.
    Who is affected
    Networks with older firewalls or IDS.
    What you would notice
    Fragmented traffic to services that do not need it.
    What you change
    Use devices that reassemble, and drop unusual fragments.

A short history

The 1994 Mitnick intrusion used predictable sequence numbers to spoof a trusted host. Modern stacks randomize initial sequence numbers (RFC 6528), and RFC 5961 tightened how TCP accepts resets. These protocol fixes reduced off-path attacks without changing applications.

Spotting spoofed traffic

Signs include TTL values that do not match the claimed source’s distance, private addresses arriving on an internet link, and SYN-ACK backscatter to addresses you never contacted.

$ tcpdump -nn -i wan0 'src net 10.0.0.0/8 or src net 192.168.0.0/16'
10:41:02.118 IP 10.4.4.4.53 > 198.51.100.10.3312: UDP, length 512

Check yourself

Recognition and the fix. Nothing here is a procedure.

1 / 3

Packets from 10.4.4.4 arrive on the internet-facing interface. What should happen?

Sibling techniques

Pages at the same depth, plus a lab and a glossary card for this one.

  1. MapNetwork protocols for defenders: what each layer tells you in a captureEthernet, IP, TCP, UDP, DNS, TLS, and HTTP as they appear in a packet capture: the fields worth reading at each layer, a worked tcpdump trace of one web request, and which protocols leak what.

Practice

  1. LabTenant deskTwo companies, one API. See what changes when the server checks ownership.