From aad7f77930831eed5f37b317d069d6d4a7941233 Mon Sep 17 00:00:00 2001 From: geeknik <466878+geeknik@users.noreply.github.com> Date: Wed, 9 Aug 2023 14:28:16 +0000 Subject: [PATCH] Update web-accessible-resources.yaml Changes: - Added negative matchers to check for .html and .js files - Extracted web accessible resources for further analysis - Extracted each resource into separate variable --- web-accessible-resources.yaml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/web-accessible-resources.yaml b/web-accessible-resources.yaml index dead22c..f24c040 100644 --- a/web-accessible-resources.yaml +++ b/web-accessible-resources.yaml @@ -1,8 +1,8 @@ id: web-accessible-resources info: - name: Web-accessible Resources - description: Keep the list of web-accessible resources to a minimum to limit potential attack vectors. + name: Minimize Web Accessible Resources + description: The web_accessible_resources list should be limited to only necessary resources. author: nullenc0de severity: info @@ -14,4 +14,27 @@ file: - type: regex part: body regex: - - "\"web_accessible_resources\"\\s*:\\s*\\[" + - '"web_accessible_resources"' + + - type: regex + regex: + - "\\.html$" + negative: true + + - type: regex + regex: + - "\\.js$" + negative: true + + extractors: + - type: regex + part: body + name: web_resources + regex: + - '"web_accessible_resources":\\s*\\[(.+)\\]' + + - type: regex + part: web_resources + name: resource + regex: + - "'([^']+)'"