-
-
Save Deesen/be019ffe9e5cbdbf30810dbae7025c44 to your computer and use it in GitHub Desktop.
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
Moved to https://github.com/extras-evolution/evocheck |
Great idea! Tested on my compromised server, but gives a 404.
--> Oops. Renamed to evohacked.php, works like a charm now.
Improved it quite a lot, now it supports RegEx etc. New screenshots at modxcms/evolution#937 (comment)
Last screenshots at modxcms/evolution#937 (comment)
Nice Idea, i have improved the search term a bit:
$search_term = $this->search_term ? $this->search_term : '(base64_decode\h*\(|eval\h*\(|system\h*\(|shell_exec\h*\(|<\?php[^\n]{200,}|\$GLOBALS\[\$GLOBALS\[|;\h*\$GLOBALS|\$GLOBALS\h*;)';
- It looks only for method calls (base64_decode, eval, system, shell_exec).
- Initial <?php lines with long code (PHP code is hidden in normal text editors without auto line break - finds MODX cache files too).
- Some $GLOBALS usages not occurring in normal code.
Maybe the code could query a MODX manager account and password instead of having an own password there.
- \h looks for horizontal spaces (available since PHP 5.2.2).
Thank you Jako, exactly what we needed. We moved the tool to https://github.com/extras-evolution/evocheck
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems great i go test this on one of the hacked sites.