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

目标: 1000 元 · 已筹: 1336

100%

CVE-2018-15133 PoC — Laravel Framework 安全漏洞

来源
关联漏洞
标题: Laravel Framework 安全漏洞 (CVE-2018-15133)
Description:Laravel framework是软件开发者Taylor Otwell开发的一款基于PHP的Web应用程序开发框架。 Laravel framework 5.5.40及之前版本和5.6.x版本至5.6.29版本中存在安全漏洞。远程攻击者可借助应用程序的密钥利用该漏洞执行代码。
Description
Exploit for Laravel Remote Code Execution with API_KEY (CVE-2018-15133)
介绍
# Laravel exploit for CVE-2018-15133

This code exploit [CVE-2018-15133](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-15133) and it is based on [kosmiz's PoC](https://github.com/kozmic/laravel-poc-CVE-2018-15133) and [Metasploit's exploit](https://www.exploit-db.com/exploits/47129) for this vulnerability. I pretty much just did this for a box in [Hack The Box](https://www.hackthebox.eu/), because I did not want to use Metasploit at the moment and as a excuse for practicing Python.

From the CVE's Description:

In Laravel Framework through 5.5.40 and 5.6.x through 5.6.29, remote code execution might occur as a result of an unserialize call on a potentially untrusted X-XSRF-TOKEN value. This involves the decrypt method in Illuminate/Encryption/Encrypter.php and PendingBroadcast in gadgetchains/Laravel/RCE/3/chain.php in phpggc. The attacker must know the application key, which normally would never occur, but could happen if the attacker previously had privileged access or successfully accomplished a previous attack.

Install dependencies:

```
pip install -r requirements.txt
```

### Usage

```
usage: pwn_laravel.py [-h] [-c COMMAND] [-m {1,2,3,4}] [-i] URL API_KEY
```

![Demo](pwn.png)

## IMPORTANT

This code was created for educational use not anything illegal. Whatever you do it's your own responsibility.

### References

* [kozmic's PoC in PHP](https://github.com/kozmic/laravel-poc-CVE-2018-15133)
* [Metasploit exploit in Ruby](https://www.exploit-db.com/exploits/47129)
* [Pull request of fix by Laravel](https://github.com/laravel/framework/pull/25121/commits/d84cf988ed5d4661a4bf1fdcb08f5073835083a0)
* [CVE-2018-15133](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-15133)
文件快照

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

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