rpi-kali 搭建网络靶场

安装 apache2

sudo apt install apach2

安装 php

sudo apt install php php-fpm php-gd
并在/etc/php/7.4/php.ini 中将 allow_url_fopen=off 改为on

安装 mariadb

sudo apt install mariadb-server mariadb-client

然后使用root用户登录到系统

修改root用户密码:
mysql
use mysql;
update user set password=password("newpassword") where user='root';
flush privileges;

新建用户:
create user 'username'@'%' identified by 'password';
grant all on *.* to 'username'@'%';
flush privileges;

安装 dvwa

下载 dvwa
解压到 /var/www/html
然后将其config下的文件复制一份去掉后缀。
并在其中更改正确的数据库密码。
将dvwa中需要写入权限的文件夹的权限改为777

在网页中访问然后初始化数据库即可。

有了计划记得推动,不要原地踏步。
原文地址:https://www.cnblogs.com/amnotgcs/p/13756757.html