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
15 changes: 8 additions & 7 deletions rules/RESPONSE-956-DATA-LEAKAGES-RUBY.conf
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,16 @@ SecRule RESPONSE_BODY "@pmFromFile ruby-errors.data" \
setvar:'tx.outbound_anomaly_score_pl1=+%{tx.error_anomaly_score}'"


SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 2" "id:956013,phase:3,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.21.0-dev',skipAfter:END-RESPONSE-956-DATA-LEAKAGES-RUBY"
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 2" "id:956014,phase:4,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.21.0-dev',skipAfter:END-RESPONSE-956-DATA-LEAKAGES-RUBY"


# Detect the presence of the Ruby ERB templates "<%", "<%= " and slim interpolation "#{}" in output.
#
# To prevent false positives (due to the short "<%" sequences), we also check for [#=\s] after an opening tag.
#
# This rule is placed at PL-2 since it also matches common templating format with various JavaScript templating engines.
#
SecRule RESPONSE_BODY "@rx (?i)(?:<%[=#\s]|#\{[^}]+\})" \
"id:956110,\
phase:4,\
Expand All @@ -69,18 +75,13 @@ SecRule RESPONSE_BODY "@rx (?i)(?:<%[=#\s]|#\{[^}]+\})" \
tag:'language-ruby',\
tag:'platform-multi',\
tag:'attack-disclosure',\
tag:'paranoia-level/1',\
tag:'paranoia-level/2',\
tag:'OWASP_CRS',\
tag:'OWASP_CRS/DATA-LEAKAGES-RUBY',\
tag:'capec/1000/118/116',\
ver:'OWASP_CRS/4.21.0-dev',\
severity:'ERROR',\
setvar:'tx.outbound_anomaly_score_pl1=+%{tx.error_anomaly_score}'"


SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 2" "id:956013,phase:3,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.21.0-dev',skipAfter:END-RESPONSE-956-DATA-LEAKAGES-RUBY"
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 2" "id:956014,phase:4,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.21.0-dev',skipAfter:END-RESPONSE-956-DATA-LEAKAGES-RUBY"

setvar:'tx.outbound_anomaly_score_pl2=+%{tx.error_anomaly_score}'"

SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 3" "id:956015,phase:3,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.21.0-dev',skipAfter:END-RESPONSE-956-DATA-LEAKAGES-RUBY"
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 3" "id:956016,phase:4,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.21.0-dev',skipAfter:END-RESPONSE-956-DATA-LEAKAGES-RUBY"
Expand Down
Loading