IP Spoofing, in simple language is the method to send IP packets with a forged sender IP address. Attacker can mask identity in this way. IP Spoofing prevention, IP Spoofing detection etc. are quite bigger super-specialities in network security. As the identity is stolen or faked; IP Spoofing can have apparent resemblance with Session Hijacking. Obviously, we are keeping the topic IP Spoofing as a brief, understandable yet most informative to an average user within this article.
The header of each IP packet contains the source address. This should be the address from which the packet was sent. The attacker spoofs the header data so that they contain a different address, the attacker can make the package look as if the packet was sent from another computer. This can be used by the intruders to break security measures which involves IP-address-based authentication system. Advanced Persistent Threat (APT) is one of the application of IP Spoofing method.
Basics of IP Spoofing
IP Spoofing method may be particularly used when a bidirectional communication is required, because the answers to the attacker are predictable or not necessary. Disguising computer communication over TCP connections in this way, however, is not possible circumvent; because the response packets are sent to the “real” computer with a fake IP address.
This is also one of the reason we use Key Pairs to authenticate ourselves to login, for example to SSH to this website’s server (it is actually a full computer). Otherwise an attacker can either fake me and intrude Rackspace’s (the web host for us) system (without additional authentication, the fake IP address will represent me), or at worse can be used to bring a Ddos attack, SYN flood or DNS Amplification Attack.
In non- switched networks, an attacker can also see the reply packets. The attacker needs access to the same physical network segment or standalone device under his/her control in this case.
This type of attack is most effective when there are trust relationships in a network between the machines. In some corporate networks, it is quite common that the internal systems trust each other, so that an user can log in without a user name and password when accessing from another internal machine on the network and is therefore already logged in on another computer. By now, a connection is forged from a trusted machine, an attacker could attack the target computer without having to authenticate.
Countermeasures for IP Spoofing
Packet filters are a countermeasure against IP spoofing. The gateway to a network should carry out a detailed filtering: From the outside, incoming packets that have source addresses of internal hosts are discarded. This prevents an external attacker to forge the address of an internal one.
Ideally, outgoing packets should be filtered, in which case packets are discarded, the source address is not within the network; this prevents IP addresses to be spoofed by external machines, and it is a long-standing demand of the security professionals towards the ISPs : If every ISP would consistently filter the outgoing packets, mass exemplary IP spoofing (often in conjunction with denial of service attacks) would be of a much less problem than it is on the internet today.
Some protocols on higher layers provide their own measures against IP spoofing. The Transmission Control Protocol (TCP), for example, uses sequence numbers to ensure that the incoming packets are actually a part of an established connection. The poor implementation of TCP sequence numbers in many older operating systems and network devices, however, can open an way for the attacker to guess the sequence numbers and thus to overcome the mechanism. Alternatively, it could be a Man-in-the-Middle Attack (MITMA) attack attempt.
IP spoofing can be used for only limited cases for breaking into other systems because all the response packets of the attacked computer are sent to the spoofed address. Conversely, this behavior can however used as a “weapon”. The identity of the actual attacker is not easy to establish, since the source of the response packets is of course an unsuspected computer.