Extensive Introduction to ModSecurity and the OWASP Core Rule Set

Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
An Extended Introduction to
ModSecurity and the OWASP
Core Rule Set
(CISO Platform / SACON)
Christian Folini / @ChrFolini
Baseline / 1st
Line of Defense
Safety Belts
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
Boring Bio
●
Christian Folini / @ChrFolini
●
Security Engineer at netnea
in Switzerland
●
Author, teacher and speaker
●
OWASP CRS project Co-Lead
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
Plan for Today
●
What is a WAF?
●
What is ModSecurity?
●
What is Core Rule Set?
●
Key concepts
●
Rules
●
False Positives
●
Extensive Demo
Web Application Firewalls
Complex • Overwhelming • Rarely Functional
ModSecurity
Embedded • Rule oriented • Granular Control
Extensive Introduction to ModSecurity and the OWASP Core Rule Set
Extensive Introduction to ModSecurity and the OWASP Core Rule Set
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
Research based on
4.5M Burp requests.
CRS3
Default Install
Redir.:
RFI:
LFI:
XSS:
SQLi:
0%
0%
-100%
-82%
-100%
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
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
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
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
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
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
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
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
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
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
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
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%
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
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)
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
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)
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
Apache / ModSecurity / CRS Tutorials
https://www.netnea.com/cms/apache-tutorials/
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
ModSecurity / CRS Courses
• Offered at https://netnea.com/courses
• Covering the tutorials in an
online or physical class or
as a self-paced Katacoda
• Next online class:
June 28 / June 29, 2021
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
OWASP ModSecurity Core Rule Set
GOLD sponsor
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
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
Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
Slides available at https://www.christian-folini.ch
Questions and Answers, Contact
Contact: christian.folini@netnea.com
@ChrFolini
1 of 29

Recommended

Introduction to ModSecurity and the OWASP Core Rule Set by
Introduction to ModSecurity and the OWASP Core Rule SetIntroduction to ModSecurity and the OWASP Core Rule Set
Introduction to ModSecurity and the OWASP Core Rule SetChristian Folini
296 views27 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

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
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
Microsoft Connect 2018 .NET User Group Paderborn by
Microsoft Connect 2018 .NET User Group PaderbornMicrosoft Connect 2018 .NET User Group Paderborn
Microsoft Connect 2018 .NET User Group PaderbornMark Lechtermann
1.5K views10 slides
015 spins by
015 spins015 spins
015 spinsSam Ram
2.6K views23 slides
SITE TO SITE IPSEC VPN TUNNEL B/W CISCO ROUTERS by
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 Xpert
1.8K views18 slides

What's hot(11)

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
Microsoft Connect 2018 .NET User Group Paderborn by Mark Lechtermann
Microsoft Connect 2018 .NET User Group PaderbornMicrosoft Connect 2018 .NET User Group Paderborn
Microsoft Connect 2018 .NET User Group Paderborn
Mark Lechtermann1.5K views
015 spins by Sam Ram
015 spins015 spins
015 spins
Sam Ram2.6K 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
SPINS: Security Protocols for Sensor Networks by Joon Young Park
SPINS: Security Protocols for Sensor NetworksSPINS: Security Protocols for Sensor Networks
SPINS: Security Protocols for Sensor Networks
Joon Young Park1.1K 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
Feb-8-2012-Breaking-Wireless-Security by Casey Dunham
Feb-8-2012-Breaking-Wireless-SecurityFeb-8-2012-Breaking-Wireless-Security
Feb-8-2012-Breaking-Wireless-Security
Casey Dunham1.6K 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

Similar to Extensive Introduction to ModSecurity and the OWASP Core Rule Set

