What is IP Spoofing?

IP spoofing is the act of forging the source address in an IP packet header so that it appears to come from a different host. Because the Internet Protocol was designed for a small, trusted research network, there is no built-in mechanism to verify that the source address in a packet actually belongs to the sender. This single architectural decision has been the root cause of some of the largest distributed denial-of-service (DDoS) attacks in internet history, and defending against it remains one of the hardest unsolved problems in network security.

How IP Packets Work

Every packet transmitted across the internet carries an IP header. The header contains, among other fields, a source address and a destination address. Routers along the path use the destination address to forward the packet toward its target. The source address tells the destination where to send replies.

Here is the structure of an IPv4 header, with the fields relevant to spoofing highlighted:

0 4 8 16 24 31 Version IHL DSCP/ECN Total Length Identification Flags Fragment Offset TTL Protocol Header Checksum Source IP Address Spoofed Destination IP Address Options (if any) + Payload... The source address field has no authentication — any value can be written here

Crucially, routers along the forwarding path do not normally inspect or validate the source address. They only care about the destination address for making forwarding decisions. This means a sender can write any IP address into the source field, and the packet will be delivered to the destination as if it came from that address. The destination has no way to tell the difference — it sees a perfectly valid packet with a plausible source.

Why IPv4 Makes Spoofing Easy

IP was designed in 1981 (RFC 791) for a handful of universities and government research labs that trusted each other. Source address validation was unnecessary in that environment. Three decades and billions of connected devices later, this trust-based design has become a critical vulnerability:

IPv6 does not fundamentally solve this problem. While IPsec was originally envisioned as mandatory for IPv6, practical deployment has not required it, and IPv6 packets can be spoofed just as easily as IPv4 in the absence of filtering.

How Attackers Use IP Spoofing

IP spoofing is not useful for establishing TCP connections — the three-way handshake requires the attacker to receive the SYN-ACK reply, which goes to the spoofed address, not the attacker. But spoofing is devastatingly effective for two categories of attacks: reflection/amplification and flooding.

Amplification Attacks

In an amplification attack, the attacker sends a small request to a public server (the "reflector") with the source address spoofed to be the victim's address. The server sends its response — which is much larger than the request — to the victim. By using thousands of reflectors simultaneously, the attacker can generate traffic volumes far exceeding their own bandwidth.

Attacker src: Victim's IP DNS Server 64x amplification NTP Server 556x amplification Memcached 51,000x amplification SSDP/CLDAP 30x amplification Victim Overwhelmed by amplified responses Small spoofed requests Massive responses Spoofed source IP causes amplified responses to flood the victim, not the attacker

Common amplification vectors and their amplification factors:

Without IP spoofing, none of these attacks would work. The responses would go back to the attacker, not the victim. Spoofing is the enabler that makes amplification-based DDoS attacks possible.

SYN Floods

A SYN flood exploits the TCP three-way handshake. The attacker sends a massive volume of TCP SYN packets — each with a different spoofed source address — to a target server. The server allocates resources for each half-open connection (storing state in its SYN queue) and sends SYN-ACK replies to the spoofed addresses. Those replies go nowhere useful, and the connections never complete.

Attacker Spoofs random IPs Target Server SYN queue fills up Legitimate clients cannot connect 192.0.2.47 (random) 198.51.100.3 (random) 203.0.113.99 (random) 10 million more... SYN SYN SYN SYN... SYN-ACK SYN-ACK replies are sent to spoofed addresses that never complete the handshake

The server's connection table fills up with these half-open connections, and legitimate users are unable to establish new connections. The server is not overwhelmed by bandwidth — it is overwhelmed by state exhaustion. Modern mitigations like SYN cookies (which avoid allocating state until the handshake completes) help, but large-scale SYN floods with spoofed sources remain a potent attack vector.

Source Address Validation: BCP38 and BCP84

The internet engineering community recognized the spoofing problem early. In 2000, the IETF published BCP38 (RFC 2827), titled "Network Ingress Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing." The concept is simple: networks should filter outbound traffic and drop any packet whose source address does not belong to the network sending it.

