Playing with Web Application Firewalls



Similar documents
Playing with Web Application Firewalls

Web Application Firewalls: What the vendors do NOT want you to know. The OWASP Foundation

PT Consultant at Trustwave's SpiderLabs. Over 7 years in the security industry. Vulnerability discovery Webmails, AP, Citrix, etc. Spoke in YSTS 2.

Web Application Firewalls: What the vendors do NOT want you to know SHAKACON III

Information Extraction Art of Testing Network Peripheral Devices

Demystifying cache. Kristian Lyngstøl Product Specialist Varnish Software AS

Implementation of Web Application Firewall

HTTP Protocol. Bartosz Walter

ICSA Labs Web Application Firewall Certification Testing Report Web Application Firewall - Version 2.1 (Corrected) Radware Inc. AppWall V5.6.4.

reference: HTTP: The Definitive Guide by David Gourley and Brian Totty (O Reilly, 2002)

Internet Technologies Internet Protocols and Services

Web Application Firewall Profiling and Evasion. Michael Ritter Cyber Risk Services Deloitte

Abusing the Internet of Things. BLACKOUTS. FREAKOUTS. AND

WHITE PAPER. FortiWeb and the OWASP Top 10 Mitigating the most dangerous application security threats

Guidelines for Web applications protection with dedicated Web Application Firewall

Web applications. Web security: web basics. HTTP requests. URLs. GET request. Myrto Arapinis School of Informatics University of Edinburgh

Firewalls P+S Linux Router & Firewall 2013

How To Protect A Web Application From Attack From A Trusted Environment

HTTP Caching & Cache-Busting for Content Publishers

Acunetix Website Audit. 5 November, Developer Report. Generated by Acunetix WVS Reporter (v8.0 Build )

Contemporary Web Application Attacks. Ivan Pang Senior Consultant Edvance Limited

The Hyper-Text Transfer Protocol (HTTP)

Semantic based Web Application Firewall (SWAF V 1.6) Operations and User Manual. Document Version 1.0

Application Layer Encryption: Protecting against Application Logic and Session Theft Attacks. Whitepaper

Information Supplement: Requirement 6.6 Code Reviews and Application Firewalls Clarified

Security-Assessment.com White Paper Leveraging XSRF with Apache Web Server Compatibility with older browser feature and Java Applet

Check list for web developers

Arnaud Becart ip- label 11/9/11

NSFOCUS Web Application Firewall White Paper

The HTTP Plug-in. Table of contents

LBL Application Availability Infrastructure Unified Secure Reverse Proxy

ivoyeur: permission to parse

Module 45 (More Web Hacking)

Web Security Threat Report: January April Ryan C. Barnett WASC Member Project Lead: Distributed Open Proxy Honeypots

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol

Some Notes on Web Application Firewalls

T14 SECURITY TESTING: ARE YOU A DEER IN THE HEADLIGHTS? Ryan English SPI Dynamics Inc BIO PRESENTATION. Thursday, May 18, :30PM

Web Application Security

H...t...t...p...p...o...s...t. OWASP AppSec DC The OWASP Foundation Wong Onn Chee OWASP Singapore Lead

PHP code audits. OSCON 2009 San José, CA, USA July 21th 2009

HTTP Response Splitting

Web Application Firewall

HTTP Authentication. RFC 2617 obsoletes RFC 2069

Table of Contents. Open-Xchange Authentication & Session Handling. 1.Introduction...3

WEB APPLICATION FIREWALLS: DO WE NEED THEM?

Basic & Advanced Administration for Citrix NetScaler 9.2

Hypertext for Hyper Techs

Where every interaction matters.

THE PROXY SERVER 1 1 PURPOSE 3 2 USAGE EXAMPLES 4 3 STARTING THE PROXY SERVER 5 4 READING THE LOG 6

Architecture of So-ware Systems HTTP Protocol. Mar8n Rehák

No. Time Source Destination Protocol Info HTTP GET /ethereal-labs/http-ethereal-file1.html HTTP/1.

Deployment Guide. Caching (Static & Dynamic) Deployment Guide. A Step-by-Step Technical Guide

