Damn Vulnerable Web App
DVWA全稱Damn Vulnerable Web App 是一個包含漏洞的PHP/MySQL應用。它的主要目的是為專業的安全人員提供一個合法的環境去測試他們的工具和技能,它可以幫助Web開發人員更好地理解安全漏洞并開發出安全的Web應用,并為學生/教師學習Web安全提供一個可控的學習環境。
DVWA包含了常見的Web安全漏洞,并且分Low、Medium、High、Imposssible四個不同安全等級。每種漏洞有多種利用方式,這就需要你盡可能發現更多的安全問題。
DVWA下載地址:https://github.com/ethicalhack3r/DVWA
安裝環境
操作系統:CentOS6.8
Web應用:Xampp5.6.28,下載地址:https://www.apachefriends.org/index.html
安裝命令
##安裝Xampp
[root@hades02 ~]# chmod +x xampp-linux-x64-5.6.28-1-installer.run
[root@hades02 ~]# ./xampp-linux-x64-5.6.28-1-installer.run
----------------------------------------------------------------------------
Welcome to the XAMPP Setup Wizard.
----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want
to install. Click Next when you are ready to continue.
XAMPP Core Files : Y (Cannot be edited)
XAMPP Developer Files [Y/n] :y
Is the selection above correct? [Y/n]: y
----------------------------------------------------------------------------
Installation Directory
XAMPP will be installed to /opt/lampp
Press [Enter] to continue:
----------------------------------------------------------------------------
Setup is now ready to begin installing XAMPP on your computer.
Do you want to continue? [Y/n]: y
----------------------------------------------------------------------------
Please wait while Setup installs XAMPP on your computer.
Installing
0% ______________ 50% ______________ 100%
#########################################
----------------------------------------------------------------------------
Setup has finished installing XAMPP on your computer.
##啟動apache和mysql
[root@hades02 ~]# cd /opt/lampp/
[root@hades02 lampp]# ./ctlscript.sh status
proftpd not running
apache already running
mysql not running
[root@hades02 lampp]# ./ctlscript.sh start mysql
/opt/lampp/mysql/scripts/ctl.sh : mysql started at port 3306
Xampp已經安裝成功并啟動,在瀏覽器中輸入IP地址并訪問,如下圖所示
dvwa-install.png
紅色部分表示配置有問題,如果不解決可能會導致一些漏洞無法利用,如下配置可以解決紅色報錯問題(reCAPTCHA key在這里可以暫時忽略)
[root@hades02 lampp]# chmod 777 htdocs/hackable/uploads/
[root@hades02 lampp]# chmod 777 htdocs/external/phpids/0.6/lib/IDS/tmp/phpids_log.txt
[root@hades02 lampp]# vi etc/php.ini
898 allow_url_include=On #大概在898行的位置,修改Off為On
[root@hades02 lampp]# vi htdocs/config/config.inc.php
15 $_DVWA[ 'db_server' ] = '127.0.0.1';
16 $_DVWA[ 'db_database' ] = 'dvwa';
17 $_DVWA[ 'db_user' ] = 'root';
18 $_DVWA[ 'db_password' ] = ''; #xampp默認mysql沒有密碼,這里留空
然后點擊“Creat/Reset Database”創建數據庫,提示成功就就可以登錄了,默認登錄帳號密碼:admin/password,設置安全等級為“Low”,就可以進行實驗了.
dvwa-install.png
<全文完>