Skip to content

bazz-066/FP-UG-ITS-2025-sqli-analysis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Analysis Tools for Detecting SQLi in PHP Code

This project implement Static Taint Analysis to detect SQL injection vulnerabilities in PHP Code. Using Taint Analysis, this tool trace unstrusted source until used in SQL query. Below some points about the internal implementation:

Web App

To visualize the SQLi vulnerabilities, run the web app by following these steps:

  1. Install golang-migrate and setup the db
migrate -source file://db/migrations -database [db-url] up
  1. Build and run the application
go build -o ./bin/web.exe ./cmd/web/
./bin/web.exe
  1. Access the web app url
    drawing drawing

Scanner

To build the scanner, you must have golang in your computer and run below command

make build-cli
or
go build -o ./bin/sqli-scanner.exe ./cmd/cli

Then, the binary placed in ./bin/sqli-scanner.exe can be execute using below command

./bin/sqli-scanner.exe [directory path] [option]

You need to specify the directory path which will be scanned and add some options, such as:

  • --host: web app host url
  • --out: json sqli report file path
  • --laravel: using laravel taint analysis rule
  • --help: see the program manual

Below the example of how the program run

PS D:\src\tugas-akhir\projects_datasets\WeBid> sqli-scanner . --host=http://localhost:8080
Scan 321 php files ...

Detected 22 sqli vulnerabilities in 11.51 second.
Result reported in 'result.json'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 95.9%
  • Vue 3.4%
  • Other 0.7%