Score:0

How do I set the anomaly score in crs-setup.conf?

cn flag

I am using v3.0.0 of CRS with ModSecurity set to DetectionOnly mode and the nginx connector. I want to set the anomaly score to 100 or so to fine-tune the settings, but I can't see where or how to do that. Looking in crs-setup.conf

nginx 1.18.0 if that helps

Score:0
bd flag

Anomaly scores for each severity level are set by default under rule ID 900100 in crs-setup.conf. If you want to modify these values you can un-comment and edit it.

Example:

SecAction \
 "id:900100,\
  phase:1,\
  nolog,\
  pass,\
  t:none,\
  setvar:tx.critical_anomaly_score=100,\
  setvar:tx.error_anomaly_score=75,\
  setvar:tx.warning_anomaly_score=50,\
  setvar:tx.notice_anomaly_score=25"

You can also play around with the threshold at which requests/responses get denied by modifying rule ID 900110, also in crs-setup.conf.

Example:

SecAction \
 "id:900110,\
  phase:1,\
  nolog,\
  pass,\
  t:none,\
  setvar:tx.inbound_anomaly_score_threshold=200,\
  setvar:tx.outbound_anomaly_score_threshold=300"
richardwhitney avatar
cn flag
#slightly_toasted - thank you - I had no clue!
nonhocapito avatar
je flag
Could you specify the meaning of those values? What is a normal anomaly score, and should we lower or raise that value to make ModSecurity less sensitive?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.