搭建环境:Kali Linux
DVWA(Damn Vulnerable Web Application)
是randomstorm的一个开源项目,用来进行安全脆弱性鉴定的PHP/MySQL Web应用,旨在为安全专业人员测试自己的专业技能和工具提供合法的环境,帮助web开发者更好的理解web应用安全防范的过程。
DVWA共有十个模块:
DVWA 1.9的代码分为四种安全级别:Low,Medium,High,Impossible。学习者可以通过比较四种级别的代码,接触到一些PHP代码审计的内容。
XAMPP
是一个易于安装且包含 MySQL、PHP 和 Perl 的 Apache 发行版。XAMPP 的确非常容易安装和使用:只需下载,安装,启动即可。
cd Downloads
chmod o+x chmod o+x xampp-linux-x64-5.6.30-0-installer.run
./xampp-linux-x64-5.6.30-0-installer.run
rm -f xampp-linux-x64-5.6.30-0-installer.run
启动所有服务
Starting MySQL Database…
Starting ProFTPD…
Checking syntax of configuration file
/opt/lampp/proftpd/scripts/ctl.sh : proftpd started
/opt/lampp/mysql/scripts/ctl.sh : mysql started at port 3306
使用http://localhost 或 http://127.0.0.1 测试服务是否启动
cd Downloads
unzip DVWA-master.zip
rm -rf /opt/lampp/htdocs/*
cp -r DVWA-master/. /opt/lampp/htdocs
编辑数据库信息
cd /opt/lampp/htdocs
vim config/config.inc.php
$_DVWA = array(); $_DVWA[ ‘db_server’ ] = ‘127.0.0.1’; $_DVWA[ ‘db_database’ ] = ‘dvwa’; $_DVWA[ ‘db_user’ ] = ‘root’; $_DVWA[ ‘db_password’ ] = ‘’
http://localhost 开始创建数据库
默认账户密码 admin password
进入DVWA Security选项卡,允许使用PHPIDS,调节安全等级
Low
,Medium
,High
,Impossible
至此,DVWA搭建完毕