If you have experience doing DDoS mitigation it will be impossible not to encounter IP address spoofing. Spoofing makes it harder to track the source of attacks. That is why it is still an effective although primitive technique for hiding botnets.
Nowadays it is hard to spoof non-routable addresses. Most ISPs, even the small ones does not allow non-routable to leave their networks anymore. Those in the DDoS business does not have a choice but to use routable source addresses, spoofed or not.
Spoofed source addresses can be:
- Random
- Fixed
- Subnet
- En route
Random simply means that a random IP address is used by the attacking host. Filtering done by routers and gateways makes random IP spoofing less effective than the other techniques. Fixed spoofing is done by using an arbitrary chosen address which is mandatory for attacks like DNS amplification/reflection. With subnet spoofing, an address in the subnet is spoofed to bypass filters. For example if the compromised host resides in the 5.25.80.0/24 network it will be able to spoof addresses between 5.25.80.1-5.25.80.255. It will be hard for the router on the next hop to detect spoofing unless it has the capability to begin with. En route spoofing is done when an attacker spoofs an address of a machine that resides along the path to the victim.
The most pervasive spoofed packets are UDP, ICMP and TCP SYN. SYN packets are mainly used for bruteforce attacks. Even if an attacked host has TCP SYN cookies deployed, it will still be vulnerable to TCP SYN attacks that overwhelms the network with a large number of packets which it can not handle. If I am not mistaken spoofed UDP and ICMP packets are more pervasively used for DDoS nowadays. Fortunately this is not the 90's anymore, SMURF attacks are no longer effective. The new use for spoofed UDP packets are direct DNS attacks and DNS amplification/reflection attacks.
For the relevant RFC entries see section 2.5.5 of RFC3871, section 5.3.8 of RFC1812 and RFC2827.
Recently I found a provider here in the Philippines that allows spoofed packets to leave their network. For reference here is a traceroute of the path where I did the test.
1 [AS9497] [APNIC-CIDR-BLK/DIGITEL-DIAL-UP] [gw.of.host.i.control] 2.2ms
2 [AS9497] [APNIC-CIDR-BLK/DIGITELONE] 202.138.144.66 1.9ms
3 [AS3549] [APNIC-CIDR-BLK/ANC-NETBLK01] 203.192.153.201 37.2ms
4 [AS10026] [APNIC-CIDR-BLK/ANC-NETBLK02] 202.147.16.101 37.3ms
5 [AS10026] [APNIC-CIDR-BLK/ANC-NETBLK02] 202.147.49.209 73.5ms
6 [AS3549] [APNIC-CIDR-BLK/ANC-NETBLK01] 203.192.188.14 73.1ms
7 [AS4775] [APNIC-CIDR-BLK/GLOBET-PH] 203.177.211.217 113.5ms
8 [AS4775] [APNIC-CIDR-BLK/GLOBET-PH] 203.177.31.86 114.2ms
9 [AS4775] [APNIC-CIDR-BLK/GLOBET-PH] 203.177.31.46 112.4ms
10 [AS4775] [APNIC-CIDR-BLK/GLOBET-PH] 203.177.31.41 112.9ms
11 [AS4775] [APNIC-CIDR-BLK/GLOBET-PH] 203.177.55.49 118.3/*ms
12 [AS9386] [APNIC-CIDR-BLK/DESTINYNOC] 202.8.224.131 117.9ms
13 * * *
14 [AS9386] [APNIC-CIDR-BLK/DESTINYNOC] [target.host.i.control] 223.4ms
I tested fixed, subnet and en route spoofing. Port 53 was used for the TCP and UDP source port and port 80 as the destination port. Sanitized the target host IP on the sniffer logs.
For fixed source address spoofing I used a Google IP.
IP 64.233.187.99 > 10.10.10.10: ICMP echo request, id 20051, seq 0, length 8
IP 10.10.10.10 > 64.233.187.99: ICMP echo reply, id 20051, seq 0, length 8
IP 64.233.187.99.53 > 10.10.10.10.0: UDP, length 0
IP 10.10.10.10 > 64.233.187.99: ICMP 10.10.10.10 udp port 0 unreachable, length 36
IP 64.233.187.99.53 > 10.10.10.10.80: tcp 0
IP 10.10.10.10.80 > 64.233.187.99.53: tcp 0
IP 64.233.187.99.53 > 10.10.10.10.80: tcp 0
For subnet source address spoofing I used one of the IPs in the subnet where the source resides.
IP ?.?.?.? > 10.10.10.10: ICMP echo request, id 15699, seq 0, length 8
IP 10.10.10.10 > ?.?.?.?: ICMP echo reply, id 15699, seq 0, length 8
IP ?.?.?.?.53 > 10.10.10.10.0: UDP, length 0
IP 10.10.10.10 > ?.?.?.?: ICMP 10.10.10.10 udp port 0 unreachable, length 36
IP ?.?.?.?.53 > 10.10.10.10.80: tcp 0
IP 10.10.10.10.80 > ?.?.?.?.53: tcp 0
For en route source address spoofing I used one each from AS9497, AS10026 and AS4775.
IP 202.138.144.66 > 10.10.10.10: ICMP echo request, id 9299, seq 0, length 8
IP 10.10.10.10 > 202.138.144.66: ICMP echo reply, id 9299, seq 0, length 8
IP 202.138.144.66.53 > 10.10.10.10.0: UDP, length 0
IP 10.10.10.10 > 202.138.144.66: ICMP 10.10.10.10 udp port 0 unreachable, length 36
IP 202.138.144.66.53 > 10.10.10.10.80: tcp 0
IP 10.10.10.10.80 > 202.138.144.66.53: tcp 0
IP 202.138.144.66.53 > 10.10.10.10.80: tcp 0
IP 202.147.49.209 > 10.10.10.10: ICMP echo request, id 35155, seq 0, length 8
IP 10.10.10.10 > 202.147.49.209: ICMP echo reply, id 35155, seq 0, length 8
IP 202.147.49.209.53 > 10.10.10.10.0: UDP, length 0
IP 10.10.10.10 > 202.147.49.209: ICMP 10.10.10.10 udp port 0 unreachable, length 36
IP 202.147.49.209.53 > 10.10.10.10.80: tcp 0
IP 10.10.10.10.80 > 202.147.49.209.53: tcp 0
IP 10.10.10.10.80 > 202.147.49.209.53: tcp 0
IP 203.177.31.86 > 10.10.10.10: ICMP echo request, id 36179, seq 0, length 8
IP 10.10.10.10 > 203.177.31.86: ICMP echo reply, id 36179, seq 0, length 8
IP 203.177.31.86.53 > 10.10.10.10.0: UDP, length 0
IP 10.10.10.10 > 203.177.31.86: ICMP 10.10.10.10 udp port 0 unreachable, length 36
IP 203.177.31.86.53 > 10.10.10.10.80: tcp 0
IP 10.10.10.10.80 > 203.177.31.86.53: tcp 0
IP 203.177.31.86.53 > 10.10.10.10.80: tcp 0