访问控制测试

这个插件使用户能够比较Web应用程序(Web-application)的哪些部分可用于某些用户,进行访问控制测试并识别潜在的访问控制问题。 它允许配置访问规则,并进行全面攻击,目的是帮助识别Web应用程序中可被未经授权的客户端访问的部分。

与这个插件相关的两个主要概念解释如下: 访问规则测试过程.

访问规则

为了确定潜在的访问控制问题,ZAP需要知道Web应用程序的哪些部分应该由哪个用户访问。 在 ZAP 中,这些规则的名称是: 访问规则,通常具有以下含义: “PageA应该/不应该由UserX访问”。

规则是为上下文配置的,对于该上下文的每个用户,每个站点节点(Web页面)将与下列值之一相关联:

为了简化访问规则的定义过程,ZAP利用了基于树的URL结构。 在分析规则时,如果没有定义特定的规则,推理算法将根据URL中的父节点检测每个节点的匹配规则。 这意味着,在配置访问规则时,只需要为整个子树显式设置一个规则,而对于其它节点规则则可以进行推断得出 有关详细信息,请参阅访问控制上下文选项帮助页面。

测试过程

作为一个整体,为了充分执行Web应用程序的访问控制测试,请您遵循如下所示的步骤:

Note: Access control testing is not allowed in Safe mode nor Protected if the context is not in scope.

API

The Addon exposes the following API endpoints:

Actions

scan

Starts an Access Control scan with the given context ID and user ID (can be comma separated list of IDs). (Optional parameters: boolean identifying if an unauthenticated user should be included (default false), boolean identifying whether or not Alerts are raised (default true), and the Risk level for the Alerts (default High).) [Note:This assumes the Access Control rules were previously established via ZAP gui and the necessary Context exported/imported.]

writeHTMLreport

Generates an Access Control report for the given context ID and saves it based on the provided filename (path).

Views

getScanProgress

Gets the Access Control scan progress (percentage integer) for the given context ID.

getScanStatus

Gets the Access Control scan status (description string) for the given context ID.

See also

     访问控制测试选项卡 了解加载项使用的状态标签的说明
     访问控制上下文选项 了解相关的上下文选项