Guest User

Untitled

a guest
Oct 24th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #!/bin/bash
  2. # - Matches on source and compiled code
  3. # - Searches in user home directories by default
  4. # - Detects certain strings in files smaller 300 kbyte
  5. # - Does not print anything if nothing was found
  6. # - Appends the file's time stamp of the files in question > good indicator to spot false positives
  7. # - Should work on most Linux systems with bash
  8. for f in $(find /home/ -type f -size -300 2> /dev/null); do if [[ $(strings -a "$f" 2> /dev/null | egrep "/proc/(self|%d)/mem") != "" ]];then m=$(stat -c %y $f); echo "Contains DirtyCOW string: $f MOD_DATE: $m"; fi; done;
Add Comment
Please, Sign In to add comment