You can use phpggc to generate payloads.
https://i.blackhat.com/us-18/Thu-August-9/us-18-Thomas-Its-A-PHP-Unserialization-Vulnerability-Jim-But-Not-As-We-Know-It.pdfarrow-up-right
If you can upload a file that is a valid PHAR:
Phar file
Tar file
Zip file
Image polyglot
Then if that file is opened with the phar:// protocol, then insecure deserialization can occur.
phar://
So basically, to execute the attack, you need two things:
Uploaded valid phar archive with malicious content
Injection into a filesystem call, where you can specify the phar:// protocol and open up the archive
Last updated 4 years ago