Introducing the OWASP ModSecurity Core Rule Set by
Introducing the OWASP ModSecurity Core Rule SetIntroducing the OWASP ModSecurity Core Rule Set
Introducing the OWASP ModSecurity Core Rule SetChristian Folini
1.1K views21 slides
Automating cloud security - Jonny Griffin by
Automating cloud security - Jonny GriffinAutomating cloud security - Jonny Griffin
Automating cloud security - Jonny GriffinJonnathan Griffin
103 views59 slides
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
Kernel Recipes 2016 - The kernel report by
Kernel Recipes 2016 - The kernel reportKernel Recipes 2016 - The kernel report
Kernel Recipes 2016 - The kernel reportAnne Nicolas
639 views72 slides
Cilium: Seattle Kubernetes MeetUp Dec 2017 by
Cilium: Seattle Kubernetes MeetUp Dec 2017Cilium: Seattle Kubernetes MeetUp Dec 2017
Cilium: Seattle Kubernetes MeetUp Dec 2017Cynthia Thomas
692 views52 slides
Enabling Production Grade Containerized Applications through Policy Based Inf... by
Enabling Production Grade Containerized Applications through Policy Based Inf...Enabling Production Grade Containerized Applications through Policy Based Inf...
Enabling Production Grade Containerized Applications through Policy Based Inf...Docker, Inc.
4.7K views37 slides

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

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
Automating cloud security - Jonny Griffin by Jonnathan Griffin
Automating cloud security - Jonny GriffinAutomating cloud security - Jonny Griffin
Automating cloud security - Jonny Griffin
Jonnathan Griffin103 views
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
Kernel Recipes 2016 - The kernel report by Anne Nicolas
Kernel Recipes 2016 - The kernel reportKernel Recipes 2016 - The kernel report
Kernel Recipes 2016 - The kernel report
Anne Nicolas639 views
Cilium: Seattle Kubernetes MeetUp Dec 2017 by Cynthia Thomas
Cilium: Seattle Kubernetes MeetUp Dec 2017Cilium: Seattle Kubernetes MeetUp Dec 2017
Cilium: Seattle Kubernetes MeetUp Dec 2017
Cynthia Thomas692 views
Enabling Production Grade Containerized Applications through Policy Based Inf... by Docker, Inc.
Enabling Production Grade Containerized Applications through Policy Based Inf...Enabling Production Grade Containerized Applications through Policy Based Inf...
Enabling Production Grade Containerized Applications through Policy Based Inf...
Docker, Inc.4.7K views
Educating the computer architects of tomorrow's critical systems with RISC-V by RISC-V International
Educating the computer architects of tomorrow's critical systems with RISC-VEducating the computer architects of tomorrow's critical systems with RISC-V
Educating the computer architects of tomorrow's critical systems with RISC-V
Microservices and containers networking: Contiv, an industry leading open sou... by Codemotion
Microservices and containers networking: Contiv, an industry leading open sou...Microservices and containers networking: Contiv, an industry leading open sou...
Microservices and containers networking: Contiv, an industry leading open sou...
Codemotion1.3K views
ModSecurity and NGINX: Tuning the OWASP Core Rule Set (Updated) by NGINX, Inc.
ModSecurity and NGINX: Tuning the OWASP Core Rule Set (Updated)ModSecurity and NGINX: Tuning the OWASP Core Rule Set (Updated)
ModSecurity and NGINX: Tuning the OWASP Core Rule Set (Updated)
NGINX, Inc.2.1K views
Continuous Security: From tins to containers - now what! by Michael Man
Continuous Security: From tins to containers - now what!Continuous Security: From tins to containers - now what!
Continuous Security: From tins to containers - now what!
Michael Man463 views
BRKDCN-2670 Day2 operations for Datacenter VxLAN EVPN fabrics.pdf by HarryH11
BRKDCN-2670 Day2 operations for Datacenter VxLAN EVPN fabrics.pdfBRKDCN-2670 Day2 operations for Datacenter VxLAN EVPN fabrics.pdf
BRKDCN-2670 Day2 operations for Datacenter VxLAN EVPN fabrics.pdf
HarryH1110 views
Chapter 9 lab a security policy development and implementation (instructor ve... by wosborne03
Chapter 9 lab a security policy development and implementation (instructor ve...Chapter 9 lab a security policy development and implementation (instructor ve...
Chapter 9 lab a security policy development and implementation (instructor ve...
wosborne032.6K views
給 RD 的 Kubernetes 初體驗 (EKS version) by William Yeh
給 RD 的 Kubernetes 初體驗 (EKS version)給 RD 的 Kubernetes 初體驗 (EKS version)
給 RD 的 Kubernetes 初體驗 (EKS version)
William Yeh941 views
Microservices and containers networking: Contiv, an industry leading open sou... by Codemotion
Microservices and containers networking: Contiv, an industry leading open sou...Microservices and containers networking: Contiv, an industry leading open sou...
Microservices and containers networking: Contiv, an industry leading open sou...
Codemotion697 views
Digital_Notes___UNIT_5___EC8702___AD_HOC_AND__WIRELESS_SENSOR__NETWORKS.pdf.pdf by Mathavan N
Digital_Notes___UNIT_5___EC8702___AD_HOC_AND__WIRELESS_SENSOR__NETWORKS.pdf.pdfDigital_Notes___UNIT_5___EC8702___AD_HOC_AND__WIRELESS_SENSOR__NETWORKS.pdf.pdf
Digital_Notes___UNIT_5___EC8702___AD_HOC_AND__WIRELESS_SENSOR__NETWORKS.pdf.pdf
Mathavan N15 views
Using IO Visor to Secure Microservices Running on CloudFoundry [OpenStack Sum... by IO Visor Project
Using IO Visor to Secure Microservices Running on CloudFoundry [OpenStack Sum...Using IO Visor to Secure Microservices Running on CloudFoundry [OpenStack Sum...
Using IO Visor to Secure Microservices Running on CloudFoundry [OpenStack Sum...
IO Visor Project1.6K views
Openstack Summit: Networking and policies across Containers and VMs by Sanjeev Rampal
Openstack Summit: Networking and policies across Containers and VMsOpenstack Summit: Networking and policies across Containers and VMs
Openstack Summit: Networking and policies across Containers and VMs
Sanjeev Rampal330 views
ModSecurity and NGINX: Tuning the OWASP Core Rule Set by NGINX, Inc.
ModSecurity and NGINX: Tuning the OWASP Core Rule SetModSecurity and NGINX: Tuning the OWASP Core Rule Set
ModSecurity and NGINX: Tuning the OWASP Core Rule Set
NGINX, Inc.333 views
Distributed Development, Centralised Delivery - SAGrid Jenkins + CVMFS by Bruce Becker
Distributed Development, Centralised Delivery - SAGrid Jenkins + CVMFSDistributed Development, Centralised Delivery - SAGrid Jenkins + CVMFS
Distributed Development, Centralised Delivery - SAGrid Jenkins + CVMFS
Bruce Becker544 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
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
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

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
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
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
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

HTTP headers that make your website go faster - devs.gent November 2023 by
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023Thijs Feryn
28 views151 slides
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ... by
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...ShapeBlue
77 views12 slides
Business Analyst Series 2023 - Week 4 Session 7 by
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7DianaGray10
80 views31 slides
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Safe Software
344 views86 slides
MVP and prioritization.pdf by
MVP and prioritization.pdfMVP and prioritization.pdf
MVP and prioritization.pdfrahuldharwal141
38 views8 slides
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...James Anderson
133 views32 slides

Recently uploaded(20)

HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn28 views
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ... by ShapeBlue
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
ShapeBlue77 views
Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray1080 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software344 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson133 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue46 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue102 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
State of the Union - Rohit Yadav - Apache CloudStack by ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue145 views
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue65 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely56 views
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue by ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue50 views
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... by Moses Kemibaro
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Moses Kemibaro29 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue131 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays40 views
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue83 views

Extensive Introduction to ModSecurity and the OWASP Core Rule Set

  • 1. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 An Extended Introduction to ModSecurity and the OWASP Core Rule Set (CISO Platform / SACON) Christian Folini / @ChrFolini
  • 2. Baseline / 1st Line of Defense Safety Belts
  • 3. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 Boring Bio ● Christian Folini / @ChrFolini ● Security Engineer at netnea in Switzerland ● Author, teacher and speaker ● OWASP CRS project Co-Lead
  • 4. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 Plan for Today ● What is a WAF? ● What is ModSecurity? ● What is Core Rule Set? ● Key concepts ● Rules ● False Positives ● Extensive Demo
  • 5. Web Application Firewalls Complex • Overwhelming • Rarely Functional
  • 6. ModSecurity Embedded • Rule oriented • Granular Control
  • 9. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 Research based on 4.5M Burp requests. CRS3 Default Install Redir.: RFI: LFI: XSS: SQLi: 0% 0% -100% -82% -100%
  • 10. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 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
  • 11. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 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
  • 12. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 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
  • 13. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 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
  • 14. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 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 = - _ . , : &
  • 15. Anomaly Scoring Adjustable Limit • Blocking Mode • Iterative Tuning
  • 16. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 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%
  • 17. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
  • 18. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
  • 19. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
  • 20. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
  • 21. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
  • 22. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021
  • 23. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 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)
  • 24. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 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. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 Apache / ModSecurity / CRS Tutorials https://www.netnea.com/cms/apache-tutorials/
  • 26. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 ModSecurity / CRS Courses • Offered at https://netnea.com/courses • Covering the tutorials in an online or physical class or as a self-paced Katacoda • Next online class: June 28 / June 29, 2021
  • 27. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 OWASP ModSecurity Core Rule Set GOLD sponsor
  • 28. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 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
  • 29. Intro to ModSecurity and CRS – CISO Platform/SACON June 2/3, 2021 Slides available at https://www.christian-folini.ch Questions and Answers, Contact Contact: christian.folini@netnea.com @ChrFolini