├── .gitattributes ├── Dockerfile ├── README.md ├── access ├── get_int.php └── index.php ├── conf ├── index.php ├── unixodbc.conf ├── users.basic └── users.digest ├── db2 ├── get_int.php └── index.php ├── dbs ├── access │ └── testdb.mdb ├── firebird │ └── testdb.fdb ├── index.php └── sqlite │ ├── testdb.sqlite │ └── testdb.sqlite3 ├── deployment.sh ├── docker ├── docker-compose.yml └── run.sh ├── firebird ├── get_int.php ├── get_int_inline.php ├── get_int_nooutput.php ├── get_int_partialunion.php └── index.php ├── hsqldb ├── META-INF │ └── MANIFEST.MF ├── README.md ├── WEB-INF │ └── web.xml ├── index.html └── src │ ├── Register.java │ └── ViewRecords.java ├── index.php ├── informix ├── get_int.php └── index.php ├── ingres ├── get_int.php └── index.php ├── libs ├── access.inc.php ├── db2.inc.php ├── firebird.inc.php ├── firebird_user.inc.php ├── index.php ├── informix.inc.php ├── ingres.inc.php ├── maxdb.inc.php ├── maxdb_user.inc.php ├── mssql.inc.php ├── mssql_user.inc.php ├── mysql.inc.php ├── mysql_user.inc.php ├── oracle.inc.php ├── oracle_user.inc.php ├── pgsql.inc.php ├── pgsql_user.inc.php ├── sqlite.inc.php ├── sqlite3.inc.php ├── sybase.inc.php └── sybase_user.inc.php ├── maxdb ├── get_int.php └── index.php ├── mssql ├── cookie_brackets.php ├── cookie_dstr.php ├── cookie_int.php ├── cookie_str.php ├── get_brackets.php ├── get_dstr.php ├── get_int.php ├── get_int_partialunion.php ├── get_str.php ├── header_brackets.php ├── header_dstr.php ├── header_str.php ├── iis │ ├── get_int.asp │ ├── get_int_having.asp │ ├── get_int_partialunion.asp │ ├── get_proc.asp │ ├── get_str.asp │ ├── get_str2.asp │ └── post_str.asp ├── index.php ├── post_brackets.php ├── post_dstr.php ├── post_int.php └── post_str.php ├── mysql ├── basic │ ├── .htaccess │ └── get_int.php ├── cookie_brackets.php ├── cookie_dstr.php ├── cookie_int.php ├── cookie_str.php ├── cookie_str2.php ├── csrf │ ├── index.php │ └── post.php ├── digest │ ├── .htaccess │ └── get_int.php ├── get_brackets.php ├── get_dstr.php ├── get_dstr_like_par.php ├── get_dstr_like_par2.php ├── get_int.php ├── get_int_benchmark.php ├── get_int_blob.php ├── get_int_filtered.php ├── get_int_groupby.php ├── get_int_having.php ├── get_int_img.php ├── get_int_inline.php ├── get_int_international.php ├── get_int_limit.php ├── get_int_limit_second.php ├── get_int_noerror.php ├── get_int_nolimit.php ├── get_int_nooutput.php ├── get_int_orderby.php ├── get_int_partialunion.php ├── get_int_rand.php ├── get_int_redirected.php ├── get_int_redirected_true.php ├── get_int_reflective.php ├── get_int_substr.php ├── get_int_user.php ├── get_str.php ├── get_str2.php ├── get_str_brackets.php ├── get_str_like.php ├── get_str_like_par.php ├── get_str_like_par2.php ├── get_str_like_par3.php ├── get_str_noout.php ├── get_str_or.php ├── get_str_union.php ├── header_brackets.php ├── header_dstr.php ├── header_str.php ├── iis │ ├── get_int_41.asp │ ├── get_int_41.aspx │ ├── get_int_50.asp │ ├── get_int_50.aspx │ ├── get_int_51.asp │ ├── get_int_51.aspx │ ├── get_int_60.asp │ └── get_int_60.aspx ├── img │ ├── bad.png │ └── ok.png ├── index.php ├── post_brackets.php ├── post_dstr.php ├── post_int.php ├── post_str.php └── referer_str.php ├── oracle ├── get_int.jsp ├── get_int.php ├── get_int_groupby.php ├── get_int_having.php ├── get_int_inline.php ├── get_int_nooutput.php ├── get_int_orderby.php ├── get_int_partialunion.php ├── get_int_unpriv.php ├── get_int_unpriv_partial.php ├── index.php └── post_int.php ├── pgsql ├── cookie_brackets.php ├── cookie_dstr.php ├── cookie_int.php ├── cookie_str.php ├── get_brackets.php ├── get_dstr.php ├── get_int.php ├── get_int8.2.php ├── get_int8.4.php ├── get_int_groupby.php ├── get_int_having.php ├── get_int_inline.php ├── get_int_noerror.php ├── get_int_nooutput.php ├── get_int_orderby.php ├── get_int_partialunion.php ├── get_int_user.php ├── get_str.php ├── header_brackets.php ├── header_dstr.php ├── header_str.php ├── iis │ ├── get_int_82.asp │ ├── get_int_82.aspx │ ├── get_int_83.asp │ ├── get_int_83.aspx │ ├── get_int_84.asp │ └── get_int_84.aspx ├── index.php ├── post_brackets.php ├── post_dstr.php ├── post_int.php └── post_str.php ├── schema ├── access.sql ├── db2.sql ├── firebird.sql ├── index.php ├── informix.sql ├── ingres.sql ├── maxdb.sql ├── mssql.sql ├── mssql_proc.sql ├── mysql.sql ├── oracle.sql ├── pgsql.sql ├── sqlite.sql ├── sqlite3.sql └── sybase.sql ├── sqlite ├── get_int.php ├── get_int_3.php ├── get_int_3_inline.php ├── get_int_3_nooutput.php ├── get_int_3_partialunion.php ├── get_int_inline.php ├── get_int_partialunion.php ├── get_str_3.php └── index.php └── sybase ├── get_int.php └── index.php /.gitattributes: -------------------------------------------------------------------------------- 1 | *.php text eol=lf 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian/eol:wheezy 2 | 3 | # Updating base system 4 | RUN apt-get update 5 | RUN apt-get upgrade -y 6 | 7 | # Installing Apache, PHP, git and generic PHP modules 8 | RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y install apache2 libapache2-mod-php5 git php5-dev php5-gd php-pear \ 9 | php5-mysql php5-pgsql php5-sqlite php5-interbase php5-sybase \ 10 | php5-odbc unzip make libaio1 bc screen htop git \ 11 | subversion sqlite sqlite3 mysql-server mysql-client libmysqlclient-dev \ 12 | netcat libssl-dev libtool zlib1g-dev libc6-dev 13 | 14 | # Configuring Apache and PHP 15 | RUN rm /var/www/index.html 16 | RUN mkdir /var/www/test 17 | RUN chmod 777 /var/www/test 18 | RUN a2enmod auth_basic auth_digest 19 | RUN sed -i 's/AllowOverride None/AllowOverride AuthConfig/' /etc/apache2/sites-enabled/* 20 | RUN sed -i 's/magic_quotes_gpc = On/magic_quotes_gpc = Off/g' /etc/php5/*/php.ini 21 | 22 | # Copy sqlmap test environment to /var/www 23 | COPY . /var/www/sqlmap/ 24 | WORKDIR /var/www/sqlmap 25 | 26 | # Listen on port 80 27 | EXPOSE 80 28 | 29 | CMD ["/var/www/sqlmap/docker/run.sh"] 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SQL injection test environment 2 | 3 | A collection of web pages vulnerable to SQL injection flaws and more: 4 | * `conf/` - operating system configuration files used by `deployment.sh`. 5 | * `dbs/` - standalone databases for some database management systems (e.g. Microsoft Access). 6 | * `libs/` - web API libraries to connect to the database management system, perform the provided statement and return its output. 7 | * `schema/` - SQL used to create the test database, a test table and populate it with test entries. 8 | * Other directories - vulnerable pages for each database management system. 9 | * `deployment.sh` - A bash script to deploy from scratch a fully-fledged Linux (Debian or Ubuntu) machine with all the relevant database management systems installed and configured, ready to be targeted. 10 | -------------------------------------------------------------------------------- /access/get_int.php: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /access/index.php: -------------------------------------------------------------------------------- 1 |