From a6d4f5de35b8926c46a2e3c90fdf1c264ef16140 Mon Sep 17 00:00:00 2001 From: Prince Chaddha Date: Sat, 1 Jun 2024 10:29:33 +0400 Subject: [PATCH] Update directory-listing.yaml --- http/miscellaneous/directory-listing.yaml | 47 ++++++++++++++--------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/http/miscellaneous/directory-listing.yaml b/http/miscellaneous/directory-listing.yaml index b183a7f32e..9e73bb7eaa 100644 --- a/http/miscellaneous/directory-listing.yaml +++ b/http/miscellaneous/directory-listing.yaml @@ -5,10 +5,14 @@ info: author: theMiddle severity: low description: Directory Indexing is a web server feature that allows the contents of a directory to be displayed when no index file is present. This can be a security risk as it can expose sensitive files, old backup or unreferenced files. + impact: | + Sensitive files and directories may be exposed to unauthorized users. + remediation: | + Disable directory listing in the web server configuration. reference: - https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/02-Configuration_and_Deployment_Management_Testing/04-Review_Old_Backup_and_Unreferenced_Files_for_Sensitive_Information - https://portswigger.net/kb/issues/00600100_directory-listing - tags: miscellaneous,misc,generic,misconfguration,web + tags: misc,generic,misconfig,fuzz flow: | function target_is_in_scope(url) { @@ -52,16 +56,17 @@ http: - method: GET path: - "{{BaseURL}}" - redirects: true + + host-redirects: true + max-redirects: 2 matchers: - - type: status + - type: dsl internal: true - status: - - 200 - - type: word - words: - - "text/html" - part: header + dsl: + - contains(header, "text/html") + - status_code_1 == 200 + condition: and + extractors: - type: xpath name: links @@ -73,18 +78,22 @@ http: - method: GET path: - "{{BaseURL}}{{path_to_check}}" - redirects: true + + host-redirects: true + max-redirects: 2 + matchers-condition: and matchers: - - type: status - internal: true - status: - - 200 - - type: word - words: - - "text/html" - part: header - type: word + part: body words: - "Index of" - part: body + + - type: word + part: header + words: + - "text/html" + + - type: status + status: + - 200