SlideShare a Scribd company logo
The Death of Web App Firewall
Brian A. McHenry
bam@f5.com
@bamchenry
( as we know it )
Agenda
•  Brief primer on traditional WAF approach
•  Why this approach will (and should) die
•  How WAF can stay relevant in your AppSec practice
•  Why a new approach is valuable
How does a WAF work?
Start by checking RFC
compliance1
Then check for various length
limits in the HTTP2
Then we can enforce valid
types for the application3
Then we can enforce a list of
valid URLs4
Then we can check for a list of
valid parameters5
Then for each parameter we
will check for max value length6
Then scan each parameter,
the URI, the headers with
attack signatures
7
GET /search.php?name=Acme’s&admin=1 HTTP/1.1
Host: foo.comrn
Connection: keep-alivern
User-Agent: Mozilla/5.0 (Windows NT 6.1)rn
Accept:text/html,application/xhtml+xml,application/xml;q=0.9r
Referer: http://172.29.44.44/search.php?q=datarn
Accept-Encoding: gzip,deflate,sdchrn
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn
Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
How does a WAF work?
Start by checking RFC
compliance1
Then check for various length
limits in the HTTP2
Then we can enforce valid
types for the application3
Then we can enforce a list of
valid URLs4
Then we can check for a list of
valid parameters5
Then for each parameter we
will check for max value length6
Then scan each parameter,
the URI, the headers with
attack signatures
7
GET /search.php?name=Acme’s&admin=1 HTTP/1.1rn
Host: foo.comrnrn
Connection: keep-alivernrn
User-Agent: Mozilla/5.0 (Windows NT 6.1)rn
Accept:text/html,application/xhtml+xml,application/xml;q=0.9rn
Referer: http://172.29.44.44/search.php?q=datarnrn
Accept-Encoding: gzip,deflate,sdchrnrn
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rnrn
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rnrn
Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226rn
How does a WAF work?
Start by checking RFC
compliance1
Then check for various length
limits in the HTTP2
Then we can enforce valid
types for the application3
Then we can enforce a list of
valid URLs4
Then we can check for a list of
valid parameters5
Then for each parameter we
will check for max value length6
Then scan each parameter,
the URI, the headers with
attack signatures
7
GET /search.php?name=Acme’s&admin=1 HTTP/1.1
Host: foo.comrn
Connection: keep-alivern
User-Agent: Mozilla/5.0 (Windows NT 6.1)rn
Accept:text/html,application/xhtml+xml,application/xml;q=0.9r
Referer: http://172.29.44.44/search.php?q=datarn
Accept-Encoding: gzip,deflate,sdchrn
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn
Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
How does a WAF work?
Start by checking RFC
compliance1
Then check for various length
limits in the HTTP2
Then we can enforce valid
types for the application3
Then we can enforce a list of
valid URLs4
Then we can check for a list of
valid parameters5
Then for each parameter we
will check for max value length6
Then scan each parameter,
the URI, the headers with
attack signatures
7
GET /search.php?name=Acme’s&admin=1 HTTP/1.1
Host: foo.comrn
Connection: keep-alivern
User-Agent: Mozilla/5.0 (Windows NT 6.1)rn
Accept:text/html,application/xhtml+xml,application/xml;q=0.9r
Referer: http://172.29.44.44/search.php?q=datarn
Accept-Encoding: gzip,deflate,sdchrn
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn
Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
How does a WAF work?
Start by checking RFC
compliance1
Then check for various length
limits in the HTTP2
Then we can enforce valid
types for the application3
Then we can enforce a list of
valid URLs4
Then we can check for a list of
valid parameters5
Then for each parameter we
will check for max value length6
Then scan each parameter,
the URI, the headers with
attack signatures
7
GET /search.php?name=Acme’s&admin=1 HTTP/1.1
Host: foo.comrn
Connection: keep-alivern
User-Agent: Mozilla/5.0 (Windows NT 6.1)rn
Accept:text/html,application/xhtml+xml,application/xml;q=0.9r
Referer: http://172.29.44.44/search.php?q=datarn
Accept-Encoding: gzip,deflate,sdchrn
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn
Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
How does a WAF work?
Start by checking RFC
compliance1
Then check for various length
limits in the HTTP2
Then we can enforce valid
types for the application3
Then we can enforce a list of
valid URLs4
Then we can check for a list of
valid parameters5
Then for each parameter we
will check for max value length6
Then scan each parameter,
the URI, the headers with
attack signatures
7
GET /search.php?name=Acme’s&admin=1 HTTP/1.1
Host: foo.comrn
Connection: keep-alivern
User-Agent: Mozilla/5.0 (Windows NT 6.1)rn
Accept:text/html,application/xhtml+xml,application/xml;q=0.9r
Referer: http://172.29.44.44/search.php?q=datarn
Accept-Encoding: gzip,deflate,sdchrn
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn
Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
How does a WAF work?
Start by checking RFC
compliance1
Then check for various length
limits in the HTTP2
Then we can enforce valid
types for the application3
Then we can enforce a list of
valid URLs4
Then we can check for a list of
valid parameters5
Then for each parameter we
will check for max value length6
Then scan each parameter,
the URI, the headers with
attack signatures
7
GET /search.asp?name=Acme’s&admin=1 HTTP/1.1
Host: foo.comrn
Connection: keep-alivern
User-Agent: Mozilla/5.0 (Windows NT 6.1)rn
Accept:text/html,application/xhtml+xml,application/xml;q=0.9r
Referer: http://172.29.44.44/search.php?q=datarn
Accept-Encoding: gzip,deflate,sdchrn
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn
Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
How does a WAF work?
Start by checking RFC
compliance1
Then check for various length
limits in the HTTP2
Then we can enforce valid
types for the application3
Then we can enforce a list of
valid URLs4
Then we can check for a list of
valid parameters5
Then for each parameter we
will check for max value length6
Then scan each parameter,
the URI, the headers with
attack signatures
7
GET /search.do ?name=Acme’s&admin=1 HTTP/1.1
Host: foo.comrn
Connection: keep-alivern
User-Agent: Mozilla/5.0 (Windows NT 6.1)rn
Accept:text/html,application/xhtml+xml,application/xml;q=0.9r
Referer: http://172.29.44.44/search.php?q=datarn
Accept-Encoding: gzip,deflate,sdchrn
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn
Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
How does a WAF work?
Start by checking RFC
compliance1
Then check for various length
limits in the HTTP2
Then we can enforce valid
types for the application3
Then we can enforce a list of
valid URLs4
Then we can check for a list of
valid parameters5
Then for each parameter we
will check for max value length6
Then scan each parameter,
the URI, the headers with
attack signatures
7
GET /search.php?name=Acme’s&admin=1 HTTP/1.1
Host: foo.comrn
Connection: keep-alivern
User-Agent: Mozilla/5.0 (Windows NT 6.1)rn
Accept:text/html,application/xhtml+xml,application/xml;q=0.9r
Referer: http://172.29.44.44/search.php?q=datarn
Accept-Encoding: gzip,deflate,sdchrn
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn
Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
How does a WAF work?
Start by checking RFC
compliance1
Then check for various length
limits in the HTTP2
Then we can enforce valid
types for the application3
Then we can enforce a list of
valid URLs4
Then we can check for a list of
valid parameters5
Then for each parameter we
will check for max value length6
Then scan each parameter,
the URI, the headers with
attack signatures
7
GET /login.php?name=Acme’s&admin=1 HTTP/1.1
Host: foo.comrn
Connection: keep-alivern
User-Agent: Mozilla/5.0 (Windows NT 6.1)rn
Accept:text/html,application/xhtml+xml,application/xml;q=0.9r
Referer: http://172.29.44.44/search.php?q=datarn
Accept-Encoding: gzip,deflate,sdchrn
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn
Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
How does a WAF work?
Start by checking RFC
compliance1
Then check for various length
limits in the HTTP2
Then we can enforce valid
types for the application3
Then we can enforce a list of
valid URLs4
Then we can check for a list of
valid parameters5
Then for each parameter we
will check for max value length6
Then scan each parameter,
the URI, the headers with
attack signatures
7
GET /logout.php?name=Acme’s&admin=1 HTTP/1.1
Host: foo.comrn
Connection: keep-alivern
User-Agent: Mozilla/5.0 (Windows NT 6.1)rn
Accept:text/html,application/xhtml+xml,application/xml;q=0.9r
Referer: http://172.29.44.44/search.php?q=datarn
Accept-Encoding: gzip,deflate,sdchrn
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn
Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
How does a WAF work?
Start by checking RFC
compliance1
Then check for various length
limits in the HTTP2
Then we can enforce valid
types for the application3
Then we can enforce a list of
valid URLs4
Then we can check for a list of
valid parameters5
Then for each parameter we
will check for max value length6
Then scan each parameter,
the URI, the headers with
attack signatures
7
GET /search.php?name=Acme’s&admin=1 HTTP/1.1
Host: foo.comrn
Connection: keep-alivern
User-Agent: Mozilla/5.0 (Windows NT 6.1)rn
Accept:text/html,application/xhtml+xml,application/xml;q=0.9r
Referer: http://172.29.44.44/search.php?q=datarn
Accept-Encoding: gzip,deflate,sdchrn
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn
Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
How does a WAF work?
Start by checking RFC
compliance1
Then check for various length
limits in the HTTP2
Then we can enforce valid
types for the application3
Then we can enforce a list of
valid URLs4
Then we can check for a list of
valid parameters5
Then for each parameter we
will check for max value length6
Then scan each parameter,
the URI, the headers with
attack signatures
7
GET /search.php?name=Acme’s&admin=1 HTTP/1.1
Host: foo.comrn
Connection: keep-alivern
User-Agent: Mozilla/5.0 (Windows NT 6.1)rn
Accept:text/html,application/xhtml+xml,application/xml;q=0.9r
Referer: http://172.29.44.44/search.php?q=datarn
Accept-Encoding: gzip,deflate,sdchrn
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn
Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
How does a WAF work?
Start by checking RFC
compliance1
Then check for various length
limits in the HTTP2
Then we can enforce valid
types for the application3
Then we can enforce a list of
valid URLs4
Then we can check for a list of
valid parameters5
Then for each parameter we
will check for max value length6
Then scan each parameter,
the URI, the headers with
attack signatures
7
GET /search.php?name=Acme’s&admin=1 HTTP/1.1
Host: foo.comrn
Connection: keep-alivern
User-Agent: Mozilla/5.0 (Windows NT 6.1)rn
Accept:text/html,application/xhtml+xml,application/xml;q=0.9r
Referer: http://172.29.44.44/search.php?q=datarn
Accept-Encoding: gzip,deflate,sdchrn
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn
Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
That sounds really good, but…
Who Owns the WAF?
Network Team App Dev TeamSecurity Team
NOT IT!
My kingdom for a WAF admin!
WAF Administrator
With Great Power…
•  Each web application is a snowflake!
•  Application deploys can be too frequent for
WAF policy tweaks to keep up.
•  In DevOps environments, continuous
delivery enables rapid vuln fixes in code.
WAF Administrator
What’s left for WAF?
What’s left for WAF?
•  Focus on non-snowflake problems
•  Extend and enrich web applications where possible
•  Behavioral analysis
•  WAF injects a JS challenge with obfuscated
cookie
•  Legitimate browsers resend the request with
cookie
•  WAF checks and validates the cookie
•  Requests with valid signed cookie are then
passed through to the server
•  Invalidated requests are dropped or
terminated
•  Cookie expiration and client IP address are
enforced – no replay attacks
•  Prevented attacks will be reported and
logged w/o detected attack
1st time
request to web
server
WAF-based Bot Detection
Internet
Web
Application
Legitimate browser
verification
No challenge
response from
bots
BOTS ARE
DROPPED
WAF responds with
injected JS
challenge. Request
is not passed to
server
JS challenge
placed in browser
-  WAF verifies
response
authenticity
-  Cookie is signed,
time stamped
and finger printed
Valid requests are
passed to the
server
Browser
responds to
challenge &
resends request
Continuous invalid
bot attempts are
blocked
Valid browser requests
bypass challenge w/
future requests
Protocol Compliance Checks
•  HTTP Protocol compliance, of course.
– Mitigates attacks like SlowLoris, and other timing attacks.
•  But also, TLS protocol and cipher enforcement
– Centralized control of allowed ciphers and protocols
– Protection from vulnerabilities like Heartbleed, FREAK
•  TCP handshake enforcement
– Full proxy WAF should be able to detect idle TCP sessions,
reducing load on web app servers
Behavioral Analysis & Fingerprinting
•  Detect GET flood attacks against Heavy URI’s
•  Identify non-human surfing patterns
•  Fingerprinting to identify beyond IP address
– Track fingerprinted sessions
– Assign risk scores to sessions
– Identify known malicious browser extensions
•  http://PanOpticlick.eff.org for a primer on the topic
What’s a Heavy URI?
•  Any URI inducing greater server load upon request
•  Requests that take a long time to complete
•  Requests that yield large response sizes
© F5 Networks, Inc 28CONFIDENTIAL
•  Attackers are proficient at network
reconnaissance
–  They obtain a list of site URIs
–  Sort by time-to-complete (CPU cost)
–  Sort list by megabytes (Bandwidth)
•  Spiders (bots) available to automate
–  Though they are often known by the
security community
–  Can be executed with a simple wget
script, or OWASP HTTP Post tool
Tools and Methods of L7 DoS Attacks
Exploiting POST for Fun & DoS
• Determine:
– URL’s accepting POST
– Max size for POST
• Bypass CDN protections (POST
isn’t cache-able)
• Fingerprint both TCP & app at
the origin
Attackers work to identify weaknesses in
application infrastructure
Network Reconnaissance Example
THANK YOU!
Contact me:
@bamchenry
bam@f5.com
Reference:
http://informationsecuritybuzz.com/the-death-of-waf-as-we-know-it/

