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

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

posted @ 2020-09-30 22:42  那个白熊  阅读(179)  评论(0编辑  收藏  举报