Php malware finder-Detect potentially malicious PHP files.
What does it detect?
PHP-malware-finder does its very best to detect obfuscated/dodgy code as well as files using PHP functions often used in malwares/webshells.The following list of encoders/obfuscators/webshells are also detected:
- Best PHP Obfuscator
- Carbylamine
- Cipher Design
- Cyklodev
- Joes Web Tools Obfuscator
- P.A.S
- PHP Jiami
- Php Obfuscator Encode
- SpinObf
- Weevely3
- atomiku
- cobra obfuscator
- phpencode
- tennc
- web-malware-collection
- webtoolsvn
- novahot
Detection is performed by crawling the filesystem and testing files against a How does it work?set of YARA rules. Yes, it's that simple!
Instead of using an hash-based approach, PMF tries as much as possible to use semantic patterns, to detect things like "a
$_GET
variable is decoded two times, unziped, and then passed to some dangerous function like system
".How to use it?
$ ./phpmalwarefinder -h
Usage phpmalwarefinder [-cfhtv] [-l (php|asp)] <file|folder> ...
-c Optional path to a configuration file
-f Fast mode
-h Show this help message
-t Specify the number of threads to use (8 by default)
-v Verbose mode
-l Set language ('asp', 'php')
Or if you prefer to use yara
:$ yara -r ./php.yar /var/www
$ yara -r ./asp.yar /var/www
Please keep in mind that you should use at least YARA 3.4 because we're using hashes for the whitelist system, and greedy regexps. Please note that if you plan to build yara from sources, libssl-dev must be installed on your system in order to have support for hashes.Ho, and by the way, you can run the comprehensive testsuite with
make tests
.
Post a Comment