Last active
August 9, 2018 18:20
-
-
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
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
find /home/HOMEDIR/public_html \( -name "*.php" \) -type f -print0 | xargs -0 grep --binary-files=without-match -ir "base64_decode\s*(" |
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
#To find files that are new within the last 5 days | |
find /home/HOMEDIR/public_html/ -type f -ctime -5 |
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
# 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