Let's look at two different scenarios.
Scenario #1 Attacker wants to spoof an arbitrary IP address and the attacker is not on the same subnet (broadcast domain) as the targeted IP address. Example: attacker is 18.104.22.168 and wishing to spoof 22.214.171.124
Scenario #2 Attacker wants to spoof an IP address of someone on his own subnet (broadcast domain). Example: attacker is 192.168.1.55 and wishing to spoof 192.168.1.58 (assuming subnet of 255.255.255.0)
The attacker can create forged TCP packets and modifies the source IP address to be any value. One tool that can do this is HPING2.
What can you (the attacker) do:
- Send an initial TCP packet with any source IP address
- Send a series of UDP packets with any source IP address
- Send a series of unrelated TCP packets from the same or varying IP addresses
- Receive any responses to your forged messages. The responses, if sent, would go to the forged IP address.
- Send a string of related TCP packets (e.g. reconstruct an actual TCP exchange). This is because you can't complete the handshake or guess the necessary information to continue the TCP connection.
The attacker can perform a variety of attacks to forge or take-over the IP address on the same subnet.
- Simplest - Statically define your IP address to the target IP address
- Switch your MAC address to the MAC address of the current NIC for the target IP address and attempt to assume control of IP
- Execute man in the middle attack via arp spoofing (see tool Cain & Abel) and then gain control of user's unencrypted transmissions. You could likely modify or redirect traffic to accomplish your original spoofing goal.
- Assume control of the IP address. Note: This means you can send/receive valid data using the targeted IP address as your own. It does not grant you access to existing sessions that the user had with any websites (because you don't have the user's session cookies).
- Intercept encrypted (e.g. SSL/TLS) communication destined for the target IP address without alerting the targeted user in some way (browser warning message for MitM invalid certificate).