Introduction to Web Application Firewalls. Dustin Anders

Web Application Firewall Policy File Specification

Project #2. CSE 123b Communications Software. HTTP Messages. HTTP Basics. HTTP Request. HTTP Request. Spring Four parts

Qualys API Limits. July 10, Overview. API Control Settings. Implementation

Developing Applications With The Web Server Gateway Interface. James Gardner EuroPython 3 rd July

REAL-TIME WEB APPLICATION PROTECTION. AWF SERIES DATASHEET WEB APPLICATION FIREWALL

Cyber Security Workshop Ethical Web Hacking

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture # Apache.

GET /FB/index.html HTTP/1.1 Host: lmi32.cnam.fr

N-tier ColdFusion scalability. N-tier ColdFusion scalability WebManiacs 2008 Jochem van Dieten

Last update: February 23, 2004

Cross-Site Scripting (XSS) Attack Lab

Mingyu Web Application Firewall (DAS- WAF) All transparent deployment for Web application gateway

Configuring Health Monitoring

Vodia PBX RESTful API (v2.0)

Barracuda Web Application Firewall vs. Intrusion Prevention Systems (IPS) Whitepaper

Security Research Advisory

Firewalls. Securing Networks. Chapter 3 Part 1 of 4 CA M S Mehta, FCA

International Journal of Engineering & Technology IJET-IJENS Vol:14 No:06 44

Advanced Administration for Citrix NetScaler 9.0 Platinum Edition

DDoS Protecion Total AnnihilationD. DDoS Mitigation Lab

Web Application Firewall on SonicWALL SSL VPN

Attack and Penetration Testing 101

Anomaly Detection Using Negative Security Model in Web Application

Anatomy of a Pass-Back-Attack: Intercepting Authentication Credentials Stored in Multifunction Printers

Introduction to ServerIron ADX Application Switching and Load Balancing. Module 6: Content Switching (CSW) Revision 0310

CTIS 256 Web Technologies II. Week # 1 Serkan GENÇ

Importance of Web Application Firewall Technology for Protecting Web-based Resources

FortiWeb 5.0, Web Application Firewall Course #251

Sticky Session Setup and Troubleshooting

v7.7.3 Release Notes for Websense Content Gateway

Headless Drupal. Buzzword or Next Big Thing? Drupal City Berlin

ATS Test Documentation

Firewalls, NAT and Intrusion Detection and Prevention Systems (IDS)

We protect you applications! No, you don t. Digicomp Hacking Day 2013 May 16 th 2013

HTTP. Internet Engineering. Fall Bahador Bakhshi CE & IT Department, Amirkabir University of Technology

EC-Council CAST CENTER FOR ADVANCED SECURITY TRAINING. CAST 619 Advanced SQLi Attacks and Countermeasures. Make The Difference CAST.

Web Application Security

External Network & Web Application Assessment. For The XXX Group LLC October 2012

Overview - Using ADAMS With a Firewall

Protocol-Level Evasion of Web Application Firewalls

Application-layer Protocols and Internet Services

quick documentation Die Parameter der Installation sind in diesem Artikel zu finden:

Overview - Using ADAMS With a Firewall

Penta Security 3rd Generation Web Application Firewall No Signature Required.

Vulnerability Scans Remote Support 15.1

Barracuda Networks Web Application Firewall

Transcription:

Playing with Web Application Firewalls

Who is Wendel? Independent penetration test analyst. Affiliated to Hackaholic team. Over 7 years in the security industry. Discovered vulnerabilities in Webmails, Access Points, Citrix Metaframe, etc. Speaker at H2HC, Code Breakers, Defcon, etc.

Who is Sandro? Founder and CSO of EnableSecurity. Over 8 years in the security industry. Published security research papers. Tools - SIPVicious and SurfJack.

What is WAF? Web Application Firewall (WAF): An intermediary device, sitting between a web-client and a web server, analyzing OSI Layer-7 messages for violations in the programmed security policy. A Web application firewall is used as a security device protecting the web server from attack. Source: Web Application Security Consortium Glossary. http://www.webappsec.org/projects/glossary/#webapplicationfirewall