More Related Content

PDF
wolfSSL and TLS 1.3
PPTX
BlueHat v17 || TLS 1.3 - Full speed ahead... mind the warnings - the great, t...
PPT
Sniffing SSL Traffic
PDF
wolfSSL TLS 1.3 Support in 2018
PPTX
ModSecurity and NGINX: Tuning the OWASP Core Rule Set - EMEA (Updated)
PPTX
ModSecurity and NGINX: Tuning the OWASP Core Rule Set
PDF
ModSecurity and NGINX: Tuning the OWASP Core Rule Set - EMEA
PDF
Carlos García - Pentesting Active Directory [rooted2018]
wolfSSL and TLS 1.3
BlueHat v17 || TLS 1.3 - Full speed ahead... mind the warnings - the great, t...
Sniffing SSL Traffic
wolfSSL TLS 1.3 Support in 2018
ModSecurity and NGINX: Tuning the OWASP Core Rule Set - EMEA (Updated)
ModSecurity and NGINX: Tuning the OWASP Core Rule Set
ModSecurity and NGINX: Tuning the OWASP Core Rule Set - EMEA
Carlos García - Pentesting Active Directory [rooted2018]

What's hot (19)

PDF
TLS/SSL Protocol Design
PDF
New DNS Traffic Analysis Techniques to Identify Global Internet Threats
PDF
Carlos García - Pentesting Active Directory Forests [rooted2019]
PPTX
ModSecurity 3.0 and NGINX: Getting Started - EMEA
PDF
DANE and Application Uses of DNSSEC
PDF
Assume Compromise
PDF
Securing Data in Transit -
PDF
Webinar SSL English
PPTX
Detecting Malicious SSL Certificates Using Bro
PDF
Extending Zeek for ICS Defense
PDF
Null 11 june_Malware CNC: Advance Evasion techniques_by Avkash k and dhawal shah
PDF
Строим ханипот и выявляем DDoS-атаки
PDF
Seven Grades of Perfect Forward Secrecy
PPTX
SSL/TLS 101
PPTX
FastNetMon Advanced DDoS detection tool
PPT
Introduction to Secure Sockets Layer
PPTX
BlueHat v17 || Scaling Incident Response - 5 Keys to Successful Defense at S...
TLS/SSL Protocol Design
New DNS Traffic Analysis Techniques to Identify Global Internet Threats
Carlos García - Pentesting Active Directory Forests [rooted2019]
ModSecurity 3.0 and NGINX: Getting Started - EMEA
DANE and Application Uses of DNSSEC
Assume Compromise
Securing Data in Transit -
Webinar SSL English
Detecting Malicious SSL Certificates Using Bro
Extending Zeek for ICS Defense
Null 11 june_Malware CNC: Advance Evasion techniques_by Avkash k and dhawal shah
Строим ханипот и выявляем DDoS-атаки
Seven Grades of Perfect Forward Secrecy
SSL/TLS 101
FastNetMon Advanced DDoS detection tool
Introduction to Secure Sockets Layer
BlueHat v17 || Scaling Incident Response - 5 Keys to Successful Defense at S...
Ad

