Last active
August 29, 2015 14:06
-
-
Save ccare/d4bbc980a3e7d47beac7 to your computer and use it in GitHub Desktop.
Hunt for suspicious env-vars possibly relating to ShellShock <http://seclists.org/oss-sec/2014/q3/650>
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
#!/bin/dash | |
for pid in `ps -Ao pid | grep -v PID`; do xargs -n 1 -0 <"/proc/$pid/environ" | grep -e '=()'; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ideally run as root to access all process info. Works in BASH, but I think it's best to use DASH at the moment :)