Skip to content

Instantly share code, notes, and snippets.

@ccare
Last active August 29, 2015 14:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ccare/d4bbc980a3e7d47beac7 to your computer and use it in GitHub Desktop.
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>
#!/bin/dash
for pid in `ps -Ao pid | grep -v PID`; do xargs -n 1 -0 <"/proc/$pid/environ" | grep -e '=()'; done
@ccare
Copy link
Author

ccare commented Sep 25, 2014

Ideally run as root to access all process info. Works in BASH, but I think it's best to use DASH at the moment :)

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