Similar to Death of Web App Firewall (20)

PPTX
Death of WAF - GoSec '15
PDF
WAF protections and bypass resources
PPTX
Waf bypassing Techniques
PPTX
A Forgotten HTTP Invisibility Cloak
PDF
Making the Most of HTTP In Your Apps
PDF
Обход файрволов веб-приложений
PPTX
Basic security and Barracuda VRS
ODP
Web Scraping with PHP
PPTX
01. http basics v27
PDF
Vladimir Vorontsov - Splitting, smuggling and cache poisoning come back
PPTX
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
PDF
When RSS Fails: Web Scraping with HTTP
PPT
Presentation (PPT)
PDF
HTTP and Your Angry Dog
PDF
Introduction to Web Application Security - Blackhoodie US 2018
PDF
Web I - 05 - HTTP Protocol
PPTX
Http - All you need to know
PDF
Web services tutorial
PPT
2009: Securing Applications With Web Application Firewalls and Vulnerability ...
PDF
Http Status Report
Death of WAF - GoSec '15
WAF protections and bypass resources
Waf bypassing Techniques
A Forgotten HTTP Invisibility Cloak
Making the Most of HTTP In Your Apps
Обход файрволов веб-приложений
Basic security and Barracuda VRS
Web Scraping with PHP
01. http basics v27
Vladimir Vorontsov - Splitting, smuggling and cache poisoning come back
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
When RSS Fails: Web Scraping with HTTP
Presentation (PPT)
HTTP and Your Angry Dog
Introduction to Web Application Security - Blackhoodie US 2018
Web I - 05 - HTTP Protocol
Http - All you need to know
Web services tutorial
2009: Securing Applications With Web Application Firewalls and Vulnerability ...
Http Status Report
Ad

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Approach and Philosophy of On baking technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
1. Introduction to Computer Programming.pptx
PDF
Getting Started with Data Integration: FME Form 101
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Machine Learning_overview_presentation.pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PPT
Teaching material agriculture food technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
A Presentation on Artificial Intelligence
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
cuic standard and advanced reporting.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
Building Integrated photovoltaic BIPV_UPV.pdf
Approach and Philosophy of On baking technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
Dropbox Q2 2025 Financial Results & Investor Presentation
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
1. Introduction to Computer Programming.pptx
Getting Started with Data Integration: FME Form 101
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Machine Learning_overview_presentation.pptx
SOPHOS-XG Firewall Administrator PPT.pptx
Teaching material agriculture food technology
Big Data Technologies - Introduction.pptx
Accuracy of neural networks in brain wave diagnosis of schizophrenia
A Presentation on Artificial Intelligence
Spectral efficient network and resource selection model in 5G networks
cuic standard and advanced reporting.pdf
Encapsulation_ Review paper, used for researhc scholars
Digital-Transformation-Roadmap-for-Companies.pptx
A comparative analysis of optical character recognition models for extracting...
Advanced methodologies resolving dimensionality complications for autism neur...

