All Projects → jvoisin → Php Malware Finder

jvoisin / Php Malware Finder

Licence: lgpl-3.0
Detect potentially malicious PHP files

Projects that are alternatives of or similar to Php Malware Finder

Multiscanner
Modular file scanning/analysis framework
Stars: ✭ 494 (-60.32%)
Mutual labels:  malware, yara, antivirus
Yobi
Yara Based Detection Engine for web browsers
Stars: ✭ 39 (-96.87%)
Mutual labels:  malware, antivirus, yara
Mquery
YARA malware query accelerator (web frontend)
Stars: ✭ 264 (-78.8%)
Mutual labels:  malware, yara
Freki
🐺 Malware analysis platform
Stars: ✭ 285 (-77.11%)
Mutual labels:  malware, yara
Hacktheworld
An Python Script For Generating Payloads that Bypasses All Antivirus so far .
Stars: ✭ 527 (-57.67%)
Mutual labels:  malware, antivirus
Ursadb
Trigram database written in C++, suited for malware indexing
Stars: ✭ 72 (-94.22%)
Mutual labels:  malware, yara
freki
🐺 Malware analysis platform
Stars: ✭ 327 (-73.73%)
Mutual labels:  malware, yara
Phpmussel
PHP-based anti-virus anti-trojan anti-malware solution.
Stars: ✭ 337 (-72.93%)
Mutual labels:  malware, antivirus
apooxml
Generate YARA rules for OOXML documents.
Stars: ✭ 34 (-97.27%)
Mutual labels:  malware, yara
Manalyze
A static analyzer for PE executables.
Stars: ✭ 701 (-43.69%)
Mutual labels:  malware, yara
Mitigating Web Shells
Guidance for mitigation web shells. #nsacyber
Stars: ✭ 698 (-43.94%)
Mutual labels:  yara, webshell
Yargen
yarGen is a generator for YARA rules
Stars: ✭ 795 (-36.14%)
Mutual labels:  malware, yara
MalwareHashDB
Malware hashes for open source projects.
Stars: ✭ 31 (-97.51%)
Mutual labels:  malware, antivirus
MSE
Malware sample exchange system and API intended for Anti-Virus companies and researchers.
Stars: ✭ 14 (-98.88%)
Mutual labels:  malware, antivirus
fake-sandbox
👁‍🗨 This script will simulate fake processes of analysis sandbox/VM software that some malware will try to avoid.
Stars: ✭ 110 (-91.16%)
Mutual labels:  malware, antivirus
Apkid
Android Application Identifier for Packers, Protectors, Obfuscators and Oddities - PEiD for Android
Stars: ✭ 999 (-19.76%)
Mutual labels:  yara, antivirus
r2yara
r2yara - Module for Yara using radare2 information
Stars: ✭ 30 (-97.59%)
Mutual labels:  malware, yara
malice-av
Malice AntiVirus Plugins
Stars: ✭ 98 (-92.13%)
Mutual labels:  malware, antivirus
Thefatrat
Thefatrat a massive exploiting tool : Easy tool to generate backdoor and easy tool to post exploitation attack like browser attack and etc . This tool compiles a malware with popular payload and then the compiled malware can be execute on windows, android, mac . The malware that created with this tool also have an ability to bypass most AV softw…
Stars: ✭ 5,944 (+377.43%)
Mutual labels:  malware, antivirus
Malware Ioc
Indicators of Compromises (IOC) of our various investigations
Stars: ✭ 955 (-23.29%)
Mutual labels:  malware, yara

Build Status

PHP Malware Finder

 _______  __   __  _______
|  ___  ||  |_|  ||       |
| |   | ||       ||    ___|
| |___| ||       ||   |___   Webshell finder,
|    ___||       ||    ___|   kiddies hunter,
|   |    | ||_|| ||   |		website cleaner.
|___|    |_|   |_||___|

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:

Of course it's trivial to bypass PMF, but its goal is to catch kiddies and idiots, not people with a working brain. If you report a stupid tailored bypass for PMF, you likely belong to one (or both) category, and should re-read the previous statement.

How does it work?

Detection is performed by crawling the filesystem and testing files against a 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, unzipped, and then passed to some dangerous function like system".

Installation

  • Install Yara.
    This is also possible via some Linux package managers:
    • Debian: sudo apt-get install yara
    • Red Hat: yum install yara (requires the EPEL repository)

You can also compile it from source:

git clone [email protected]:VirusTotal/yara.git
cd yara/
YACC=bison ./configure
make
  • Download php-malware-finder git clone https://github.com/jvoisin/php-malware-finder.git

How to use it?

$ ./phpmalwarefinder -h
Usage phpmalwarefinder [-cfhtvl] <file|folder> ...
    -c  Optional path to a rule file
    -f  Fast mode
    -h  Show this help message
    -t  Specify the number of threads to use (8 by default)
    -v  Verbose mode

Or if you prefer to use yara:

$ yara -r ./php.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.

Oh, and by the way, you can run the comprehensive testsuite with make tests.

Whitelisting

Check the whitelist.yar file. If you're lazy, you can generate whitelists for entire folders with the generate_whitelist.py script.

Why should I use it instead of something else?

Because:

  • It doesn't use a single rule per sample, since it only cares about finding malicious patterns, not specific webshells
  • It has a complete testsuite, to avoid regressions
  • Its whitelist system doesn't rely on filenames
  • It doesn't rely on (slow) entropy computation
  • It uses a ghetto-style static analysis, instead of relying on file hashes
  • Thanks to the aforementioned pseudo-static analysis, it works (especially) well on obfuscated files

Licensing

PHP-malware-finder is licensed under the GNU Lesser General Public License v3.

The amazing YARA project is licensed under the Apache v2.0 license.

Patches, whitelists or samples are of course more than welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].