Download the PHP package scr34m/php-malware-scanner without Composer

On this page you can find all versions of the php package scr34m/php-malware-scanner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-malware-scanner

PHP malware scanner

Traversing directories for files with php extensions and testing files against text or regexp rules, the rules based on self gathered samples and publicly available malwares/webshells. The goal is to find infected files and fight against kiddies, because to easy to bypass rules.

How to install?

Simply clone the repository or with composer install globally composer global require scr34m/php-malware-scanner.

How to use?

Ignore argument could be used multiple times and accept glob style matching ex.: "cache*", "??-cache.php" or "/cache" etc.

Extension argument defaults to ".php" and also can be used multiple times too.

Output formatting

Default output depending on the specified parameters, but the full format is "%S %T %M # {%F} %C %P # %L" and using ANSI coloring too.

Possible variables are:

Patterns

There are three main pattern files the cover different types of pattern matching. There is one pattern per line. All lines where the very first character is a "#" is considered a comment and not used as a pattern. Whitespace in the pattern files is not used.

Whitelisting

See whitelist.txt file for a predefined MD5 hash list. Only the first 32 characters are used, rest of the line ignored so feel free to leave a comment.

Wordpress md5 sum whitelisting

You can automatically add md5sum from wordpress core files by specifing version as argument to --wordpress-version or -j. Example:

That will automatically get md5sums from wordpress api (https://api.wordpress.org/core/checksums/1.0/?version=x.x.x) and add it to whitelist. To check your version simply check wp-includes/version.php file of your wordpress

Combined whitelist

This list is a pre generated database for opensource projects more information at https://scr34m.github.io/php-malware-scanner/ site. The scanner check for database hash validity and only download if it is different and of course when argument used.

Tools

text2base64.py

Takes a plaintext string as input and returns 3 base64 string equivalents. Python script that needs to be executed from the terminal to be used.

It is worth noting that the presence of one of the three output strings in a block of text does not 100% guarantee that the string was present in the original code. It is guaranteed that IF the subject string was present in the original code, then one of the three output strings will be present in the base64 version.

An example: The presence of 'YmFzZTY0X2RlY29kZ' does not guarantee that 'base64_decode' is in the plain text code.
It is guaranteed that IF 'base64_decode' was present in the plain text code, then one of these three base64 strings WILL be present. The presence of 'YmFzZTY0X2RlY29kZ' in a block of code may be because 'ase64_decod' was in the original code.
ote the missing edge characters which is due to bit misalignment and character bleed.

Using as library

The scan.php perform a check, that it's called by commandline or not, so to use as library use different directory than scan.php it self.

Resources

Licensing

PHP malware scanner is licensed under the GNU General Public License v3.


All versions of php-malware-scanner with dependencies

PHP Build Version
Package Version
Requires php Version >=5.2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package scr34m/php-malware-scanner contains the following files

Loading the files please wait ....