• Stars
    star
    255
  • Rank 159,311 (Top 4 %)
  • Language
    PHP
  • Created almost 11 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A PHP version scanner for reporting possible vulnerabilities

versionscan

Build Status Total Downloads

Versionscan is a tool for evaluating your currently installed PHP version and checking it against known CVEs and the versions they were fixed in to report back potential issues.

PLEASE NOTE: Work is still in progress to adapt the tool to linux distributions that backport security fixes. As of right now, this only reports back for the straight up version reported.

Installation

Using Composer

{
    "require": {
        "psecio/versionscan": "dev-master"
    }
}

The only current dependency is the Symfony console.

Usage

To run the scan against your current PHP version, use:

bin/versionscan

The script will check the PHP_VERSION for the current instance and generate the pass/fail results. The output looks similar to:

Executing against version: 5.4.24
+--------+---------------+------+------------------------------------------------------------------------------------------------------+
| Status | CVE ID        | Risk | Summary                                                                                              |
+--------+---------------+------+------------------------------------------------------------------------------------------------------+
| FAIL   | CVE-2014-3597 | 6.8  | Multiple buffer overflows in the php_parserr function in ext/standard/dns.c in PHP before 5.4.32 ... |
| FAIL   | CVE-2014-3587 | 4.3  | Integer overflow in the cdf_read_property_info function in cdf.c in file through 5.19, as used in... |

Results will be reported back colorized as well to easily show the pass/fail of the check.

Parameters

There are several parameters that can be given to the tool to configure its scans and results:

PHP Version

If you'd like to define a PHP version to check other than the one the script finds itself, you can use the php-version parameter:

bin/versionscan scan --php-version=4.3.2

Report Only Failures

You can also tell the versionscan to only report back the failures and not the passing tests:

bin/versionscan scan --fail-only

Sorting results

You can also sort the results either by the CVE ID or by severity (risk rating), with the sort parameter and either the "cve" or "risk" value:

bin/versionscan scan --sort=risk

Output formats

By default versionscan will output information directly to the console in a human-readable result. You can also specify other output formats that may be easier to parse programatically (like JSON). Use the --format option to change the output:

vendor/bin/versionscan scan --php-version=5.5 --format=json

Supported output formats are console, json, xml and html.

The HTML output format requires an --output option of the directory to write the file:

vendor/bin/versionscan scan --php-version=5.5 --format=html --output=/var/www/output

The result will be written to a file named something like versionscan-output-20150808.html

More Repositories

1

iniscan

A php.ini scanner for best security practices
PHP
1,477
star
2

gatekeeper

Gatekeeper: An Authentication & Authorization Library
PHP
366
star
3

parse

Parse: A Static Security Scanner
PHP
357
star
4

secure_dotenv

A secure .env handler with encrypted key/value storage
PHP
117
star
5

jwt

A JWT (JSON Web Token) Encoder & Decoder
PHP
110
star
6

propauth

A library for property-based policy evaluation
PHP
59
star
7

invoke

Invoke: Route Authentication/Authorization Management
PHP
36
star
8

canary

Canary: Input Detection and Response
PHP
30
star
9

pwdcheck

A password strength checking utility
PHP
21
star
10

secure-api

Repository for the "Building a Secure API" series on Websec.io
PHP
16
star
11

csrf

CSRF Token Generation Library
PHP
13
star
12

uri

A secure URI generation and validation library
PHP
12
star
13

verify

Framework Agnostic Authentication & Authorization
PHP
11
star
14

protected-env-example

An example (Docker environment) showing the protection of sensitive information from PHP's file read
PHP
10
star
15

rift

A vulnerable application for teaching the basics of web application security
CSS
9
star
16

security-bundle

A bundle of recommended PHP security libraries
8
star
17

validation

A simple little validation library
PHP
7
star
18

dbot

Discord bot platform for PHP
PHP
7
star
19

session-encrypt

An encrypted session handler
6
star
20

fortify

Fortify provides a single, simple interface for handling authentication and authorization
PHP
6
star
21

notch

Notch: A Vulnerable Application
PHP
4
star
22

oauth2-discord

A Discord provider for the League OAuth2 Client
PHP
4
star
23

gatekeeper-ui

A web interface for the Gatekeeper Access Control System
JavaScript
3
star
24

gatekeeper-cli

A command line tool for the Gatekeeper auth framework
PHP
2
star
25

authorize

A comprehensive authorization library (ACL, RBAC, PBAC)
PHP
1
star
26

phpsecinfo

Code for the phpsecinfo.com site
PHP
1
star
27

userappio

An API library for using the UserApp.io Service
PHP
1
star
28

securingphp

Source for the Securing PHP website
PHP
1
star
29

vaultlib

A simple Vault client for PHP
PHP
1
star
30

statext

A PHP static site generator
PHP
1
star