目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2015-1427 PoC — Elasticsearch Groovy Scripting Engine Sandbox 安全绕过漏洞

来源
关联漏洞
标题: Elasticsearch Groovy Scripting Engine Sandbox 安全绕过漏洞 (CVE-2015-1427)
Description:Elasticsearch是荷兰Elasticsearch公司的一套基于Lucene构建的开源分布式RESTful搜索引擎,它主要用于云计算中,并支持通过HTTP使用JSON进行数据索引。 Elasticsearch 1.37及之前版本和1.4.3之前1.4.x版本的Groovy脚本引擎中存在安全漏洞。远程攻击者可借助特制的脚本利用该漏洞绕过沙箱保护机制,执行任意shell命令。
Description
Elasticsearch 1.4.0 < 1.4.2 Remote Code Execution exploit and vulnerable container
介绍
# Elasticsearch 1.4.0 &lt; 1.4.2 Remote Code Execution

Elasticsearch is a distributed, RESTful search and analytics engine capable of solving a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data so you can discover the expected and uncover the unexpected.

## Vulnerable environment

To setup a vulnerable environment for your test you will need [Docker](https://docker.com) installed, and just run the following command:

    docker build -t vuln/cve-2015-1427 .
    docker run --rm -it -p 9200:9200 vuln/cve-2015-1427

And it will spawn a vulnerable web application on your host on `9200` port

## Vulnerable code

The bug is found in the REST API, which does not require authentication, where the search function allows groovy code execution and its sandbox can be bypassed using `java.lang.Math.class.forName` to reference arbitrary classes. It can be used to execute arbitrary Java code. The bug is found in the REST API, which does not require authentication, where the search function allows groovy code execution and its sandbox can be bypassed using `java.lang.Math.class.forName` to reference arbitrary classes. It can be used to execute arbitrary Java code.

## Exploit

To exploit this target just run:

    ./exploit.sh host:port

If you are using this vulnerable image, you can just run:

    ./exploit.sh 127.0.0.1:9200
    [+] CVE-2015-1427 exploit by t0kx
    [+] Exploiting 127.0.0.1:9200
    [+] Trigger Payload...
    [+] Running whoami: root
    [+] Done

## Credits

This flaw was found by the Cisco Systems Information Security Team and Cameron Morris.

## Disclaimer

This or previous program is for Educational purpose ONLY. Do not use it without permission. The usual disclaimer applies, especially the fact that me (t0kx) is not liable for any damages caused by direct or indirect use of the information or functionality provided by these programs. The author or any Internet provider bears NO responsibility for content or misuse of these programs or any derivatives thereof. By using these programs you accept the fact that any damage (dataloss, system crash, system compromise, etc.) caused by the use of these programs is not t0kx's responsibility.
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →