安装和使用OWASP·ZAP
|Word Count:609|Reading Time:2mins|Post Views:
关于
OWASP是一个开源的非盈利NGO,是Web安全标准的制定者和推广者,在全世界有250个分部和近7万会员。ZAP是其出品的一个免费、开源的WEB安全旗舰产品,全称是OWASP Zed Attack Proxy,是一款web application 集成渗透测试和漏洞工具。目前,我司的WEB产品交付安全检测就是由它来负责和验证。
部署
靶机
我们使用wordpress来作为测试的目标:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| # CentOS Steam 8上Wordpress的部署 # 在192.168.79.16上建立WordPress站点作为靶机,WordPress的版本为5.9,PHP版本为7.2.4 dnf update -y dnf install -y mysql mysql-server dnf install -y httpd tar curl dnf install -y php php-fpm php-mysqlnd php-json php-dom php-gd php-mbstring php-zip php-intl # 开启防火墙例外 firewall-cmd --permanent --add-service={https,http} firewall-cmd --reload #设定数据库使用utf8字符编码 cat >/etc/my.cnf.d/charset.cnf <<EOF [mysqld] character-set-server = utf8mb4
[client] default-character-set = utf8mb4 EOF # 启动数据库 systemctl enable mysqld --now # 配置数据库,此处略过配置数据库密码 mysql> create database wordpress; mysql> create user ocsadmin@'localhost' identified by 'webadmin'; mysql> grant all privileges on webadmin.* to webadmin@'localhost'; mysql> flush privileges; mysql> exit; #配置PHP,设定时区和压缩 sed -i 's@;date.timezone =@date.timezone = Asia/\Shanghai@g' /etc/php.ini sed -i 's\zlib.output_compression = Off\zlib.output_compression = On\g' /etc/php.ini #下载WordPress源程序 wget https://cn.wordpress.org/latest-zh_CN.tar.gz tar zxvf latest-zh_CN.tar.gz mv ./wordpress/* /var/www/html/ chown -R apache:apache /var/www/html/ # 修改/etc/httpd/conf/httpd.conf下 <Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> # 启动服务 systemctl enable php-fpm httpd --now # 略过WordPress安装过程
|
ZAP
下载
1 2 3 4 5
| # 使用Fedora 35作为操作系统 # ZAP支持Windows、Linux、MacOS多种操作系统以并提供了容器镜像 # ZAP版本为 2.11.1 wget https://github.com/zaproxy/zaproxy/releases/download/v2.11.1/ZAP_2_11_1_unix.sh sudo ./ZAP_2_11_1_unix.sh
|
安装







使用
启动

初始界面

设定靶机

开始扫描

报告
输出报告
OWASP·ZAP支持将扫描结果输出为HTML格式或者PDF格式的报告文件,输出地址为:
Report -> Generate Report -> Template -> Traditional PDF Report -> Generate Report

报告示例

其他
支持插件
ZAP支持多种插件,并可以在程序内部通过“市场”获取官方插件。

支持无头
ZAP是一个Desktop GUI的CS程序,但它也支持使用webswing来提供BS的方式来显示。
Docker部署ZAP
利用Docker和WebSwing来运行ZAP