SlideShare a Scribd company logo
1 of 25
Web Application Firewall
Introduction to ModSecurity
$ whoami
- Chandrapal
- Security Enthusiast
- Maintainer of @HackwithGithub
Contact:
- @bnchandrapal
- @HackwithGithub
Overview
- Introduction to WAF
- Different WAFs
- Implementation Models
- Mode of Action
- Pros
- Introduction to ModSecurity
- ModSecurity Concepts
- Cons
Introduction to WAF

Internet - created for sharing resources - without
security concern

It was static and lots of blogs, manuals and images

No logins - even if present it was easy to bruteforce

Dynamic websites with logins evolved and HTTPS was
introduced

HTTPS prevents MitM not logical errors
Introduction to WAF

Firewalls -> IDS -> IPS

Firewalls - work at network level - scanning each and
every packet makes the network slow

WAF : Web Application Firewall

Deals with web applications only - logical level
Different WAF
- Appliance-based Web application firewalls : Mostly hardware
Ex: Netscaler MPX WAF by Citrix
- Cloud and hybrid Web application firewalls : Entire infrastructure shared
with WAF providers, DDoS protection. Hybrid solutions are great for distributed
environments (such as multiple business locations) or when virtual deployments
make sense for an organization.
Ex: Cloud WAF: Incapsula's industry-leading WAF service
WAF product from Qualys exemplifies a hybrid virtual appliance/cloud approach.
Implementation Models

Positive Model: Focuses on what content should be
allowed i.e. whitelisting technique

Negative Model: Focuses on what should not be
allowed i.e. blacklisting technique

Mixed Model: Combination of both positive and negative
models
Positive Model
A positive security model enforces positive behavior by
learning the application logic and then building a security
policy of valid known requests as a user interacts with the
application.
Example:
Page news.jsp, the field id could only accept characters [0-9]
and starting at number 0 until 65535.
Positive Model
Pros:

Better performance (less rules).

Less false positives.
Cons:

Much more time to implement.

Some vendors provide “automatic learning mode”, they
help, but are far from perfect, in the end, you always need
a skilled human to review the policies.
Negative Model
A negative security model recognize attacks by relying on a
database of expected attack signatures.
Example:
Do not allow in any page, any argument value (user input)
which match potential XSS strings like <script>, </script> ,
String.fromCharCode, etc.
Negative Model
Pros:

Less time to implement
Cons:

More false positives.

More processing time.

Less protection.
Mode of Action
Based on the mode of action taken by firewalls:
Passive mode: If any suspicious activity detected, it gets
logged and a message is sent to the admin for manual
action
Reactive mode: If any suspicious activity detected, it
automatically blocks / resets the connection
Deployment Options - Embedded
Deployment Options - Reverse Proxy
WAF goes
here
Deployment Options - Port Mirroring
Pros
Virtual Patching : security policy enforcement layer which
prevents the exploitation of known vulnerability
Authenticate users directly : allow or deny a specific
incoming telnet command from a particular user
Better content filtering capabilities : ability to examine
the payload of packet
Stops Data Leakage *
ModSecurity

13 years old

Protects millions of websites

Community Support

Open source license (Apache Software License v2) for
OWASP Core Rule Set

Commercial Rule Set by Trustwave Spiderlabs

OWASP Core Rule Set providing general protection

One config to rule them all (Apache, IIS, nginx)
Why ModSecurity ?
* www.zeroscience.mk
ModSecurity Concepts
Processing Phases:

Request Headers

Request Body

Response Headers

Response Body

Logging / Action
ModSecurity Concepts
Transformations

Can be nested / run in serial

Replace Comments (SQLi)

URL Encode / Decode

Hex Encode / Decode

JavaScript Decode

HTML Entity Decode

Uppercase / Lowercase
Cons

False Positives

Packets should pass 7 layers of OSI - consumes a lot of CPU
cycle

vulnerable to the security loopholes of the underlying operating
system - susceptible to DDoS

reduced scalability of web apps **

positive model : Model are generally more expensive and
sophisticated

negative model : Protects known vulnerabilities - not 0days
Cons

False positives
BEST PART - 56.0% companies get fp less than 25%
WORST PART - 4.0% companies get false positives more than 95%
[not well verse in regex]
[ Could be corrected with manual log inspection ]