Death of Web App Firewall

  • 1. The Death of Web App Firewall Brian A. McHenry bam@f5.com @bamchenry ( as we know it )
  • 2. Agenda •  Brief primer on traditional WAF approach •  Why this approach will (and should) die •  How WAF can stay relevant in your AppSec practice •  Why a new approach is valuable
  • 3. How does a WAF work? Start by checking RFC compliance1 Then check for various length limits in the HTTP2 Then we can enforce valid types for the application3 Then we can enforce a list of valid URLs4 Then we can check for a list of valid parameters5 Then for each parameter we will check for max value length6 Then scan each parameter, the URI, the headers with attack signatures 7 GET /search.php?name=Acme’s&admin=1 HTTP/1.1 Host: foo.comrn Connection: keep-alivern User-Agent: Mozilla/5.0 (Windows NT 6.1)rn Accept:text/html,application/xhtml+xml,application/xml;q=0.9r Referer: http://172.29.44.44/search.php?q=datarn Accept-Encoding: gzip,deflate,sdchrn Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
  • 4. How does a WAF work? Start by checking RFC compliance1 Then check for various length limits in the HTTP2 Then we can enforce valid types for the application3 Then we can enforce a list of valid URLs4 Then we can check for a list of valid parameters5 Then for each parameter we will check for max value length6 Then scan each parameter, the URI, the headers with attack signatures 7 GET /search.php?name=Acme’s&admin=1 HTTP/1.1rn Host: foo.comrnrn Connection: keep-alivernrn User-Agent: Mozilla/5.0 (Windows NT 6.1)rn Accept:text/html,application/xhtml+xml,application/xml;q=0.9rn Referer: http://172.29.44.44/search.php?q=datarnrn Accept-Encoding: gzip,deflate,sdchrnrn Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rnrn Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rnrn Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226rn
  • 5. How does a WAF work? Start by checking RFC compliance1 Then check for various length limits in the HTTP2 Then we can enforce valid types for the application3 Then we can enforce a list of valid URLs4 Then we can check for a list of valid parameters5 Then for each parameter we will check for max value length6 Then scan each parameter, the URI, the headers with attack signatures 7 GET /search.php?name=Acme’s&admin=1 HTTP/1.1 Host: foo.comrn Connection: keep-alivern User-Agent: Mozilla/5.0 (Windows NT 6.1)rn Accept:text/html,application/xhtml+xml,application/xml;q=0.9r Referer: http://172.29.44.44/search.php?q=datarn Accept-Encoding: gzip,deflate,sdchrn Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
  • 6. How does a WAF work? Start by checking RFC compliance1 Then check for various length limits in the HTTP2 Then we can enforce valid types for the application3 Then we can enforce a list of valid URLs4 Then we can check for a list of valid parameters5 Then for each parameter we will check for max value length6 Then scan each parameter, the URI, the headers with attack signatures 7 GET /search.php?name=Acme’s&admin=1 HTTP/1.1 Host: foo.comrn Connection: keep-alivern User-Agent: Mozilla/5.0 (Windows NT 6.1)rn Accept:text/html,application/xhtml+xml,application/xml;q=0.9r Referer: http://172.29.44.44/search.php?q=datarn Accept-Encoding: gzip,deflate,sdchrn Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
  • 7. How does a WAF work? Start by checking RFC compliance1 Then check for various length limits in the HTTP2 Then we can enforce valid types for the application3 Then we can enforce a list of valid URLs4 Then we can check for a list of valid parameters5 Then for each parameter we will check for max value length6 Then scan each parameter, the URI, the headers with attack signatures 7 GET /search.php?name=Acme’s&admin=1 HTTP/1.1 Host: foo.comrn Connection: keep-alivern User-Agent: Mozilla/5.0 (Windows NT 6.1)rn Accept:text/html,application/xhtml+xml,application/xml;q=0.9r Referer: http://172.29.44.44/search.php?q=datarn Accept-Encoding: gzip,deflate,sdchrn Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
  • 8. How does a WAF work? Start by checking RFC compliance1 Then check for various length limits in the HTTP2 Then we can enforce valid types for the application3 Then we can enforce a list of valid URLs4 Then we can check for a list of valid parameters5 Then for each parameter we will check for max value length6 Then scan each parameter, the URI, the headers with attack signatures 7 GET /search.php?name=Acme’s&admin=1 HTTP/1.1 Host: foo.comrn Connection: keep-alivern User-Agent: Mozilla/5.0 (Windows NT 6.1)rn Accept:text/html,application/xhtml+xml,application/xml;q=0.9r Referer: http://172.29.44.44/search.php?q=datarn Accept-Encoding: gzip,deflate,sdchrn Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
  • 9. How does a WAF work? Start by checking RFC compliance1 Then check for various length limits in the HTTP2 Then we can enforce valid types for the application3 Then we can enforce a list of valid URLs4 Then we can check for a list of valid parameters5 Then for each parameter we will check for max value length6 Then scan each parameter, the URI, the headers with attack signatures 7 GET /search.asp?name=Acme’s&admin=1 HTTP/1.1 Host: foo.comrn Connection: keep-alivern User-Agent: Mozilla/5.0 (Windows NT 6.1)rn Accept:text/html,application/xhtml+xml,application/xml;q=0.9r Referer: http://172.29.44.44/search.php?q=datarn Accept-Encoding: gzip,deflate,sdchrn Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
  • 10. How does a WAF work? Start by checking RFC compliance1 Then check for various length limits in the HTTP2 Then we can enforce valid types for the application3 Then we can enforce a list of valid URLs4 Then we can check for a list of valid parameters5 Then for each parameter we will check for max value length6 Then scan each parameter, the URI, the headers with attack signatures 7 GET /search.do ?name=Acme’s&admin=1 HTTP/1.1 Host: foo.comrn Connection: keep-alivern User-Agent: Mozilla/5.0 (Windows NT 6.1)rn Accept:text/html,application/xhtml+xml,application/xml;q=0.9r Referer: http://172.29.44.44/search.php?q=datarn Accept-Encoding: gzip,deflate,sdchrn Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
  • 11. How does a WAF work? Start by checking RFC compliance1 Then check for various length limits in the HTTP2 Then we can enforce valid types for the application3 Then we can enforce a list of valid URLs4 Then we can check for a list of valid parameters5 Then for each parameter we will check for max value length6 Then scan each parameter, the URI, the headers with attack signatures 7 GET /search.php?name=Acme’s&admin=1 HTTP/1.1 Host: foo.comrn Connection: keep-alivern User-Agent: Mozilla/5.0 (Windows NT 6.1)rn Accept:text/html,application/xhtml+xml,application/xml;q=0.9r Referer: http://172.29.44.44/search.php?q=datarn Accept-Encoding: gzip,deflate,sdchrn Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
  • 12. How does a WAF work? Start by checking RFC compliance1 Then check for various length limits in the HTTP2 Then we can enforce valid types for the application3 Then we can enforce a list of valid URLs4 Then we can check for a list of valid parameters5 Then for each parameter we will check for max value length6 Then scan each parameter, the URI, the headers with attack signatures 7 GET /login.php?name=Acme’s&admin=1 HTTP/1.1 Host: foo.comrn Connection: keep-alivern User-Agent: Mozilla/5.0 (Windows NT 6.1)rn Accept:text/html,application/xhtml+xml,application/xml;q=0.9r Referer: http://172.29.44.44/search.php?q=datarn Accept-Encoding: gzip,deflate,sdchrn Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
  • 13. How does a WAF work? Start by checking RFC compliance1 Then check for various length limits in the HTTP2 Then we can enforce valid types for the application3 Then we can enforce a list of valid URLs4 Then we can check for a list of valid parameters5 Then for each parameter we will check for max value length6 Then scan each parameter, the URI, the headers with attack signatures 7 GET /logout.php?name=Acme’s&admin=1 HTTP/1.1 Host: foo.comrn Connection: keep-alivern User-Agent: Mozilla/5.0 (Windows NT 6.1)rn Accept:text/html,application/xhtml+xml,application/xml;q=0.9r Referer: http://172.29.44.44/search.php?q=datarn Accept-Encoding: gzip,deflate,sdchrn Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
  • 14. How does a WAF work? Start by checking RFC compliance1 Then check for various length limits in the HTTP2 Then we can enforce valid types for the application3 Then we can enforce a list of valid URLs4 Then we can check for a list of valid parameters5 Then for each parameter we will check for max value length6 Then scan each parameter, the URI, the headers with attack signatures 7 GET /search.php?name=Acme’s&admin=1 HTTP/1.1 Host: foo.comrn Connection: keep-alivern User-Agent: Mozilla/5.0 (Windows NT 6.1)rn Accept:text/html,application/xhtml+xml,application/xml;q=0.9r Referer: http://172.29.44.44/search.php?q=datarn Accept-Encoding: gzip,deflate,sdchrn Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
  • 15. How does a WAF work? Start by checking RFC compliance1 Then check for various length limits in the HTTP2 Then we can enforce valid types for the application3 Then we can enforce a list of valid URLs4 Then we can check for a list of valid parameters5 Then for each parameter we will check for max value length6 Then scan each parameter, the URI, the headers with attack signatures 7 GET /search.php?name=Acme’s&admin=1 HTTP/1.1 Host: foo.comrn Connection: keep-alivern User-Agent: Mozilla/5.0 (Windows NT 6.1)rn Accept:text/html,application/xhtml+xml,application/xml;q=0.9r Referer: http://172.29.44.44/search.php?q=datarn Accept-Encoding: gzip,deflate,sdchrn Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
  • 16. How does a WAF work? Start by checking RFC compliance1 Then check for various length limits in the HTTP2 Then we can enforce valid types for the application3 Then we can enforce a list of valid URLs4 Then we can check for a list of valid parameters5 Then for each parameter we will check for max value length6 Then scan each parameter, the URI, the headers with attack signatures 7 GET /search.php?name=Acme’s&admin=1 HTTP/1.1 Host: foo.comrn Connection: keep-alivern User-Agent: Mozilla/5.0 (Windows NT 6.1)rn Accept:text/html,application/xhtml+xml,application/xml;q=0.9r Referer: http://172.29.44.44/search.php?q=datarn Accept-Encoding: gzip,deflate,sdchrn Accept-Language: en-GB,en-US;q=0.8,en;q=0.6rn Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3rn Cookie: SESSION=0af2ec985d6ed5354918a339ffef9226
  • 17. That sounds really good, but…
  • 18. Who Owns the WAF? Network Team App Dev TeamSecurity Team
  • 20. My kingdom for a WAF admin! WAF Administrator
  • 21. With Great Power… •  Each web application is a snowflake! •  Application deploys can be too frequent for WAF policy tweaks to keep up. •  In DevOps environments, continuous delivery enables rapid vuln fixes in code. WAF Administrator
  • 23. What’s left for WAF? •  Focus on non-snowflake problems •  Extend and enrich web applications where possible •  Behavioral analysis
  • 24. •  WAF injects a JS challenge with obfuscated cookie •  Legitimate browsers resend the request with cookie •  WAF checks and validates the cookie •  Requests with valid signed cookie are then passed through to the server •  Invalidated requests are dropped or terminated •  Cookie expiration and client IP address are enforced – no replay attacks •  Prevented attacks will be reported and logged w/o detected attack 1st time request to web server WAF-based Bot Detection Internet Web Application Legitimate browser verification No challenge response from bots BOTS ARE DROPPED WAF responds with injected JS challenge. Request is not passed to server JS challenge placed in browser -  WAF verifies response authenticity -  Cookie is signed, time stamped and finger printed Valid requests are passed to the server Browser responds to challenge & resends request Continuous invalid bot attempts are blocked Valid browser requests bypass challenge w/ future requests
  • 25. Protocol Compliance Checks •  HTTP Protocol compliance, of course. – Mitigates attacks like SlowLoris, and other timing attacks. •  But also, TLS protocol and cipher enforcement – Centralized control of allowed ciphers and protocols – Protection from vulnerabilities like Heartbleed, FREAK •  TCP handshake enforcement – Full proxy WAF should be able to detect idle TCP sessions, reducing load on web app servers
  • 26. Behavioral Analysis & Fingerprinting •  Detect GET flood attacks against Heavy URI’s •  Identify non-human surfing patterns •  Fingerprinting to identify beyond IP address – Track fingerprinted sessions – Assign risk scores to sessions – Identify known malicious browser extensions •  http://PanOpticlick.eff.org for a primer on the topic
  • 27. What’s a Heavy URI? •  Any URI inducing greater server load upon request •  Requests that take a long time to complete •  Requests that yield large response sizes
  • 28. © F5 Networks, Inc 28CONFIDENTIAL •  Attackers are proficient at network reconnaissance –  They obtain a list of site URIs –  Sort by time-to-complete (CPU cost) –  Sort list by megabytes (Bandwidth) •  Spiders (bots) available to automate –  Though they are often known by the security community –  Can be executed with a simple wget script, or OWASP HTTP Post tool Tools and Methods of L7 DoS Attacks
  • 29. Exploiting POST for Fun & DoS • Determine: – URL’s accepting POST – Max size for POST • Bypass CDN protections (POST isn’t cache-able) • Fingerprint both TCP & app at the origin Attackers work to identify weaknesses in application infrastructure Network Reconnaissance Example