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
17 changes: 14 additions & 3 deletions other/stackTrace.bcheck
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,25 @@ 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
detail: `{common_detail} Java.`
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
Expand Down Expand Up @@ -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
Loading