Skip to content

A simple static application security testing (SAST) tool for locating dangerous sinks in php applications.

Notifications You must be signed in to change notification settings

angelej/php-insider

Repository files navigation

PHP-Insider

Unit Tests

PHP-Insider is a static application security testing tool (SAST), which is specialized in finding dangerous sinks. It's not designed to be a fully-automated tool for identifying vulnerabilities, but rather an aid for analysts finding them.

Warning! This repository is currently under development and may contain breaking changes.

Installation

If this tool is used without docker, you have to install php ^8.2, ext-dom, ext-simplexml, ext-tokenizer, ext-xml, ext-xmlwriter, and composer.

  1. Clone repository
    git clone https://github.com/angelej/php-insider.git
    cd php-insider
  2. Install dependencies
    composer install

Basic Usage

Without using Docker

insider@linux:~$ ./bin/insider analyse /path/to/app
   ExecSink  found in file src/Command.php › Ⓒ Command › ⓜ execute 
        5▕     public function execute(string $cmd){
        6▕ 
    ➜   7▕         return exec($cmd);
        8▕     }
        9▕ }


   Summary:  1 sink found

Using Docker

insider@linux:~$ docker run --rm -it -v /path/to/app:/app angelej/php-insider:latest analyse /app/src
   ExecSink  found in file src/Command.php › Ⓒ Command › ⓜ execute 
        5▕     public function execute(string $cmd){
        6▕ 
    ➜   7▕         return exec($cmd);
        8▕     }
        9▕ }


   Summary:  1 sink found

Level

The level can be defined using the -l|--level command option. The higher the level, the more selective the analysis.

Level Description
0 (default) all supported sinks
1 sinks with dynamic variables

Supported Sinks

Code Execution

File Inclusion

File Read

File Write

Information Disclosure


Testing

composer test

Security Vulnerabilities

If you discovered a security vulnerability, please send an e-mail to jeremy.angele@proton.me. All security vulnerabilities will be promptly addressed.

About

A simple static application security testing (SAST) tool for locating dangerous sinks in php applications.

Topics

Resources

Stars

Watchers

Forks