Introduction to ModSecurity and the OWASP Core Rule Set

Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
An Introduction to
ModSecurity and the OWASP
Core Rule Set
(OWASP Munich)
Christian Folini / @ChrFolini
Baseline / 1st
Line of Defense
Safety Belts
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
Boring Bio
●
Christian Folini / ChrFolini
●
Security Engineer at netnea
in Switzerland
●
Author, teacher and speaker
●
OWASP CRS project Co-Lead
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
Plan for Today
●
What is a WAF?
●
What is ModSecurity?
●
What is Core Rule Set?
●
Demo
●
Key concepts
●
Rules
●
False Positives
Web Application Firewalls
Complex • Overwhelming • Rarely Functional
ModSecurity
Embedded • Rule oriented • Granular Control
Introduction to ModSecurity and the OWASP Core Rule Set
Introduction to ModSecurity and the OWASP Core Rule Set
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
Include in server config (depending on path):
Include /path-to-owasp-crs/crs-setup.conf
Include /path-to-owasp-crs/rules/*.conf
Clone the repository (or download latest release):
$> git clone https://github.com/coreruleset/coreruleset
Copy the example config:
$> cp crs-setup.conf.example crs-setup.conf
Demo Time (Installation)
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
Research based on
4.5M Burp requests.
CRS3
Default Install
Redir.:
RFI:
LFI:
XSS:
SQLi:
0%
0%
-100%
-82%
-100%
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
Paranoia Level 1: Minimal number of false positives
Baseline protection
Paranoia Level 2: More rules, some false positives
Real data in the service
Paranoia Level 3: Specialized rules, more FPs
Online banking level security
Paranoia Level 4: Crazy rules, many FPs
Nuclear power plant level security
Paranoia Levels
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
Important Groups of Rules
Request Rules
REQUEST-910-IP-REPUTATION.conf
REQUEST-911-METHOD-ENFORCEMENT.conf
REQUEST-912-DOS-PROTECTION.conf
REQUEST-913-SCANNER-DETECTION.conf
REQUEST-920-PROTOCOL-ENFORCEMENT.conf
REQUEST-921-PROTOCOL-ATTACK.conf
REQUEST-930-APPLICATION-ATTACK-LFI.conf
REQUEST-931-APPLICATION-ATTACK-RFI.conf
REQUEST-932-APPLICATION-ATTACK-RCE.conf
REQUEST-933-APPLICATION-ATTACK-PHP.conf
REQUEST-941-APPLICATION-ATTACK-XSS.conf
REQUEST-942-APPLICATION-ATTACK-SQLI.conf
REQUEST-943-APPLICATION-ATTACK-SESS-FIX.conf
REQUEST-944-APPLICATION-ATTACK-JAVA.conf
REQUEST-949-BLOCKING-EVALUATION.conf
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
Important Groups of Rules
Response Rules
RESPONSE-950-DATA-LEAKAGES.conf
RESPONSE-951-DATA-LEAKAGES-SQL.conf
RESPONSE-952-DATA-LEAKAGES-JAVA.conf
RESPONSE-953-DATA-LEAKAGES-PHP.conf
RESPONSE-954-DATA-LEAKAGES-IIS.conf
RESPONSE-959-BLOCKING-EVALUATION.conf
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
Paranoia Level
Example: Protocol Enforcement Rules
Paranoia Level 1: 31 Rules
Paranoia Level 2: 7 Rules
Paranoia Level 3: 1 Rules
Paranoia Level 4: 4 Rules
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
Stricter Siblings
Example: Byte Range Enforcement
Paranoia Level 1:
Rule 920270: Full ASCII range without null character
Paranoia Level 2:
Rule 920271: Full visible ASCII range, tab, newline
Paranoia Level 3:
Rule 920272: Visible lower ASCII range without %
Paranoia Level 4:
Rule 920273: A-Z a-z 0-9 = - _ . , : &
Anomaly Scoring
Adjustable Limit • Blocking Mode • Iterative Tuning
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
Sampling Mode
Easing into CRS adoption / limit the impact
• Define a sampling rate of n
• Only n% of the requests are being funneled into CRS3
• 100% - n% of requests bypass CRS3
• Monitor performance and fix problems
• Slowly raise n in an iterative way until it reaches 100%
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
False Positives
False Positives are expected from PL2
• FPs are fought with rule exclusions
• Tutorials at https://www.netnea.com
• Get cheatsheet from Netnea
• Please report FPs at PL1 (github)
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
Apache / ModSecurity / CRS Tutorials
https://www.netnea.com/cms/apache-tutorials/
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
Summary ModSecurity & CRS3
• 1st
Line of Defense against web application attacks
• Generic set of blacklisting rules for WAFs
• Blocks 80% of web application attacks in the default
installation (with a minimal number of FPs)
• Granular control over the behaviour down to the
parameter level
More information at https://coreruleset.org
@ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
Questions and Answers, Contact
Contact: christian.folini@netnea.com
@ChrFolini
1 of 27

Recommended

Extensive Introduction to ModSecurity and the OWASP Core Rule Set by
Extensive Introduction to ModSecurity and the OWASP Core Rule SetExtensive Introduction to ModSecurity and the OWASP Core Rule Set
Extensive Introduction to ModSecurity and the OWASP Core Rule SetChristian Folini
119 views29 slides
Ipv6 Security with Mikrotik RouterOS by Wardner Maia by
Ipv6 Security with Mikrotik RouterOS by Wardner MaiaIpv6 Security with Mikrotik RouterOS by Wardner Maia
Ipv6 Security with Mikrotik RouterOS by Wardner MaiaWardner Maia
3.9K views127 slides
Implementing Cisco Network Security Exam (210-260) by
Implementing Cisco Network Security Exam (210-260)Implementing Cisco Network Security Exam (210-260)
Implementing Cisco Network Security Exam (210-260)Jhoni Guerrero
271 views4 slides
Cn lab index by
Cn lab indexCn lab index
Cn lab indexGarvit Chopra
267 views1 slide
Chapter 10 cryptography-public encryption by
Chapter 10   cryptography-public encryptionChapter 10   cryptography-public encryption
Chapter 10 cryptography-public encryptionSyaiful Ahdan
476 views18 slides
Introduction to and survey of TLS Security by
Introduction to and survey of TLS SecurityIntroduction to and survey of TLS Security
Introduction to and survey of TLS SecurityAaron Zauner
2.5K views76 slides

More Related Content

What's hot

Multi cloud security with cisco cloud services (Taras Kolodchyn) by
Multi cloud security with cisco cloud services (Taras Kolodchyn)Multi cloud security with cisco cloud services (Taras Kolodchyn)
Multi cloud security with cisco cloud services (Taras Kolodchyn)Cloud Security Alliance Lviv Chapter
287 views12 slides
No need for Black Chambers: Testing TLS in the E-Mail Ecosystem at Large (hac... by
No need for Black Chambers: Testing TLS in the E-Mail Ecosystem at Large (hac...No need for Black Chambers: Testing TLS in the E-Mail Ecosystem at Large (hac...
No need for Black Chambers: Testing TLS in the E-Mail Ecosystem at Large (hac...Aaron Zauner
2.3K views41 slides
IPsec vpn by
IPsec vpnIPsec vpn
IPsec vpnsharetech
1.7K views33 slides
State of Transport Security in the E-Mail Ecosystem at Large by
State of Transport Security in the E-Mail Ecosystem at LargeState of Transport Security in the E-Mail Ecosystem at Large
State of Transport Security in the E-Mail Ecosystem at LargeAaron Zauner
653 views14 slides
HdM Stuttgart Präsentationstag PPTP VPN WLAN Update by
HdM Stuttgart Präsentationstag PPTP VPN WLAN UpdateHdM Stuttgart Präsentationstag PPTP VPN WLAN Update
HdM Stuttgart Präsentationstag PPTP VPN WLAN UpdateMarc Seeger
1.6K views36 slides
Common Infrastructure Exploits in AWS/GCP/Azure Servers and Containers by
Common Infrastructure Exploits in AWS/GCP/Azure Servers and ContainersCommon Infrastructure Exploits in AWS/GCP/Azure Servers and Containers
Common Infrastructure Exploits in AWS/GCP/Azure Servers and ContainersPriyanka Aash
855 views40 slides

What's hot(7)

No need for Black Chambers: Testing TLS in the E-Mail Ecosystem at Large (hac... by Aaron Zauner
No need for Black Chambers: Testing TLS in the E-Mail Ecosystem at Large (hac...No need for Black Chambers: Testing TLS in the E-Mail Ecosystem at Large (hac...
No need for Black Chambers: Testing TLS in the E-Mail Ecosystem at Large (hac...
Aaron Zauner2.3K views
IPsec vpn by sharetech
IPsec vpnIPsec vpn
IPsec vpn
sharetech1.7K views
State of Transport Security in the E-Mail Ecosystem at Large by Aaron Zauner
State of Transport Security in the E-Mail Ecosystem at LargeState of Transport Security in the E-Mail Ecosystem at Large
State of Transport Security in the E-Mail Ecosystem at Large
Aaron Zauner653 views
HdM Stuttgart Präsentationstag PPTP VPN WLAN Update by Marc Seeger
HdM Stuttgart Präsentationstag PPTP VPN WLAN UpdateHdM Stuttgart Präsentationstag PPTP VPN WLAN Update
HdM Stuttgart Präsentationstag PPTP VPN WLAN Update
Marc Seeger1.6K views
Common Infrastructure Exploits in AWS/GCP/Azure Servers and Containers by Priyanka Aash
Common Infrastructure Exploits in AWS/GCP/Azure Servers and ContainersCommon Infrastructure Exploits in AWS/GCP/Azure Servers and Containers
Common Infrastructure Exploits in AWS/GCP/Azure Servers and Containers
Priyanka Aash855 views
SITE TO SITE IPSEC VPN TUNNEL B/W CISCO ROUTERS by NetProtocol Xpert
SITE TO SITE IPSEC VPN TUNNEL B/W CISCO ROUTERSSITE TO SITE IPSEC VPN TUNNEL B/W CISCO ROUTERS
SITE TO SITE IPSEC VPN TUNNEL B/W CISCO ROUTERS
NetProtocol Xpert1.8K views

Similar to Introduction to ModSecurity and the OWASP Core Rule Set

Folini Extended Introduction to ModSecurity and CRS3 by
Folini Extended Introduction to ModSecurity and CRS3Folini Extended Introduction to ModSecurity and CRS3
Folini Extended Introduction to ModSecurity and CRS3Christian Folini
543 views27 slides
What’s new in CRS4? An Update from the OWASP CRS project by
What’s new in CRS4? An Update from the OWASP CRS projectWhat’s new in CRS4? An Update from the OWASP CRS project
What’s new in CRS4? An Update from the OWASP CRS projectChristian Folini
251 views39 slides
Implementing Raft in RabbitMQ by
Implementing Raft in RabbitMQImplementing Raft in RabbitMQ
Implementing Raft in RabbitMQVMware Tanzu
4.6K views53 slides
Singapore International Cyberweek 2020 by
Singapore International Cyberweek 2020Singapore International Cyberweek 2020
Singapore International Cyberweek 2020Abhik Roychoudhury
20.4K views32 slides
RootedCON 2014 - Kicking around SCADA! by
RootedCON 2014 - Kicking around SCADA!RootedCON 2014 - Kicking around SCADA!
RootedCON 2014 - Kicking around SCADA!testpurposes
1.1K views58 slides
Web Application Firewall - Friend of your DevOps Pipeline? by
Web Application Firewall - Friend of your DevOps Pipeline?Web Application Firewall - Friend of your DevOps Pipeline?
Web Application Firewall - Friend of your DevOps Pipeline?Franziska Buehler
61 views42 slides

Similar to Introduction to ModSecurity and the OWASP Core Rule Set(20)

Folini Extended Introduction to ModSecurity and CRS3 by Christian Folini
Folini Extended Introduction to ModSecurity and CRS3Folini Extended Introduction to ModSecurity and CRS3
Folini Extended Introduction to ModSecurity and CRS3
Christian Folini543 views
What’s new in CRS4? An Update from the OWASP CRS project by Christian Folini
What’s new in CRS4? An Update from the OWASP CRS projectWhat’s new in CRS4? An Update from the OWASP CRS project
What’s new in CRS4? An Update from the OWASP CRS project
Christian Folini251 views
Implementing Raft in RabbitMQ by VMware Tanzu
Implementing Raft in RabbitMQImplementing Raft in RabbitMQ
Implementing Raft in RabbitMQ
VMware Tanzu4.6K views
Singapore International Cyberweek 2020 by Abhik Roychoudhury
Singapore International Cyberweek 2020Singapore International Cyberweek 2020
Singapore International Cyberweek 2020
Abhik Roychoudhury20.4K views
RootedCON 2014 - Kicking around SCADA! by testpurposes
RootedCON 2014 - Kicking around SCADA!RootedCON 2014 - Kicking around SCADA!
RootedCON 2014 - Kicking around SCADA!
testpurposes1.1K views
Web Application Firewall - Friend of your DevOps Pipeline? by Franziska Buehler
Web Application Firewall - Friend of your DevOps Pipeline?Web Application Firewall - Friend of your DevOps Pipeline?
Web Application Firewall - Friend of your DevOps Pipeline?
TechEvent From Zero to DevOps Hero through the Agile Cloud by Trivadis
TechEvent From Zero to DevOps Hero through the Agile CloudTechEvent From Zero to DevOps Hero through the Agile Cloud
TechEvent From Zero to DevOps Hero through the Agile Cloud
Trivadis61 views
CloudLightning - Multiclouds: Challenges and Current Solutions by CloudLightning
CloudLightning - Multiclouds: Challenges and Current SolutionsCloudLightning - Multiclouds: Challenges and Current Solutions
CloudLightning - Multiclouds: Challenges and Current Solutions
CloudLightning648 views
(DVO207) Defending Your Workloads Against the Next Zero-Day Attack by Amazon Web Services
(DVO207) Defending Your Workloads Against the Next Zero-Day Attack(DVO207) Defending Your Workloads Against the Next Zero-Day Attack
(DVO207) Defending Your Workloads Against the Next Zero-Day Attack
Amazon Web Services1.2K views
Cwin16 tls-s2 cf safety critical systems by Capgemini
Cwin16 tls-s2 cf safety critical systemsCwin16 tls-s2 cf safety critical systems
Cwin16 tls-s2 cf safety critical systems
Capgemini1.9K views
Telefonica: Automatización de la gestión de redes mediante grafos by Neo4j
Telefonica: Automatización de la gestión de redes mediante grafosTelefonica: Automatización de la gestión de redes mediante grafos
Telefonica: Automatización de la gestión de redes mediante grafos
Neo4j118 views
Security and Virtualization in the Data Center by Cisco Canada
Security and Virtualization in the Data CenterSecurity and Virtualization in the Data Center
Security and Virtualization in the Data Center
Cisco Canada842 views
21st Docker Switzerland Meetup - ISTIO by Niklaus Hirt
21st Docker Switzerland Meetup - ISTIO21st Docker Switzerland Meetup - ISTIO
21st Docker Switzerland Meetup - ISTIO
Niklaus Hirt194 views
Usage Based Metering in the Cloud (Subscribed13) by Zuora, Inc.
Usage Based Metering in the Cloud (Subscribed13)Usage Based Metering in the Cloud (Subscribed13)
Usage Based Metering in the Cloud (Subscribed13)
Zuora, Inc.701 views
Cisco Connect Vancouver 2017 - Cisco's Digital Network Architecture - deeper ... by Cisco Canada
Cisco Connect Vancouver 2017 - Cisco's Digital Network Architecture - deeper ...Cisco Connect Vancouver 2017 - Cisco's Digital Network Architecture - deeper ...
Cisco Connect Vancouver 2017 - Cisco's Digital Network Architecture - deeper ...
Cisco Canada308 views
Web Application Firewall - Friend of your DevOps Chain? by Franziska Buehler
Web Application Firewall - Friend of your DevOps Chain?Web Application Firewall - Friend of your DevOps Chain?
Web Application Firewall - Friend of your DevOps Chain?
Franziska Buehler487 views
June 2015 - OpenStack-fr meetup - Designing CloudWare applications by Jean-Charles JOREL
June 2015 - OpenStack-fr meetup - Designing CloudWare applicationsJune 2015 - OpenStack-fr meetup - Designing CloudWare applications
June 2015 - OpenStack-fr meetup - Designing CloudWare applications
Jean-Charles JOREL964 views
Network security security landscape-10-11-2016 part i 1200 dpi (vgarr) by Vince Garr
Network security security landscape-10-11-2016 part i 1200 dpi (vgarr)Network security security landscape-10-11-2016 part i 1200 dpi (vgarr)
Network security security landscape-10-11-2016 part i 1200 dpi (vgarr)
Vince Garr156 views
Defending Your Workloads Against the Next Zero-Day Vulnerability by Amazon Web Services
Defending Your Workloads Against the Next Zero-Day VulnerabilityDefending Your Workloads Against the Next Zero-Day Vulnerability
Defending Your Workloads Against the Next Zero-Day Vulnerability
Amazon Web Services1.4K views

More from Christian Folini

Crazy incentives and how they drive security into no man's land by
Crazy incentives and how they drive security into no man's landCrazy incentives and how they drive security into no man's land
Crazy incentives and how they drive security into no man's landChristian Folini
327 views38 slides
Never Walk Alone - Inspirations from a Growing OWASP Project by
Never Walk Alone - Inspirations from a Growing OWASP ProjectNever Walk Alone - Inspirations from a Growing OWASP Project
Never Walk Alone - Inspirations from a Growing OWASP ProjectChristian Folini
11 views23 slides
The Adventurous Tale of Online Voting in Switzerland by
The Adventurous Tale of Online Voting in SwitzerlandThe Adventurous Tale of Online Voting in Switzerland
The Adventurous Tale of Online Voting in SwitzerlandChristian Folini
144 views41 slides
EVoting in der Schweiz - Ein Fortsetzungsroman by
EVoting in der Schweiz - Ein FortsetzungsromanEVoting in der Schweiz - Ein Fortsetzungsroman
EVoting in der Schweiz - Ein FortsetzungsromanChristian Folini
187 views41 slides
Securing Access to Internet Voting with the OWASP ModSecurity Core Rule Set by
Securing Access to Internet Voting with the OWASP ModSecurity Core Rule SetSecuring Access to Internet Voting with the OWASP ModSecurity Core Rule Set
Securing Access to Internet Voting with the OWASP ModSecurity Core Rule SetChristian Folini
134 views48 slides
The Adventurous Tale of Online Voting in Switzerland (Usenix Enigma 2021 conf... by
The Adventurous Tale of Online Voting in Switzerland (Usenix Enigma 2021 conf...The Adventurous Tale of Online Voting in Switzerland (Usenix Enigma 2021 conf...
The Adventurous Tale of Online Voting in Switzerland (Usenix Enigma 2021 conf...Christian Folini
503 views32 slides

More from Christian Folini(14)

Crazy incentives and how they drive security into no man's land by Christian Folini
Crazy incentives and how they drive security into no man's landCrazy incentives and how they drive security into no man's land
Crazy incentives and how they drive security into no man's land
Christian Folini327 views
Never Walk Alone - Inspirations from a Growing OWASP Project by Christian Folini
Never Walk Alone - Inspirations from a Growing OWASP ProjectNever Walk Alone - Inspirations from a Growing OWASP Project
Never Walk Alone - Inspirations from a Growing OWASP Project
Christian Folini11 views
The Adventurous Tale of Online Voting in Switzerland by Christian Folini
The Adventurous Tale of Online Voting in SwitzerlandThe Adventurous Tale of Online Voting in Switzerland
The Adventurous Tale of Online Voting in Switzerland
Christian Folini144 views
EVoting in der Schweiz - Ein Fortsetzungsroman by Christian Folini
EVoting in der Schweiz - Ein FortsetzungsromanEVoting in der Schweiz - Ein Fortsetzungsroman
EVoting in der Schweiz - Ein Fortsetzungsroman
Christian Folini187 views
Securing Access to Internet Voting with the OWASP ModSecurity Core Rule Set by Christian Folini
Securing Access to Internet Voting with the OWASP ModSecurity Core Rule SetSecuring Access to Internet Voting with the OWASP ModSecurity Core Rule Set
Securing Access to Internet Voting with the OWASP ModSecurity Core Rule Set
Christian Folini134 views
The Adventurous Tale of Online Voting in Switzerland (Usenix Enigma 2021 conf... by Christian Folini
The Adventurous Tale of Online Voting in Switzerland (Usenix Enigma 2021 conf...The Adventurous Tale of Online Voting in Switzerland (Usenix Enigma 2021 conf...
The Adventurous Tale of Online Voting in Switzerland (Usenix Enigma 2021 conf...
Christian Folini503 views
Gedanken zur elektronischen Stimmabgabe für Datenschützer by Christian Folini
Gedanken zur elektronischen Stimmabgabe für DatenschützerGedanken zur elektronischen Stimmabgabe für Datenschützer
Gedanken zur elektronischen Stimmabgabe für Datenschützer
Christian Folini428 views
E-Voting, die Sicherheit und die Rolle der Experten by Christian Folini
E-Voting, die Sicherheit und die Rolle der ExpertenE-Voting, die Sicherheit und die Rolle der Experten
E-Voting, die Sicherheit und die Rolle der Experten
Christian Folini517 views
Optimizing ModSecurity on NGINX and NGINX Plus by Christian Folini
Optimizing ModSecurity on NGINX and NGINX PlusOptimizing ModSecurity on NGINX and NGINX Plus
Optimizing ModSecurity on NGINX and NGINX Plus
Christian Folini2.2K views
A General Look at the State of Security - AFCEA 2017 by Christian Folini
A General Look at the State of Security - AFCEA 2017A General Look at the State of Security - AFCEA 2017
A General Look at the State of Security - AFCEA 2017
Christian Folini229 views
Introducing the OWASP ModSecurity Core Rule Set by Christian Folini
Introducing the OWASP ModSecurity Core Rule SetIntroducing the OWASP ModSecurity Core Rule Set
Introducing the OWASP ModSecurity Core Rule Set
Christian Folini1.1K views
OWASP ModSecurity Core Rules Paranoia Mode by Christian Folini
OWASP ModSecurity Core Rules Paranoia ModeOWASP ModSecurity Core Rules Paranoia Mode
OWASP ModSecurity Core Rules Paranoia Mode
Christian Folini9.9K views

Recently uploaded

How the World's Leading Independent Automotive Distributor is Reinventing Its... by
How the World's Leading Independent Automotive Distributor is Reinventing Its...How the World's Leading Independent Automotive Distributor is Reinventing Its...
How the World's Leading Independent Automotive Distributor is Reinventing Its...NUS-ISS
15 views25 slides
[2023] Putting the R! in R&D.pdf by
[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdfEleanor McHugh
38 views127 slides
Melek BEN MAHMOUD.pdf by
Melek BEN MAHMOUD.pdfMelek BEN MAHMOUD.pdf
Melek BEN MAHMOUD.pdfMelekBenMahmoud
14 views1 slide
STPI OctaNE CoE Brochure.pdf by
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdfmadhurjyapb
12 views1 slide
Spesifikasi Lengkap ASUS Vivobook Go 14 by
Spesifikasi Lengkap ASUS Vivobook Go 14Spesifikasi Lengkap ASUS Vivobook Go 14
Spesifikasi Lengkap ASUS Vivobook Go 14Dot Semarang
35 views1 slide
ChatGPT and AI for Web Developers by
ChatGPT and AI for Web DevelopersChatGPT and AI for Web Developers
ChatGPT and AI for Web DevelopersMaximiliano Firtman
181 views82 slides

Recently uploaded(20)

How the World's Leading Independent Automotive Distributor is Reinventing Its... by NUS-ISS
How the World's Leading Independent Automotive Distributor is Reinventing Its...How the World's Leading Independent Automotive Distributor is Reinventing Its...
How the World's Leading Independent Automotive Distributor is Reinventing Its...
NUS-ISS15 views
[2023] Putting the R! in R&D.pdf by Eleanor McHugh
[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf
Eleanor McHugh38 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb12 views
Spesifikasi Lengkap ASUS Vivobook Go 14 by Dot Semarang
Spesifikasi Lengkap ASUS Vivobook Go 14Spesifikasi Lengkap ASUS Vivobook Go 14
Spesifikasi Lengkap ASUS Vivobook Go 14
Dot Semarang35 views
Combining Orchestration and Choreography for a Clean Architecture by ThomasHeinrichs1
Combining Orchestration and Choreography for a Clean ArchitectureCombining Orchestration and Choreography for a Clean Architecture
Combining Orchestration and Choreography for a Clean Architecture
ThomasHeinrichs169 views
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze by NUS-ISS
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng TszeDigital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze
NUS-ISS19 views
The details of description: Techniques, tips, and tangents on alternative tex... by BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada121 views
Voice Logger - Telephony Integration Solution at Aegis by Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma17 views
Data-centric AI and the convergence of data and model engineering: opportunit... by Paolo Missier
Data-centric AI and the convergence of data and model engineering:opportunit...Data-centric AI and the convergence of data and model engineering:opportunit...
Data-centric AI and the convergence of data and model engineering: opportunit...
Paolo Missier34 views
Perth MeetUp November 2023 by Michael Price
Perth MeetUp November 2023 Perth MeetUp November 2023
Perth MeetUp November 2023
Michael Price15 views
Black and White Modern Science Presentation.pptx by maryamkhalid2916
Black and White Modern Science Presentation.pptxBlack and White Modern Science Presentation.pptx
Black and White Modern Science Presentation.pptx
maryamkhalid291614 views
RADIUS-Omnichannel Interaction System by RADIUS
RADIUS-Omnichannel Interaction SystemRADIUS-Omnichannel Interaction System
RADIUS-Omnichannel Interaction System
RADIUS15 views
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10209 views

Introduction to ModSecurity and the OWASP Core Rule Set

  • 1. Intro to ModSecurity and CRS – OWASP Munich 2020-07-21 An Introduction to ModSecurity and the OWASP Core Rule Set (OWASP Munich) Christian Folini / @ChrFolini
  • 2. Baseline / 1st Line of Defense Safety Belts
  • 3. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21 Boring Bio ● Christian Folini / ChrFolini ● Security Engineer at netnea in Switzerland ● Author, teacher and speaker ● OWASP CRS project Co-Lead
  • 4. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21 Plan for Today ● What is a WAF? ● What is ModSecurity? ● What is Core Rule Set? ● Demo ● Key concepts ● Rules ● False Positives
  • 5. Web Application Firewalls Complex • Overwhelming • Rarely Functional
  • 6. ModSecurity Embedded • Rule oriented • Granular Control
  • 9. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21 Include in server config (depending on path): Include /path-to-owasp-crs/crs-setup.conf Include /path-to-owasp-crs/rules/*.conf Clone the repository (or download latest release): $> git clone https://github.com/coreruleset/coreruleset Copy the example config: $> cp crs-setup.conf.example crs-setup.conf Demo Time (Installation)
  • 10. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21 Research based on 4.5M Burp requests. CRS3 Default Install Redir.: RFI: LFI: XSS: SQLi: 0% 0% -100% -82% -100%
  • 11. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21 Paranoia Level 1: Minimal number of false positives Baseline protection Paranoia Level 2: More rules, some false positives Real data in the service Paranoia Level 3: Specialized rules, more FPs Online banking level security Paranoia Level 4: Crazy rules, many FPs Nuclear power plant level security Paranoia Levels
  • 12. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21 Important Groups of Rules Request Rules REQUEST-910-IP-REPUTATION.conf REQUEST-911-METHOD-ENFORCEMENT.conf REQUEST-912-DOS-PROTECTION.conf REQUEST-913-SCANNER-DETECTION.conf REQUEST-920-PROTOCOL-ENFORCEMENT.conf REQUEST-921-PROTOCOL-ATTACK.conf REQUEST-930-APPLICATION-ATTACK-LFI.conf REQUEST-931-APPLICATION-ATTACK-RFI.conf REQUEST-932-APPLICATION-ATTACK-RCE.conf REQUEST-933-APPLICATION-ATTACK-PHP.conf REQUEST-941-APPLICATION-ATTACK-XSS.conf REQUEST-942-APPLICATION-ATTACK-SQLI.conf REQUEST-943-APPLICATION-ATTACK-SESS-FIX.conf REQUEST-944-APPLICATION-ATTACK-JAVA.conf REQUEST-949-BLOCKING-EVALUATION.conf
  • 13. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21 Important Groups of Rules Response Rules RESPONSE-950-DATA-LEAKAGES.conf RESPONSE-951-DATA-LEAKAGES-SQL.conf RESPONSE-952-DATA-LEAKAGES-JAVA.conf RESPONSE-953-DATA-LEAKAGES-PHP.conf RESPONSE-954-DATA-LEAKAGES-IIS.conf RESPONSE-959-BLOCKING-EVALUATION.conf
  • 14. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21 Paranoia Level Example: Protocol Enforcement Rules Paranoia Level 1: 31 Rules Paranoia Level 2: 7 Rules Paranoia Level 3: 1 Rules Paranoia Level 4: 4 Rules
  • 15. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21 Stricter Siblings Example: Byte Range Enforcement Paranoia Level 1: Rule 920270: Full ASCII range without null character Paranoia Level 2: Rule 920271: Full visible ASCII range, tab, newline Paranoia Level 3: Rule 920272: Visible lower ASCII range without % Paranoia Level 4: Rule 920273: A-Z a-z 0-9 = - _ . , : &
  • 16. Anomaly Scoring Adjustable Limit • Blocking Mode • Iterative Tuning
  • 17. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21 Sampling Mode Easing into CRS adoption / limit the impact • Define a sampling rate of n • Only n% of the requests are being funneled into CRS3 • 100% - n% of requests bypass CRS3 • Monitor performance and fix problems • Slowly raise n in an iterative way until it reaches 100%
  • 18. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
  • 19. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
  • 20. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
  • 21. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
  • 22. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
  • 23. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21
  • 24. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21 False Positives False Positives are expected from PL2 • FPs are fought with rule exclusions • Tutorials at https://www.netnea.com • Get cheatsheet from Netnea • Please report FPs at PL1 (github)
  • 25. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21 Apache / ModSecurity / CRS Tutorials https://www.netnea.com/cms/apache-tutorials/
  • 26. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21 Summary ModSecurity & CRS3 • 1st Line of Defense against web application attacks • Generic set of blacklisting rules for WAFs • Blocks 80% of web application attacks in the default installation (with a minimal number of FPs) • Granular control over the behaviour down to the parameter level More information at https://coreruleset.org
  • 27. @ChrFolini Intro to ModSecurity and CRS – OWASP Munich 2020-07-21 Questions and Answers, Contact Contact: christian.folini@netnea.com @ChrFolini