Content deleted Content added
Thumperward (talk | contribs) begin tidying |
Link suggestions feature: 2 links added. |
||
(24 intermediate revisions by 22 users not shown) | |||
Line 1:
{{Use American English|date = April 2019}}
{{short description|Cyberattack method based on Internet Protocol fragmentation}}
{{multiple issues|
{{technical|date=April 2014}}
{{
}}
'''IP fragmentation attacks'''
Part of the [[Internet protocol suite|TCP/IP suite]] is the Internet Protocol (IP) which resides at the [[Internet Layer]] of this model. IP is responsible for the transmission of packets between network end points. IP includes some features which provide basic measures of fault-tolerance (time to live, checksum), traffic prioritization (type of service) and support for the fragmentation of larger packets into multiple smaller packets (ID field, fragment offset). The support for fragmentation of larger packets provides a protocol allowing routers to fragment a packet into smaller packets when the original packet is too large for the supporting datalink frames. IP fragmentation exploits (attacks) use the fragmentation protocol within IP as an attack vector.
According to [Kurose 2013], in one type of IP fragmentation attack "the attacker sends a stream of small fragments to the target host, none of which has an offset of zero. The target can collapse as it attempts to rebuild datagrams out of the degenerate packets."<ref name=":0">{{Cite book|title=Computer Networking: A Top-down Approach|last=Kurose|first=James F.|date=2013|publisher=Pearson|others=Ross, Keith W., 1956-|isbn=9780132856201|edition=6th|___location=Boston|pages=338|oclc=769141382}}</ref> Another attack involves sending overlapping fragments with non-aligned offsets, which can render vulnerable operating systems not knowing what to do, causing some to crash.<ref name=":0" />
== Process ==
[[File:IPv4 Fragmentation Algorithm-en.png|thumb|300px|The fragmentation algorithm in IPv4.]]
IP
This can be accomplished by several approaches:
* To set the IP
* To preview all links between source and destination and select the smallest MTU in this route, assuming there is a unique route. This way we make sure that the fragmentation is done by the sender, using a packet-size smaller than the selected MTU, and there is no further fragmentation en route. This solution, called [[Path MTU Discovery]], allows a sender to fragment/segment a long [[Internet]] [[packet (information technology)|packet]], rather than relying on routers to perform IP-level fragmentation. This is more efficient and more scalable. It is therefore the recommended method in the current Internet. The problem with this approach is that each packet is routed independently; they may well typically follow the same route, but they may not, and so a probe packet to determine fragmentation may follow a path different from paths taken by later packets.
Three fields in the [[IPv4#Header|IP header]] are used to implement fragmentation and reassembly. The "Identification", "Flags" and "Fragment Offset" fields.
{| class="wikitable" style="margin: 0 auto; text-align: center;"
|+ IPv4 Header Format
|-
! ''Offsets''
! [[Octet (computing)|Octet]]
! colspan="8" | 0
! colspan="8" | 1
! colspan="8" | 2
! colspan="8" | 3
|-
! | [[Octet (computing)|Octet]]
! [[Bit]]
! style="width:2.6%;"| 0
! style="width:2.6%;"| 1
! style="width:2.6%;"| 2
! style="width:2.6%;"| 3
! style="width:2.6%;"| 4
! style="width:2.6%;"| 5
! style="width:2.6%;"| 6
! style="width:2.6%;"| 7
! style="width:2.6%;"| 8
! style="width:2.6%;"| 9
! style="width:2.6%;"| 10
! style="width:2.6%;"| 11
! style="width:2.6%;"| 12
! style="width:2.6%;"| 13
! style="width:2.6%;"| 14
! style="width:2.6%;"| 15
! style="width:2.6%;"| 16
! style="width:2.6%;"| 17
! style="width:2.6%;"| 18
! style="width:2.6%;"| 19
! style="width:2.6%;"| 20
! style="width:2.6%;"| 21
! style="width:2.6%;"| 22
! style="width:2.6%;"| 23
! style="width:2.6%;"| 24
! style="width:2.6%;"| 25
! style="width:2.6%;"| 26
! style="width:2.6%;"| 27
! style="width:2.6%;"| 28
! style="width:2.6%;"| 29
! style="width:2.6%;"| 30
! style="width:2.6%;"| 31
|-
! 0
! 0
| colspan="4"|[[IPv4#Version|Version]]
| colspan="4"|[[IPv4#IHL|IHL]]
| colspan="6"|[[IPv4#DSCP|DSCP]]
| colspan="2"|[[IPv4#ECN|ECN]]
| colspan="16"|[[IPv4#Total Length|Total Length]]
|-
! 4
! 32
| colspan="16"|[[IPv4#Identification|Identification]]
| colspan="3"|[[IPv4#Flags|Flags]]
| colspan="13"|[[IPv4#Fragment offset|Fragment Offset]]
|-
! 8
! 64
| colspan="8"|[[IPv4#TTL|Time To Live]]
| colspan="8"|[[IPv4#Protocol|Protocol]]
| colspan="16"|[[IPv4#Header checksum|Header Checksum]]
|-
! 12
! 96
| colspan="32"|[[IPv4#Source address|Source IP Address]]
|-
! 16
! 128
| colspan="32"|[[IPv4#Destination address|Destination IP Address]]
|-
! 20
! 160
| colspan="32" rowspan="4" |[[IPv4#Options|Options]] (if IHL > 5)
|-
! 24
! 192
|-
! 28
! 224
|-
! 32
! 256
|}
Flags:
: A 3 [[bit field]] which says if the
: Bit 0: reserved, must be zero (unless
: Bit 1: (AF) 0 = May Fragment, 1 = Don't Fragment.
: Bit 2: (AF) 0 = Last Fragment, 1 = More Fragments.
{| class="wikitable" style="text-align: center;"
|-
! Bit
! 0 !! 1 !! 2 !! 3
|-
! Field
| 0 || DF || MF || colspan="13" | Fragment Offset
|}
Fragment Offset specifies the fragment's position within the original
Accordingly, every fragment except the last must contain a multiple of 8 bytes of data. It is obvious that Fragment Offset can hold 8192 (2^13) units but the [[
Because an IP internet can be connectionless, fragments from one
The source system sets "Identification" field in each
The following is a real-life fragmentation example:
The following was obtained using the [[Wireshark|Ethereal]] protocol analyzer to capture [[
<!-- The terminal command doesn't work for BASH on Darwin. -->
The results are as follows:
<!-- This example is way too long and messy -->
<syntaxhighlight lang="text">
No. Time Source Destination Protocol Info
1 0.000000 87.247.163.96 66.94.234.13 ICMP Echo (ping) request
Line 136 ⟶ 212:
Internet Protocol, Src: 87.247.163.96 (87.247.163.96), Dst: 66.94.234.13 (66.94.234.13)
Data (1480 bytes)
</syntaxhighlight>
Note that only the first fragment contains the ICMP header and all remaining fragments are generated without the ICMP header.
Two important points here:
* In some datalink protocols such as Ethernet, only the first fragment contains the full upper layer header, meaning that other fragments look like beheaded
* Additional overhead imposed over network because all fragments contains their own IP header. Additional overhead = (number_of_fragments - 1) * (ip_header_len);
== Exploits ==
; IP fragment overlapped: The IP fragment overlapped [[exploit (computer security)|exploit]] occurs when two fragments contained within the same IP
; IP fragmentation buffer full: The IP fragmentation buffer full exploit occurs when there is an excessive amount of incomplete fragmented traffic detected on the protected network. This could be due to an excessive number of incomplete fragmented
; IP fragment overrun: The IP Fragment Overrun exploit is when a reassembled fragmented
; IP fragment too many
; IP fragment incomplete
; IP Fragment Too Small: If an IP fragment is too small it indicates that the fragment is likely intentionally crafted. Any fragment other than the final fragment that is less than 400 bytes could be considered too small. Small fragments may be used in denial of service attacks or in an attempt to bypass security measures or detection.
== Fragmentation for evasion ==
Network infrastructure equipment such as [[Router (computing)|routers]], [[Load balancing (computing)|load-balancers]], [[Firewall (computing)|firewalls]] and [[Intrusion
== References ==
{{
== External links ==
*
* {{IETF RFC|1858|link=no}}
* {{IETF RFC|791|link=no}}
[[Category:Internet security]]
|