Not user-friendly
THANK YOU
Any Questions
Resources
Official website: https://modsecurity.org/
https://github.com/SpiderLabs/owasp-modsecurity-crs
http://www.slideshare.net/zeroscience/cloudflare-vs-incapsula-vs-modsecurity
https://www.trustwave.com/Resources/SpiderLabs-Blog/OWASP-Virtual-Patching-Surv
https://www.youtube.com/watch?v=HkA_YRSb3jU [Defcon ]
https://www.youtube.com/watch?v=208bFToRJqo [BlackHat]
https://www.youtube.com/watch?v=pKGdIxArlKU

More Related Content

What's hot

F5 - BigIP ASM introduction
F5 - BigIP ASM introductionF5 - BigIP ASM introduction
F5 - BigIP ASM introduction
Jimmy Saigon
 

What's hot (20)

Palo Alto Networks 28.5.2013
Palo Alto Networks 28.5.2013Palo Alto Networks 28.5.2013
Palo Alto Networks 28.5.2013
 
DDoS ATTACKS
DDoS ATTACKSDDoS ATTACKS
DDoS ATTACKS
 
Endpoint Detection & Response - FireEye
Endpoint Detection & Response - FireEyeEndpoint Detection & Response - FireEye
Endpoint Detection & Response - FireEye
 
EDR(End Point Detection And Response).pptx
EDR(End Point Detection And Response).pptxEDR(End Point Detection And Response).pptx
EDR(End Point Detection And Response).pptx
 
Security vulnerability
Security vulnerabilitySecurity vulnerability
Security vulnerability
 
Breach and attack simulation tools
Breach and attack simulation toolsBreach and attack simulation tools
Breach and attack simulation tools
 
OWASP Top 10 2021 Presentation (Jul 2022)
OWASP Top 10 2021 Presentation (Jul 2022)OWASP Top 10 2021 Presentation (Jul 2022)
OWASP Top 10 2021 Presentation (Jul 2022)
 
DDoS Protection
DDoS ProtectionDDoS Protection
DDoS Protection
 
F5 - BigIP ASM introduction
F5 - BigIP ASM introductionF5 - BigIP ASM introduction
F5 - BigIP ASM introduction
 
Application Security
Application SecurityApplication Security
Application Security
 
OWASP Top 10 2021 What's New
OWASP Top 10 2021 What's NewOWASP Top 10 2021 What's New
OWASP Top 10 2021 What's New
 
Buffer overflow attacks
Buffer overflow attacksBuffer overflow attacks
Buffer overflow attacks
 
The WAF book (Web App Firewall )
The WAF book  (Web App Firewall )The WAF book  (Web App Firewall )
The WAF book (Web App Firewall )
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applications
 
Breaking the cyber kill chain!
Breaking the cyber kill chain!Breaking the cyber kill chain!
Breaking the cyber kill chain!
 
Threat Hunting with Splunk Hands-on
Threat Hunting with Splunk Hands-onThreat Hunting with Splunk Hands-on
Threat Hunting with Splunk Hands-on
 
Radware - WAF (Web Application Firewall)
Radware - WAF (Web Application Firewall)Radware - WAF (Web Application Firewall)
Radware - WAF (Web Application Firewall)
 
Introduction to Web Application Penetration Testing
Introduction to Web Application Penetration TestingIntroduction to Web Application Penetration Testing
Introduction to Web Application Penetration Testing
 
Introduction to Web Server Security
Introduction to Web Server SecurityIntroduction to Web Server Security
Introduction to Web Server Security
 
SOC Architecture Workshop - Part 1
SOC Architecture Workshop - Part 1SOC Architecture Workshop - Part 1
SOC Architecture Workshop - Part 1
 

Viewers also liked

Confoo 2012 - Web security keynote
Confoo 2012 - Web security keynoteConfoo 2012 - Web security keynote
Confoo 2012 - Web security keynote
Antonio Fontes
 

Viewers also liked (20)

Avoid Getting Hacked! Presentation on Joomla! Web Security
Avoid Getting Hacked! Presentation on Joomla! Web Security Avoid Getting Hacked! Presentation on Joomla! Web Security
Avoid Getting Hacked! Presentation on Joomla! Web Security
 
