Skip to content

Instantly share code, notes, and snippets.

@dalehamel
Created January 28, 2015 01:31
Show Gist options
  • Save dalehamel/04b2c54c903871cdc400 to your computer and use it in GitHub Desktop.
Save dalehamel/04b2c54c903871cdc400 to your computer and use it in GitHub Desktop.
Ghost detector
# Update glibc to your systems recommended patched version first
# As root, run this. If you're system is ok, you'll see nothing. Otherwise, this will tell you all infected processes.
for proc in $(ls /proc); do if [ -e /proc/$proc/maps ];then if [ -n "`cat /proc/$proc/maps | grep -i libc- | grep -i deleted`" ];then echo $proc; echo "CMDLINE"; cat /proc/$proc/cmdline; echo -e "CMDLINE\n"; cat /proc/$proc/maps | grep -i libc- | grep -i deleted; fi fi done
@dalehamel
Copy link
Author

for proc in $(ls /proc); do if [ -e /proc/$proc/maps ];then if [ -n "cat /proc/$proc/maps | grep -i $1 | grep -i deleted" ];then echo $proc; echo "CMDLINE"; cat /proc/$proc/cmdline; echo -e "CMDLINE\n"; cat /proc/$proc/maps | grep -i $1 | grep -i deleted; fi fi done

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