dvwa渗透测试环境部署

环境准备

操作系统:centos7

系统环境xampp:php开发环境部署(xampp)-CSDN博客

dvwa下载:https://github.com/digininja/DVWA/archive/master.zip

dvwa部署

# 将dvwa文件上传到/opt/lampp/htdocs目录
[root@192 htdocs]# pwd 
/opt/lampp/htdocs
[root@192 htdocs]# ll DVWA-master.zip 
-rw-r--r--. 1 root root 890062 10月 28 21:37 DVWA-master.zip
[root@192 htdocs]# 

# 解压DVWA-master.zip
unzip DVWA-master.zip

# 进入DVWA-master目录
cd DVWA-master

# 复制示例文件作为配置文件
[root@192 DVWA-master]# cp config/config.inc.php.dist config/config.inc.php
[root@192 DVWA-master]# ll config/
总用量 8
-rw-r--r--. 1 root root 2194 10月 29 19:34 config.inc.php
-rw-r--r--. 1 root root 2194 10月 11 16:22 config.inc.php.dist
[root@192 DVWA-master]# 

# 修改目录权限
[root@192 ~]# chmod 777 /opt/lampp/htdocs/DVWA-master/hackable/uploads
[root@192 ~]# chmod 777 /opt/lampp/htdocs/DVWA-master/config

# 修改config/config.inc.php 文件配置:
# 生成值:https://www.google.com/recaptcha/admin/create
$_DVWA[ 'recaptcha_public_key' ]  = '';
$_DVWA[ 'recaptcha_private_key' ] = '';

# 修改php配置文件
vi /opt/lampp/etc/php.ini
allow_url_include=On
display_errors=On

# 重启apache服务
/opt/lampp/bin/apachectl restart

# 配置数据库
[root@192 ~]# /opt/lampp/bin/mysql -u root
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 15
Server version: 10.4.28-MariaDB Source distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database dvwa;
Query OK, 1 row affected (0.002 sec)

MariaDB [(none)]> create user dvwa@localhost identified by 'p@ssw0rd';
Query OK, 0 rows affected (0.002 sec)

MariaDB [(none)]> grant all on dvwa.* to dvwa@localhost;
Query OK, 0 rows affected (0.002 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> 

# 重启服务
[root@192 ~]# /opt/lampp/lampp stop
Stopping XAMPP for Linux 8.2.4-0...
XAMPP: Stopping Apache...ok.
XAMPP: Stopping MySQL...ok.
XAMPP: Stopping ProFTPD...ok.
[root@192 ~]# /opt/lampp/lampp start
Starting XAMPP for Linux 8.2.4-0...
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.
[root@192 ~]# 

配置

访问网站配置页面:http://192.168.21.129/DVWA-master/setup.php

点击“Create / Reset Database”

 输入admin,password进行登录

至此,dvwa部署完成

 重要提示:dvwa仅用于网络安全测试,不要将dvwa部署到真实服务器上,本文采用vmware虚拟机部署,网卡使用nat模式

内容导览:计算机网络基础、进阶、安全实践

  • 6
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

hougang

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值