What is WAF? WAFs are often called 'Deep Packet Inspection Firewall'. Some WAFs look certain 'attack signature' while others look for abnormal behavior. WAFs can be either software or hardware appliance.

What is WAF? Modern WAF systems work both with attack signature and abnormal behavior. WAFs can be installed as a reverse proxy, embedded or connected in a switch (SPAN or RAP). Nowadays many WAF products detect both inbound and outbound attacks.

Vendors

Who uses WAF? Many banks around the world. Companies which need high protection. Many companies in compliance with PCI DSS (Payment Card Industry - Data Security Standard).

Type of operation modes: Negative model (blacklist based). Positive model (whitelist based). Mixed / Hybrid (mix negative and positive model protection).

Type of operation modes: 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. Pros: Less time to implement (plug and play or plug and hack? :). Cons: More false positives. More processing time. Less protection.

Type of operation modes: A positive security model enforces positive behavior by learning the application logic and then building a security policy of valid know good requests. Example: Page news.jsp, the field "id" only accept numbers [0-9] and starting at 0 until 65535. 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 policy.

Tricks to detect WAF systems: WAF systems leave several signs which permit us to detect them, like: Cookies - Some WAF products add their own cookie in the HTTP communication. Example - Citrix Netscaler: Host: www.domain.com.br User-Agent: Mozilla/5.0 Accept: image/png,image/*;q=0.8,*/*;q=0.5 Accept-Language: pt-br,pt;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://www.domain.com.br/ Cookie: ASPSESSIONIDAQRBCRDA=HKCIAFFBGFJOCOGGKMLDMKBP; ns_af=inomh/inobwnnkxoetwogbhpyjwa0; ns_af_.domain.com.br_%2f_wat=qvnqu0vtu0lptkleqvfsqknsreff?npkntil264r 7Pi8zgH5vSKd/S6YA&

Tricks to detect WAF systems: Cookies DEMO

Tricks to detect WAF systems: Header Rewrite - Some WAF products allow the rewriting of HTTP headers. The most common field is "Server", this is used to try to deceive the attackers (server cloaking). Example - Armorlogic Profense: Date: Sat, 08 Nov 2008 17:06:58 GMT Server: Profense Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-Type: text/html Set-Cookie: SID=dkhtir88p1c6v2859rvqkpukg1; path=/ Vary: Accept-Encoding Content-Encoding: gzip Keep-Alive: timeout=1, max=10 Connection: Keep-Alive Transfer-Encoding: chunked

Tricks to detect WAF systems: Header Rewrite DEMO

Tricks to detect WAF systems: Different 404 error codes for hostile and non existent pages. Different error codes (404, 400, 401, 403, 501, etc) for hostile parameters (even non existent ones) in valid pages. Drop Action: "Immediately initiate a "connection close" action to tear down the TCP connection by sending a FIN packet. All (at least all that I know) WAF systems have a built-in group of rules in negative mode, these rules are different in each products, this can help us to detect them.

Tricks to detect WAF systems: Different 404 error DEMO

Specific techniques to evade WAF systems: In a penetration test made 7 months ago, we were able to bypass a Citrix Netscaler using the technique described above. Example - Real life: What we did after identifying the rules was rebuild the query like: 1) Removing all "NULL" words. 2) Use database SQL encoding features in some parts. 3) Remove the single quote character "'". 4) And have fun! :)

Attacking Negative Mode: How can we bypass it? DEMO

Attacking Positive Mode: Is possible bypass it? DEMO

BONUS: Armorlogic Profense static root password and sshd enable by default. Armorlogic Profense default password at web administration interface.

What we learned? Negative model will be bypassed. Positive model is harder... nothing is impossible, review your source code!

What s next? Wendel Guglielmetti Henrique and Sandro Gauci working on: Developing tools to detect WAF systems. Developing tools to evade WAF systems. Bypass encoder Research papers Advisories

Questions? Thank you! wsguglielmetti [em] gmail.com sandro [em] enablesecurity.com