Skip to content

Instantly share code, notes, and snippets.

@danreb
Last active August 9, 2018 18:20
Show Gist options
  • Save danreb/ebf3a5bf1c4cfdd5e704 to your computer and use it in GitHub Desktop.
Save danreb/ebf3a5bf1c4cfdd5e704 to your computer and use it in GitHub Desktop.
Find all PHP code with base64_decode - useful to find suspected hacker files
find /home/HOMEDIR/public_html \( -name "*.php" \) -type f -print0 | xargs -0 grep --binary-files=without-match -ir "base64_decode\s*("
#To find files that are new within the last 5 days
find /home/HOMEDIR/public_html/ -type f -ctime -5
# To find .pl, .cgi and .sh files
find /home/HOMEDIR/public_html/ \( -iname "*.cgi" -o -iname "*.pl" -o -iname "*.sh" \) -exec ls -hog {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment