我是靠谱客的博主 超级发夹,这篇文章主要介绍kali下DVWA靶场的搭建,现在分享给大家,希望可以做个参考。

1.下载及解压

1.首先切到 /var/www/htm/ 文件夹下

cd /var/www/html

2.下载DVWA压缩包

wget https://github.com/digininja/DVWA/archive/master.zip

3.解压

unzip master.zip

2.DVWA配置

1.DVWA System error - config file not found.
Copy config/config.inc.php.dist to config/config.inc.php configure to your environment.

cd DVWA-master/config
cp config.inc.php.dist config.inc.php

2.configure to your environment
在这里插入图片描述
问题1:权限设置
[User: root] Writable folder /var/www/html/DVWA-master/hackable/uploads/: No
[User: root] Writable file /var/www/html/DVWA-master/external/phpids/0.6/lib/IDS/tmp/phpids_log.txt: No
[User: root] Writable folder /var/www/html/DVWA-master/config: No

cd ..
chmod -R 777 /var/www/html/DVWA-master/hackable/uploads/
chmod -R 777 /var/www/html/DVWA-master/external/phpids/0.6/lib/IDS/tmp/
chmod -R 777 /var/www/html/DVWA-master/config/

在这里插入图片描述
问题2:配置php.ini文件
If you see disabled on either allow_url_fopen or allow_url_include, set the following in your php.ini file and restart Apache.
找到配置文件

cd /etc/php/7.4/apache2
vim php.ini
进入编辑后 利用/allow_  找到 i并修改其为On如图  esc wq enter 保存退出
service apache2 stop

在这里插入图片描述
问题3:gd库下载
PHP module gd: Missing - Only an issue if you want to play with captchas

apt install php-gd
service apache2 stop

问题4:数据库配置

连接数据库
mysql -u root -p
在数据库中操作
create database dvwa;
create user dvwa@localhost identified by 'passwd'; 此处的密码需要修改到配置文件config.inc.php中
grant all on dvwa.* to dvwa@localhost;
flush privileges;

问题5:配置config.inc.php文件与数据库一致

cd /var/www/html/DVWA-master/config
vim config.inc.php
进入编辑后 修改db_passwd  esc wq enter 保存退出

3.测试

http://127.0.0.1/DVWA-master/
在这里插入图片描述
成功!

相关命令

启动
service apache2 start 或者 systemcti start apache2
关闭
service apache2 stop
重启
service apache2 restart
设置开机自启
systemcti enable apache2

最后

以上就是超级发夹最近收集整理的关于kali下DVWA靶场的搭建的全部内容,更多相关kali下DVWA靶场内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(62)

评论列表共有 0 条评论

立即
投稿
返回
顶部