PHP Security Scanner β€” Automated Vulnerability Detection for PHP Applications: File Upload, LFI/RFI, SQLi & XSS Checks

Blacksec

Administrator
Staff member
πŸ” PHP SECURITY SCANNER πŸ”Automated Vulnerability Detection β€’ File Upload β€’ LFI/RFI β€’ SQLi β€’ XSS β€’ Config Audit

⚑ PHP SCANNER: Automated PHP security scanner that analyzes source code for common vulnerabilities. Detects file upload flaws, local/remote file inclusion, SQL injection, XSS, and configuration issues. Essential for auditing your own code or analyzing target applications.

SCANNER FEATURES
ModuleChecks ForDetection MethodFalse Positive Rate
File UploadUnrestricted upload, missing extension check, missing MIME validationStatic analysis + regex patternsLow (10%)
LFI/RFIinclude/require with user input, wrappers, directory traversalTaint analysis + pattern matchingMedium (20%)
SQL InjectionUnsanitized input in queries, no prepared statementsTaint analysis + AST parsingMedium (15%)
XSSUnescaped output, $_GET/$_POST in echo, missing htmlspecialcharsTaint analysisHigh (30%)
Command Injectionshell_exec, exec, system with user inputPattern matchingLow (5%)
Deserializationunserialize() with user inputPattern matchingLow (5%)
Config Auditdisplay_errors, allow_url_fopen, register_globalsParse php.ini and config filesVery Low (2%)
Backdoor DetectionBase64 eval, gzinflate, str_rot13 patternsRegex + entropy analysisMedium (25%)

USAGE EXAMPLES
Code:
1. Scan a PHP file:
   php php_scanner.php --file target.php
   
   Output:
   ═══ PHP Security Scanner v3.1 ═══
   File: target.php
   Lines: 245
   
   πŸ”΄ HIGH: SQL Injection in login.php:42
     Query: mysql_query("SELECT * FROM users WHERE user='" . $_POST['user'] . "'")
     Fix: Use prepared statements with PDO or MySQLi
   
   πŸ”΄ HIGH: File Upload Vulnerability in upload.php:88
     No extension validation on uploaded file
     Attacker can upload .php shell
     Fix: validate extension, MIME type, rename file
   
   🟑 MEDIUM: XSS in profile.php:156
     echo $_GET['message'] without sanitization
     Fix: add htmlspecialchars() escaping
   
   🟒 INFO: Register Globals emulation detected in config.php
     Suggests: disable register_globals (PHP 8 removed it)
   
   Summary: 2 High, 1 Medium, 1 Info

2. Scan entire project:
   php php_scanner.php --dir /var/www/html --recursive --output report.html
   # Scans all .php, .inc, .phtml files recursively
   # Generates HTML report with code snippets

3. Interactive mode:
   php php_scanner.php --file target.php --interactive
   # Shows each finding and asks if it's a false positive
   # Learn from the bot: it explains WHY it flagged the code

4. CI/CD integration:
   php php_scanner.php --dir . --fail-on high
   # Exit code 1 if any HIGH severity finding
   # Integrate into pre-commit hook or CI pipeline

DOWNLOAD
Code:
PHP Security Scanner: [URL="https://mega.nz/file/BlackSec_PHPScanner_2026"]File on MEGA[/URL]
Size: 2.5 MB | Password: PHPScanner2026
Includes: Scanner script + rule database + report templates + CI examples + user guide

πŸ” Secure your PHP code or someone else will. Scan before you deploy. πŸ”
 
Top