IP Spoofing

From Computing and Software Wiki

(Difference between revisions)
Jump to: navigation, search
 
(7 intermediate revisions not shown)
Line 1: Line 1:
'''IP(Internet Protocol) Spoofing''' is term used to describe the creation of IP Packets with a forged (spoofed) source IP address for the purposes of hiding the true identity of the sender or impersonating the identity of another system. IP Spoofing is generally used to gain unauthorized access to a network by impersonating a source with authorized access. IP Spoofing attacks are based on the fact that internet communication occurs between distant computers. The communication is handled by routers which decide the best path based on the destination address while the source address is generally ignored. Once the destination address has been reached, the destination machine reacts based on the source address.
'''IP(Internet Protocol) Spoofing''' is term used to describe the creation of IP Packets with a forged (spoofed) source IP address for the purposes of hiding the true identity of the sender or impersonating the identity of another system. IP Spoofing is generally used to gain unauthorized access to a network by impersonating a source with authorized access. IP Spoofing attacks are based on the fact that internet communication occurs between distant computers. The communication is handled by routers which decide the best path based on the destination address while the source address is generally ignored. Once the destination address has been reached, the destination machine reacts based on the source address.
-
== How IP Spoofing Works ==
 
-
[[Image:Ipheader.jpg]]
 
-
IP Header
+
==How IP Spoofing Works==
 +
[[Image:Ipheader.jpg|thumb|right|450px|IP Datagram Header.<sup>[1]</sup>]]
 +
