Centos7部署DVWA靶场

​ DVWA 款开源的渗透测试漏洞练习平台,其中内含xs SQL注入、 文件上传、文件包含、 CSRF和暴力破解等各个难度的测试环境。

安装httpd及其相关的组件

yum install -y httpd httpd-devel

安装php及其相关组件

yum -y install php php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mysql

安装mariadb数据库

yum install -y mariadb mariadb-server mariadb-libs mariadb-devel

启动服务并设置自启动

systemctl start httpd
systemctl start mariadb
systemctl enable httpd
systemctl enable mariadb

打开防火墙

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --reload

数据库初始化设置

mysql_secure_installation
Enter current password for root (enter for none):  # 刚安装密码为空,直接Enter
OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation. Set root password? [Y/n] y #设置root密码
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success! By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment. Remove anonymous users? [Y/n] y #是否移除匿名用户
... Success! Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y #是否禁止使用root用户进行远程连接数据库
... Success! By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment. Remove test database and access to it? [Y/n] y #是否移除测试数据库
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success! Reloading the privilege tables will ensure that all changes made so far
will take effect immediately. Reload privilege tables now? [Y/n] y #是否重新分配权限
... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB
installation should now be secure. Thanks for using MariaDB!

测试环境是否安装成功

在浏览器中使用ip进行访问

出现该页面表示安装成功

安装DVWA

DVWA项目github地址:

我这里下载的是中文版

下载后将压缩包上传至 /var/www/html 下

进行解压并重命名文件夹

unzip DVWA-Chinese-main.zip
mv DVWA-Chinese-main DVWA

进入DVWA-master/config/目录下,编辑config.inc.php文件

vim config.inc.php

配置如下

$_DVWA[ 'db_server' ]   = 'localhost';  # 将127.0.0.1修改为localhost
$_DVWA[ 'db_database' ] = 'dvwa'; # 数据库名称
$_DVWA[ 'db_user' ] = 'root'; # 数据库账号
$_DVWA[ 'db_password' ] = 'root'; # 数据库密码
$_DVWA[ 'db_port'] = '3306';

修改 ./DVWA/hackable/uploads/ 文件夹权限

chmod 777 /var/www/html/DVWA/hackable/uploads/

编辑php配置文件php.ini该文件一般是在/etc/php.ini路径

vim /etc/php.ini

allow_url_include = Off 修改为 allow_url_include = On (大概在815行)

重启apache服务

systemctl restart httpd

通过ip/DVWA进行访问(我直接点击创建数据库了,没来得及截图,盗了一张)

点击创建/重置数据库,底部会显示

点击 login,进入登录页面

Centos7部署DVWA靶场的更多相关文章

  1. Kali部署DVWA和OWASPBWA

    自己的备忘录,这里记录Kali部署DVWA和OWASPBWA,其中遇到的问题会在下一篇文章记录 DVWA(Damn Vulnerable Web App)是一个基于PHP/MySql搭建的Web应用程 ...

  2. [原]CentOS7部署osm2pgsql

    转载请注明原作者(think8848)和出处(http://think8848.cnblogs.com) 部署Postgresql和部署PostGis请参考前两篇文章 本文主要参考GitHub上osm ...

  3. centos7 部署ssserver

    centos7 部署shadowsocks服务端 为什么要选centos7? 以后centos7 肯定是主流,在不重要的环境还是尽量使用新系统吧 centos7 的坑 默认可能会有firewall 或 ...

  4. Redhat 下 XAMPP 安装和部署 DVWA 教程

    XAMPP(Apache+MySQL+PHP+PERL)是一个功能强大的建站集成软件包.这个软件包原来的名字是 LAMPP,但是为了避免误解,最新的几个版本就改名为 XAMPP 了.它可以在Windo ...

  5. centos7 部署 docker compose

    =============================================== 2019/4/10_第1次修改                       ccb_warlock == ...

  6. centos7 部署 docker ce

    =============================================== 2019/4/9_第1次修改                       ccb_warlock === ...

  7. kali上部署dvwa漏洞测试平台

    kali上部署dvwa漏洞测试平台 一.获取dvwa安装包并解压 二.赋予dvwa文件夹相应权限 三.配置Mysql数据库 四.启动apache2和mysql服务 五.在网页配置dvwa 六.登陆到D ...

  8. centos7 部署 open-falcon 0.2.0

    =============================================== 2019/4/29_第3次修改                       ccb_warlock 更新 ...

  9. centos7 部署 docker、shipyard

    =============================================== 2019/4/9_第3次修改                       ccb_warlock 更新说 ...

  10. centos7 部署 docker swarm

    =============================================== 2019/4/9_第3次修改                       ccb_warlock 更新说 ...

随机推荐

  1. (Python基础教程之四)Python中的变量的使用

    Python基础教程 在SublimeEditor中配置Python环境 Python代码中添加注释 Python中的变量的使用 Python中的数据类型 Python中的关键字 Python字符串操 ...

  2. Java Cache系列之Cache概述和Simple Cache

    前记:最近公司在做的项目完全基于Cache(Gemfire)构建了一个类数据库的系统,自己做的一个小项目里用过Guava的Cache,以前做过的项目中使用过EHCache,既然和Cache那么有缘,那 ...

  3. 调度系统之Airflow

    一.Airflow简介 Airflow 是一个使用 Python 语言编写的 Data Pipeline 调度和监控工作流的平台. Airflow 是通过 DAG(Directed acyclic g ...

  4. Refact.ai Match 1 (Codeforces Round 985, Div. 1 + Div. 2)

    Contest Link A Easy math problem. Submission B 大胆贪心猜结论,容易想到一个套路化的 stack 做法. Submission C 容易想到是个二分题,二 ...

  5. 论文泛读《PICCOLO : Exposing Complex Backdoors in NLP Transformer Models》

    发表时间:2022 期刊会议:IEEE Symposium on Security and Privacy (SP) 论文单位:Purdue University 论文作者:Yingqi Liu, G ...

  6. HarmonyOS鸿蒙开发 - 解决上下两栏白边 - 沉浸式效果

    鸿蒙应用开发从入门到入行 预览器上下两栏白边 自从HarmonyOS升级到release版后,很多同学会问猫林老师:为什么他的预览器上下有白边,为什么明明根容器写了宽高百分百但没铺满.如下图 白边原因 ...

  7. element 表格增加多选框 ,增加多选

    1. el-table 增加如下代码,就会出现多选框 <el-table-column type="selection" class="checkbox-inp&q ...

  8. docker-安装Oracle11g

    获取镜像 在线   docker pull oracleinanutshell/oracle-xe-11g 离线 tar包下载:链接: https://pan.baidu.com/s/1bRp6mSq ...

  9. 该怎么解决no route to host

    出现No route to host 的时候,有如下几种可能: 1.对方的域名确实不通 2.本机自己开了防火墙 3.本机的etc/hosts 里面没有配置本机的机器名和ip (可能性最大) 其中第三点 ...

  10. Spark面试题汇总及答案(推荐收藏)

    一.面试题 Spark 通常来说,Spark与MapReduce相比,Spark运行效率更高.请说明效率更高来源于Spark内置的哪些机制? hadoop和spark使用场景? spark如何保证宕机 ...