Customer Network Allocated: 198.51.100.0/24 Attacker sends packets with src: 8.8.8.8 ISP Edge Router Ingress filter (BCP38): Only allow src in 198.51.100.0/24 src 198.51.100.5 → PASS src 8.8.8.8 → DROP Internet Spoofed packets stopped Customer Network Sends spoofed packets ISP Without BCP38 No filtering — all packets pass Internet Spoofed packets delivered

For example, if a customer network is allocated the prefix 198.51.100.0/24, the ISP's edge router should only accept packets from that customer with source addresses within 198.51.100.0/24. Any packet claiming to be from 8.8.8.8 or any other address outside that range should be silently dropped.

BCP84 (RFC 3704, published 2004) extended BCP38 with more specific guidance for multihomed networks and additional filtering techniques. It describes several approaches:

The BCP38 Deployment Problem

BCP38 has been a best-practice recommendation for over two decades. Despite this, deployment is far from universal. The CAIDA Spoofer project, which measures the ability of networks to send spoofed packets, consistently finds that roughly 25-30% of autonomous systems still allow spoofing from at least some portion of their address space.

The deployment problem is fundamentally economic: the network that deploys BCP38 does not directly benefit. Ingress filtering protects other networks from attacks originating inside your network. It is a cost you bear for the benefit of the broader internet. This creates a classic commons problem — every network would benefit if everyone filtered, but each individual network has little incentive to invest in filtering.

Deployment is poorest among:

Several initiatives have tried to improve adoption. The Mutually Agreed Norms for Routing Security (MANRS), overseen by the Internet Society, includes anti-spoofing as one of its core actions. MANRS participants commit to implementing source address validation. Major IXPs and regional NOGs (Network Operator Groups) also promote BCP38 adoption through training and peer pressure.

uRPF: Unicast Reverse Path Forwarding

The most common technical implementation of source address validation on modern routers is uRPF (Unicast Reverse Path Forwarding), defined in RFC 3704. uRPF works by checking the source address of incoming packets against the router's own routing table (the Forwarding Information Base, or FIB):

Strict uRPF on customer-facing interfaces at the network edge is the gold standard. It is computationally cheap on modern hardware (it leverages the FIB that the router already maintains), adds negligible latency, and stops spoofed packets before they ever enter the transit network.

How RPKI Helps

RPKI (Resource Public Key Infrastructure) does not directly prevent IP spoofing — it validates BGP route origins, not individual packets. However, RPKI contributes to the anti-spoofing ecosystem in several important ways:

In this way, RPKI and source address validation are complementary defenses. RPKI secures the control plane (BGP routing), while BCP38/uRPF secures the data plane (packet forwarding). Together, they form a layered defense that is much stronger than either alone.

IP Spoofing and DDoS: The Connection

IP spoofing is the single most important enabler of volumetric DDoS attacks. Without the ability to spoof source addresses, attackers lose two critical capabilities:

  1. Amplification becomes impossible — If the attacker cannot forge the source address, reflector responses go back to the attacker, not the victim. The attacker would need to generate the full attack volume from their own infrastructure, which is far more expensive and easily traceable.
  2. Attribution becomes feasible — With real source addresses, operators can trace attack traffic back to its origin network and take action. Spoofing provides anonymity that shields the attacker from identification and consequences.

The scale of modern DDoS attacks directly depends on spoofing. The largest recorded attacks — including the 2.5+ Tbps attacks mitigated by major CDNs in recent years — use UDP-based amplification vectors that are only possible because the source address can be forged.

Real-World Incidents

IP spoofing has been instrumental in some of the most significant security incidents in internet history:

The 2018 GitHub Memcached Attack (1.35 Tbps)

In February 2018, GitHub was hit by the largest DDoS attack recorded at that time: 1.35 terabits per second of traffic. The attack used memcached amplification — the attackers sent spoofed UDP requests to thousands of memcached servers with UDP port 11211 exposed to the internet. Each 15-byte request triggered multi-megabyte responses directed at GitHub's IP infrastructure. GitHub's traffic was handled by their network (AS36459), and the attack was mitigated by Akamai Prolexic within 10 minutes, but it demonstrated how a handful of spoofed packets could generate terabits of attack traffic.

The 2016 Dyn DNS Attack