Confoo 2012 - Web security keynote
Confoo 2012 - Web security keynoteConfoo 2012 - Web security keynote
Confoo 2012 - Web security keynote
 
QualysGuard InfoDay 2013 - Web Application Firewall
QualysGuard InfoDay 2013 - Web Application FirewallQualysGuard InfoDay 2013 - Web Application Firewall
QualysGuard InfoDay 2013 - Web Application Firewall
 
Buffer overflow null
Buffer overflow nullBuffer overflow null
Buffer overflow null
 
Http2 Security Perspective
Http2 Security PerspectiveHttp2 Security Perspective
Http2 Security Perspective
 
3Es of Ransomware
3Es of Ransomware3Es of Ransomware
3Es of Ransomware
 
Security certifications
Security certificationsSecurity certifications
Security certifications
 
Web Services Security - Presentation
Web Services Security - PresentationWeb Services Security - Presentation
Web Services Security - Presentation
 
Web application attack Presentation
Web application attack PresentationWeb application attack Presentation
Web application attack Presentation
 
Secure coding in C#
Secure coding in C#Secure coding in C#
Secure coding in C#
 
Security-Web Vulnerabilities-Browser Attacks
Security-Web Vulnerabilities-Browser AttacksSecurity-Web Vulnerabilities-Browser Attacks
Security-Web Vulnerabilities-Browser Attacks
 
Owasp top 10
Owasp top 10 Owasp top 10
Owasp top 10
 
Beginner talk physical security - manasdeep
Beginner talk   physical security - manasdeepBeginner talk   physical security - manasdeep
Beginner talk physical security - manasdeep
 
Metasploit For Beginners
Metasploit For BeginnersMetasploit For Beginners
Metasploit For Beginners
 
Why You Need A Web Application Firewall
Why You Need A Web Application FirewallWhy You Need A Web Application Firewall
Why You Need A Web Application Firewall
 
Web security presentation
Web security presentationWeb security presentation
Web security presentation
 
Citrix & Canalys: Northern European Channel Partners in a State of Transforma...
Citrix & Canalys: Northern European Channel Partners in a State of Transforma...Citrix & Canalys: Northern European Channel Partners in a State of Transforma...
Citrix & Canalys: Northern European Channel Partners in a State of Transforma...
 
Network discovery - Inside out by Aakash Goel
Network discovery - Inside out by Aakash GoelNetwork discovery - Inside out by Aakash Goel
Network discovery - Inside out by Aakash Goel
 
Firewall
Firewall Firewall
Firewall
 
Web application attacks
Web application attacksWeb application attacks
Web application attacks
 

Similar to Web Application Firewall

ubantu mod security
ubantu mod securityubantu mod security
ubantu mod security
Kunal gupta
 
Security Operations
Security OperationsSecurity Operations
Security Operations
ankitmehta21
 
CMS Website Security Threat Protection Oriented Analyzer System
CMS Website Security Threat Protection Oriented Analyzer SystemCMS Website Security Threat Protection Oriented Analyzer System
CMS Website Security Threat Protection Oriented Analyzer System
Editor IJCATR
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
Nelsan Ellis
 

Similar to Web Application Firewall (20)

Web Access Firewall
Web Access FirewallWeb Access Firewall
Web Access Firewall
 
ubantu mod security
ubantu mod securityubantu mod security
ubantu mod security
 
How to Make Your NodeJS Application Secure (24 Best Security Tips )
How to Make Your NodeJS Application Secure (24 Best Security Tips )How to Make Your NodeJS Application Secure (24 Best Security Tips )
How to Make Your NodeJS Application Secure (24 Best Security Tips )
 
CIS 2015 Identity and Data Security : Breaking the Boundaries - Nathanael Cof...
CIS 2015 Identity and Data Security : Breaking the Boundaries - Nathanael Cof...CIS 2015 Identity and Data Security : Breaking the Boundaries - Nathanael Cof...
CIS 2015 Identity and Data Security : Breaking the Boundaries - Nathanael Cof...
 
Security Operations
Security OperationsSecurity Operations
Security Operations
 
2009: Securing Applications With Web Application Firewalls and Vulnerability ...
2009: Securing Applications With Web Application Firewalls and Vulnerability ...2009: Securing Applications With Web Application Firewalls and Vulnerability ...
2009: Securing Applications With Web Application Firewalls and Vulnerability ...
 
