Last active
September 4, 2023 22:33
-
-
Save ethanpil/b5fc976b9761783ed1b73d203a7148d6 to your computer and use it in GitHub Desktop.
Hacked Wordpress Command Line Tools
This file contains hidden or 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 suspicious php files | |
find . -type f -name '*.php' | xargs egrep -i "(mail|fsockopen|pfsockopen|stream\_socket\_client|exec|system|passthru|eval|base64_decode) *(" | |
# Find suspicious images | |
find wp-content/uploads -type f -iname '*.jpg' | xargs grep -i php | |
#Find iframes | |
find . -type f -name '*.php'| grep -i '<iframe' | |
#Find files modified in last 3 days | |
find . -type f -name '*.php' -ctime -3 | |
# Verify checksums of code and identify unexpected files | |
wp core verify-checksums | |
wp plugin verify-checksums --all | |
# WP-CLI Force refresh of all wordpress plugins and theme files | |
wp core download --force | |
wp plugin install $(wp plugin list --field=name) --force | |
wp theme install $(wp theme list --field=name) --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment