diff --git a/other/stackTrace.bcheck b/other/stackTrace.bcheck index 90bb852..53c20f9 100644 --- a/other/stackTrace.bcheck +++ b/other/stackTrace.bcheck @@ -5,14 +5,17 @@ metadata: author: "Dominique Righetto" tags: "passive","informative" +# Sources: +# https://github.com/PortSwigger/error-message-checks/blob/master/src/main/resources/burp/match-rules.tab +# https://github.com/righettod/burp-piper-custom-scripts/blob/main/detect-response-with-errors-disclosure.py + define: common_detail = "The response contains a stack trace that discloses information about the server-side technology used: " common_remediation = "Add an error handler to ensure any errors that may occur are caught, then return a generic message." given response then - # Source: https://github.com/righettod/burp-piper-custom-scripts/blob/main/detect-response-with-errors-disclosure.py # Java - if {latest.response.body} matches "(java\.[\w]+\.[\w]+)" then + if {latest.response.body} matches "(java|javax|jakarta)\.([a-zA-Z0-9\.]+)Exception" then report issue: severity: info confidence: firm @@ -20,7 +23,7 @@ given response then remediation: `{common_remediation}` end if # .Net - if {latest.response.body} matches "(\w+Exception:\s['\"\w\d\s]+)" then + if {latest.response.body} matches "(Microsoft|System)\.([a-zA-Z0-9\.]+)Exception" then report issue: severity: info confidence: firm @@ -51,3 +54,11 @@ given response then detail: `{common_detail} Ruby.` remediation: `{common_remediation}` end if + # Generic + if {latest.response.body} matches "(\w+Exception:\s['\"\w\d\s]+)" then + report issue: + severity: info + confidence: firm + detail: `{common_detail} Generic exception catched so the technology cannot be clearly determined.` + remediation: `{common_remediation}` + end if