In October 2016, a massive DDoS attack against Dyn, a major DNS provider, took down access to Twitter, Netflix, Reddit, GitHub, and dozens of other sites. While primarily a botnet attack (Mirai), portions of the attack used spoofed source addresses to amplify DNS query traffic. The attack highlighted how DNS infrastructure, which is critical for translating domain names to IP addresses, can be overwhelmed when spoofed traffic targets the resolvers themselves.

The Spamhaus Attack (2013, 300 Gbps)

In March 2013, Spamhaus — an anti-spam organization — was targeted with a DNS amplification attack peaking at 300 Gbps, which was then a record. The attackers used open DNS resolvers as reflectors, sending millions of spoofed DNS queries with Spamhaus's IP as the source. The amplified responses were large enough to congest upstream transit links and cause collateral damage to other networks sharing the same infrastructure.

The Kevin Mitnick Attack (1994)

One of the earliest documented uses of IP spoofing for intrusion (rather than denial of service) was Kevin Mitnick's 1994 attack on Tsutomu Shimomura's computer. Mitnick used IP spoofing combined with TCP sequence number prediction to hijack a trusted rsh session. He spoofed the source address of a trusted host, predicted the TCP sequence numbers for the SYN-ACK (which he could not see because it was sent to the spoofed address), and injected commands into the connection. This attack led directly to improved TCP sequence number randomization in operating systems.

Detecting Spoofed Traffic

Identifying spoofed packets in transit is difficult because, by definition, they look like legitimate packets from the claimed source. However, several techniques provide clues:

Defenses Beyond Source Filtering

Because BCP38 deployment is incomplete, the internet has developed additional defenses that work even when spoofed packets reach their targets:

SYN Cookies

Instead of storing state for every incoming SYN, the server encodes the connection parameters into the TCP sequence number of the SYN-ACK using a cryptographic hash. Only when the client completes the handshake by returning the correct ACK does the server allocate connection state. This makes SYN floods with spoofed addresses harmless — the spoofed addresses cannot return the correct ACK.

Response Rate Limiting (RRL)

DNS servers can limit the rate of identical responses sent to the same destination. If a DNS server sees thousands of identical queries apparently from the same IP (the victim), RRL truncates responses or drops them entirely, reducing the amplification effect.

Flowspec

BGP Flowspec (RFC 5575) allows networks to distribute traffic filtering rules via BGP itself. When a network detects a spoofed attack, it can propagate filtering rules to its upstream providers, which apply the filters closer to the traffic source. This pushes the defense further upstream, closer to where the spoofed packets originate.

Anycast Absorption

Anycast deployments naturally distribute attack traffic across many locations. Since spoofed amplification traffic arrives from reflectors worldwide, anycast distributes it geographically, preventing any single point from being overwhelmed. This is why major DNS providers and CDNs use anycast extensively.

Measuring Spoofability

How do you know whether a network allows spoofing? The CAIDA Spoofer Project maintains active measurement infrastructure that tests networks for spoofing capability. Volunteers run the Spoofer client software, which sends test packets with spoofed source addresses to CAIDA's measurement servers. If the spoofed packets arrive, the network allows spoofing. If they are dropped, the network has filtering in place.

As of recent measurements, roughly 25% of tested autonomous systems allow at least some degree of spoofing. The project publishes results by country, network type, and prefix, giving the community data to push for improved filtering. You can look up any autonomous system in the looking glass and cross-reference it with CAIDA's Spoofer results to understand its filtering posture.

The Future: Closing the Spoofing Gap

Several trends are gradually reducing the internet's vulnerability to IP spoofing:

Complete elimination of IP spoofing would require universal BCP38 deployment — every single AS on the internet filtering at its edges. While that goal is unlikely to be achieved fully, every additional network that deploys filtering makes amplification attacks smaller, slower, and easier to trace.

Investigate Routing Security

You can explore the routing infrastructure that underpins both IP spoofing and the defenses against it. Look up any IP address or network to see its BGP routes, RPKI validation status, and origin AS:

See BGP routing data in real time

Open Looking Glass
More Articles
How TLS/HTTPS Works: Securing the Internet's Traffic
Certificate Transparency: How CT Logs Secure the Web's PKI
How Firewalls Work: Packet Filtering, Stateful Inspection, and Beyond
What is Cross-Site Scripting (XSS)?
What is Cross-Site Request Forgery (CSRF)?
What is Server-Side Request Forgery (SSRF)?