Sploitus

Exploit for CVE-2021-3129

githubexploit · 2021-01-22

Exploit Code

README21 lines
## https://sploitus.com/exploit?id=5E9C0870-F853-5E81-8E8C-A056A9C414DE
# CVE-2021-3129  
Laravel Debug RCE  

# How to use  
Run `docker-compose up -d` to start the environment.  
After accessing port 8888, click on “generate key” on the homepage to reproduce the attack.  

Some points about the Docker environment:  
- Copy .env.example into .env to enable the debug environment.  
- Disabled phar.readonly in php.ini.  
- Added a hello template in resources/view and referenced an undefined variable. Also added routes in routes/web.php (added this in the source code; not written in the dockerfile).  

# Reproducing the effect  
![Reproducing the effect](https://raw.githubusercontent.com/SNCKER/CVE-2021-3129/master/pic/1.jpg)  

The script has been released. It should be in the same directory as the phpggc project folder. The universality isn’t strong (at least it works in my environment). Everyone can add other RCE chains from phpggc to improve the effectiveness of the attack.  
# Reference resources:  
https://www.ambionics.io/blog/laravel-debug-rce  
https://xz.aliyun.com/t/9030#toc-3  
https://blog.csdn.net/csdn_Pade/article/details/112974809