Information is transferred over the internet in the form of Internet Protocol(IP) Datagrams also known as Packets. IP Datagrams consists of the IP header and the data being transferred shown in Figure 1. It is the IP header that contains the IP Header contains the source IP address and IP destination address.
-
==External links==
+
Normally IP Packets are created automatically behind the scenes for the user; however, a user can override this function by inserting a custom IP Header and informing the operating system that a header is not needed. This process creates spoofed IP datagrams that may be used to impersonate another source IP address or hide the true source IP address. These custom packets can created by using raw sockets in UNIX-like systems or packet drivers such as ''WinPcap'' for Windows.<sup>[http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_10-4/104_ip-spoofing.html [1]]</sup>
-
*[http://en.wikipedia.org/wiki/Spoofing_attack Wikipedia: Spoofing attack]
+
<div style="clear:both;"></div>
-
*[http://en.wikipedia.org/wiki/IP_spoofing Wikipedia: IP address spoofing]
+
==Blind/Nonblind Spoofing==
-
*[http://www.securityfocus.com/infocus/1674 IP Spoofing: An Introduction]
+
Spoof attacks are generally considered blind attacks because the attacker will not recieve replies directly from the victim. The victim usually only replies back to the source address of the recieved packets and does not know the true source address of spoofed packets. If the attacker is on the same '''subnet''' of the host being impersonated, then the attacker can "sniff" the reply and intercept the packet. Scenarios where the attacker inspects the responses from the victim are called "nonblind spoofing" and in other cases it is called "blind spoofing" where the responses are not intercepted.<sup>[http://www.securityfocus.com/infocus/1674 [4]]</sup>
-
*[http://www.giac.org/certified_professionals/practicals/gsec/0201.php Introduction to IP Spoofing]
+
 
-
*[http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_10-4/104_ip-spoofing.html IP Spoofing, The Internet Protocol Journal, Volume 10, No. 4]
+
==Sequence Number Prediction==
 +
Once a connection between two hosts is established by using TCP, the exchange of packets between the two parties also carry sequence numbers and acknowledgments. The sequence numbers are used to determine lost packets or the order of packet and provide the reliability of TCP. Sequence numbers are generated pseudo-randomly by an algorithm known by both parties. This prevents spoofing attacks from succeeding unless the correct next sequence numbers are attached to the spoofed packets.<sup>[http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_10-4/104_ip-spoofing.html [1]]</sup> If the responses can be viewed, the attacker may be able to determine the algorithm and send packets with the correct sequence numbers. Once this is accomplished the attack may intercept the session.
 +
 
 +
==Denial of Service Using IP Spoofing==
 +
TCP connections are setup using ''three-way handshake'' that involve the '''SYN''' and '''ACK''' flags in the TCP header. Connection that have been initiated but not completed are called half-open connections. The state of half-open connections are stored and take up part of a finite-sized data structure.<sup>[http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_10-4/104_ip-spoofing.html [1]]</sup> If a spoofed '''SYN''' packet is sent to initiate a ''three-way handshake'' to a victim, the victim sends a '''SYN-ACK''' packet and waits for the final '''ACK''' to complete the handshake. If the spoofed address does not belong to the attacker, then the connection is left half-open and waiting indefinitely or for a period of time. Having too many half-open connections will flood the finite-size data structure and prevent and new connections from forming.<sup>[http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_10-4/104_ip-spoofing.html [1]]</sup> This causes the victim to deny service to any legitimate connections.
 +
 
 +
==Session Hijacking==
 +
Using a combination of Sequence Number Prediction and Denial of Service attacks, an attacker can hijack a session from a trusted host. Once the sequence number has been predicted, the attacker can send a reset message to one of the two trusted hosts to end the connection from one host by impersonating the other. The attacker can then impersonate the trusted host that dropped the connection by impersonating the source address.<sup>[http://www.giac.org/certified_professionals/practicals/gsec/0201.php [5]]</sup> At this point the attacker can preform commands with the privileges of the dropped host. Figure 2 shows a visual representation of session hijacking.
 +
 
 +
[[Image:sessionhijacking.jpg]]
 +
 
 +
==See Also==
 +
*[[Man in the Middle Attack]]
 +
*[[Phishing]]
 +
*[[Social Engineering]]
 +
*[[Kevin Mitnick]]
 +
 
 +
==External Links==
 +
* [http://www.tcpipguide.com/free/t_IPDatagramGeneralFormat.htm TCP/IP Guide]
 +
* [http://doc.bughunter.net/network-security/ip-spoofing.html IP-spoofing Demystified (Trust-Relationship Exploitation)]
 +
* [http://portblocking.csail.mit.edu/mantid.php State of IP Spoofing]
 +
* [http://www.linuxsecurity.com/content/view/120225/171/ Linux Security Introduction: IP Spoofing]
 +
* [http://www.apricot.net/apricot2007/presentation/conference/security_stream/anti-ip-spoofing.pdf Anti-IP-Spoofing]
 +
 
 +
==References==
 +
#[http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_10-4/104_ip-spoofing.html IP Spoofing, The Internet Protocol Journal, Volume 10, No. 4]  
 +
#[http://en.wikipedia.org/wiki/Spoofing_attack Wikipedia: Spoofing attack]
 +
#[http://en.wikipedia.org/wiki/IP_spoofing Wikipedia: IP address spoofing]
 +
#[http://www.securityfocus.com/infocus/1674 IP Spoofing: An Introduction]
 +
#[http://www.giac.org/certified_professionals/practicals/gsec/0201.php Introduction to IP Spoofing]
 +
--[[User:Luongp|Luongp]] 23:57, 12 April 2009 (EDT)

Current revision as of 03:57, 13 April 2009

IP(Internet Protocol) Spoofing is term used to describe the creation of IP Packets with a forged (spoofed) source IP address for the purposes of hiding the true identity of the sender or impersonating the identity of another system. IP Spoofing is generally used to gain unauthorized access to a network by impersonating a source with authorized access. IP Spoofing attacks are based on the fact that internet communication occurs between distant computers. The communication is handled by routers which decide the best path based on the destination address while the source address is generally ignored. Once the destination address has been reached, the destination machine reacts based on the source address.


Contents

How IP Spoofing Works

IP Datagram Header.[1]

Information is transferred over the internet in the form of Internet Protocol(IP) Datagrams also known as Packets. IP Datagrams consists of the IP header and the data being transferred shown in Figure 1. It is the IP header that contains the IP Header contains the source IP address and IP destination address.

Normally IP Packets are created automatically behind the scenes for the user; however, a user can override this function by inserting a custom IP Header and informing the operating system that a header is not needed. This process creates spoofed IP datagrams that may be used to impersonate another source IP address or hide the true source IP address. These custom packets can created by using raw sockets in UNIX-like systems or packet drivers such as WinPcap for Windows.[1]

Blind/Nonblind Spoofing

Spoof attacks are generally considered blind attacks because the attacker will not recieve replies directly from the victim. The victim usually only replies back to the source address of the recieved packets and does not know the true source address of spoofed packets. If the attacker is on the same subnet of the host being impersonated, then the attacker can "sniff" the reply and intercept the packet. Scenarios where the attacker inspects the responses from the victim are called "nonblind spoofing" and in other cases it is called "blind spoofing" where the responses are not intercepted.[4]

Sequence Number Prediction

Once a connection between two hosts is established by using TCP, the exchange of packets between the two parties also carry sequence numbers and acknowledgments. The sequence numbers are used to determine lost packets or the order of packet and provide the reliability of TCP. Sequence numbers are generated pseudo-randomly by an algorithm known by both parties. This prevents spoofing attacks from succeeding unless the correct next sequence numbers are attached to the spoofed packets.[1] If the responses can be viewed, the attacker may be able to determine the algorithm and send packets with the correct sequence numbers. Once this is accomplished the attack may intercept the session.

Denial of Service Using IP Spoofing

TCP connections are setup using three-way handshake that involve the SYN and ACK flags in the TCP header. Connection that have been initiated but not completed are called half-open connections. The state of half-open connections are stored and take up part of a finite-sized data structure.[1] If a spoofed SYN packet is sent to initiate a three-way handshake to a victim, the victim sends a SYN-ACK packet and waits for the final ACK to complete the handshake. If the spoofed address does not belong to the attacker, then the connection is left half-open and waiting indefinitely or for a period of time. Having too many half-open connections will flood the finite-size data structure and prevent and new connections from forming.[1] This causes the victim to deny service to any legitimate connections.

Session Hijacking

Using a combination of Sequence Number Prediction and Denial of Service attacks, an attacker can hijack a session from a trusted host. Once the sequence number has been predicted, the attacker can send a reset message to one of the two trusted hosts to end the connection from one host by impersonating the other. The attacker can then impersonate the trusted host that dropped the connection by impersonating the source address.[5] At this point the attacker can preform commands with the privileges of the dropped host. Figure 2 shows a visual representation of session hijacking.

Image:sessionhijacking.jpg

See Also

External Links

References

  1. IP Spoofing, The Internet Protocol Journal, Volume 10, No. 4
  2. Wikipedia: Spoofing attack
  3. Wikipedia: IP address spoofing
  4. IP Spoofing: An Introduction
  5. Introduction to IP Spoofing

--Luongp 23:57, 12 April 2009 (EDT)

Personal tools