Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions other/supportForQUERYMethod.bcheck
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
metadata:
language: v2-beta
name: "Support for the QUERY HTTP method was detected."
description: "Check if a path supports the QUERY HTTP method."
author: "Dominique Righetto"
tags: "active"

# Sources:
# https://isc.sans.edu/diary/HTTP+QUERY+Method+The+Grey+Zone+Between+GET+And+POST/33352
# https://www.rfc-editor.org/info/rfc10008
# https://www.rfc-editor.org/info/rfc10008/#appendix-A.2
given path then
send request called checkSupport:
replacing method: "OPTIONS"
removing body
removing headers:
"Content-Type"
# Raise attention point when the "Allow" response header contains the "QUERY" term
if {checkSupport.response.headers} matches "(?i)allow:\s+[A-Z,\s]*(QUERY)[A-Z,\s]*" then
report issue:
severity: info
confidence: firm
detail: "The endpoint supports the QUERY HTTP method."
remediation: "Remove support for the QUERY HTTP method if it is not an expected feature."
end if
Loading