Skip to content

Python script to detect vulnerabilities inside PHP source code using static analysis, based on regex

License

Notifications You must be signed in to change notification settings

ehabhussein/Vulny-Code-Static-Analysis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VulnyCode - PHP Code Static Analysis

Python 3.4+

Basic script to detect vulnerabilities into a PHP source code, it is using Regular Expression to find sinkholes.

╭─ 👻 swissky@crashlab: ~/Github/PHP_Code_Static_Analysis  ‹master*›
╰─$ python index.py --dir test    
------------------------------------------------------------
Analyzing 'test' source code
------------------------------------------------------------
Potential vulnerability found : File Inclusion
Line 19 in test/include.php
Code : include($_GET['patisserie'])
------------------------------------------------------------
Potential vulnerability found : Insecure E-mail
Line 2 in test/mail.php
Code : mail($dest, "subject", "message", "", "-f" . $_GET['from'])
Declared at line 1 : $dest = $_GET['who'];

Currently detecting :

  • SQL injection
  • Local File Inclusion
  • Insecure emails
  • Cross Site Scripting
  • Remote Commands Execution
  • LDAP injection
  • XPATH injection
  • PHP Objet Injection
  • Header injection
  • URL redirection
  • Hardcoded credential
  • High Entropy string

if you want to export each vulnerabilities type into a folder use the "export.sh"

Don't forget to read the license ;)

About

Python script to detect vulnerabilities inside PHP source code using static analysis, based on regex

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 59.9%
  • PHP 36.8%
  • Shell 3.3%