Solution Brief
Solution BriefSolution Brief
Solution Brief
 
The Web AppSec How-To: The Defender's Toolbox
The Web AppSec How-To: The Defender's ToolboxThe Web AppSec How-To: The Defender's Toolbox
The Web AppSec How-To: The Defender's Toolbox
 
CMS Website Security Threat Protection Oriented Analyzer System
CMS Website Security Threat Protection Oriented Analyzer SystemCMS Website Security Threat Protection Oriented Analyzer System
CMS Website Security Threat Protection Oriented Analyzer System
 
Layer 7 Technologies: Web Services Hacking And Hardening
Layer 7 Technologies: Web Services Hacking And HardeningLayer 7 Technologies: Web Services Hacking And Hardening
Layer 7 Technologies: Web Services Hacking And Hardening
 
VMworld 2013: Introducing NSX Service Composer: The New Consumption Model for...
VMworld 2013: Introducing NSX Service Composer: The New Consumption Model for...VMworld 2013: Introducing NSX Service Composer: The New Consumption Model for...
VMworld 2013: Introducing NSX Service Composer: The New Consumption Model for...
 
Detection of webshells in compromised perimeter assets using ML algorithms
Detection of webshells in compromised perimeter assets using ML algorithms Detection of webshells in compromised perimeter assets using ML algorithms
Detection of webshells in compromised perimeter assets using ML algorithms
 
How PCI And PA DSS will change enterprise applications
How PCI And PA DSS will change enterprise applicationsHow PCI And PA DSS will change enterprise applications
How PCI And PA DSS will change enterprise applications
 
security onion
security onionsecurity onion
security onion
 
Advanced Security Automation Made Simple
Advanced Security Automation Made SimpleAdvanced Security Automation Made Simple
Advanced Security Automation Made Simple
 
Day4
Day4Day4
Day4
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
Ajax Security
Ajax SecurityAjax Security
Ajax Security
 
Cloude computing notes for Rgpv 7th sem student
Cloude computing notes for Rgpv 7th sem studentCloude computing notes for Rgpv 7th sem student
Cloude computing notes for Rgpv 7th sem student
 
WAF 101
WAF 101WAF 101
WAF 101
 

More from Chandrapal Badshah

More from Chandrapal Badshah (11)

Dangling DNS records takeover at scale
Dangling DNS records takeover at scaleDangling DNS records takeover at scale
Dangling DNS records takeover at scale
 
Detecting secrets in code committed to gitlab (in real time)
Detecting secrets in code committed to gitlab (in real time)Detecting secrets in code committed to gitlab (in real time)
Detecting secrets in code committed to gitlab (in real time)
 
How to get started in InfoSec ?
How to get started in InfoSec ?How to get started in InfoSec ?
How to get started in InfoSec ?
 
OSINT mindset to protect your organization - Null monthly meet version
OSINT mindset to protect your organization - Null monthly meet versionOSINT mindset to protect your organization - Null monthly meet version
OSINT mindset to protect your organization - Null monthly meet version
 
OSINT Mindset to protect your Organization
OSINT Mindset to protect your OrganizationOSINT Mindset to protect your Organization
OSINT Mindset to protect your Organization
 
Solving OWASP MSTG CrackMe using Frida
Solving OWASP MSTG CrackMe using FridaSolving OWASP MSTG CrackMe using Frida
Solving OWASP MSTG CrackMe using Frida
 
OWASP Serverless Top 10
OWASP Serverless Top 10OWASP Serverless Top 10
OWASP Serverless Top 10
 
Pentesting Android Apps using Frida (Beginners)
Pentesting Android Apps using Frida (Beginners)Pentesting Android Apps using Frida (Beginners)
Pentesting Android Apps using Frida (Beginners)
 
Let’s hunt the target using OSINT
Let’s hunt the target using OSINTLet’s hunt the target using OSINT
Let’s hunt the target using OSINT
 
pwnd.sh
pwnd.shpwnd.sh
pwnd.sh
 
Netcat - A Swiss Army Tool
Netcat - A Swiss Army ToolNetcat - A Swiss Army Tool
Netcat - A Swiss Army Tool
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Web Application Firewall