Some Notes on Web Application Firewalls



Similar documents
Contemporary Web Application Attacks. Ivan Pang Senior Consultant Edvance Limited

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

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

Intrusion detection for web applications

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

Guidelines for Web applications protection with dedicated Web Application Firewall

EVADING ALL WEB-APPLICATION FIREWALLS XSS FILTERS

Web Application Firewall Bypassing

Data Breaches and Web Servers: The Giant Sucking Sound

Firewalls P+S Linux Router & Firewall 2013

NSFOCUS Web Application Firewall White Paper

Playing with Web Application Firewalls

Web Application Firewalls Evaluation and Analysis. University of Amsterdam System & Network Engineering MSc

Web Application Security

Application security testing: Protecting your application and data

Cracking the Perimeter via Web Application Hacking. Zach Grace, CISSP, CEH January 17, Mega Conference

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

SQL Injection 2.0: Bigger, Badder, Faster and More Dangerous Than Ever. Dana Tamir, Product Marketing Manager, Imperva

JOOMLA SECURITY. ireland website design. by Oliver Hummel. ADDRESS Unit 12D, Six Cross Roads Business Park, Waterford City

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

Playing with Web Application Firewalls

Creating Stronger, Safer, Web Facing Code. JPL IT Security Mary Rivera June 17, 2011

Implementation of Web Application Firewall

Where every interaction matters.

Application Security Testing

Web Application Hacking (Penetration Testing) 5-day Hands-On Course

Java Web Application Security

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

Out of the Fire - Adding Layers of Protection When Deploying Oracle EBS to the Internet

Still Aren't Doing. Frank Kim

Check list for web developers

ASL IT Security Advanced Web Exploitation Kung Fu V2.0

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

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

Protecting Your Organisation from Targeted Cyber Intrusion

HTTP Response Splitting

From Rivals to BFF: WAF & VA Unite OWASP The OWASP Foundation

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

Protecting Against SQLi in Real-Time

The Web AppSec How-to: The Defenders Toolbox

Security Assessment of Waratek AppSecurity for Java. Executive Summary

FORBIDDEN - Ethical Hacking Workshop Duration

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

ASL IT SECURITY BEGINNERS WEB HACKING AND EXPLOITATION

WAFFle: Fingerprinting Filter Rules of Web Application Firewalls

How to break in. Tecniche avanzate di pen testing in ambito Web Application, Internal Network and Social Engineering

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

How Web Application Security Can Prevent Malicious Attacks

THE OPEN UNIVERSITY OF TANZANIA

Web Application Firewall (WAF) Guide. Web Application Firewall を 理 解 するための 手 引 き A Handbook to Understand Web Application Firewall

Web Application Security

Cross-Site Scripting

Secure Web Application Coding Team Introductory Meeting December 1, :00 2:00PM Bits & Pieces Room, Sansom West Room 306 Agenda

Strategic Information Security. Attacking and Defending Web Services

Web Application Attacks and Countermeasures: Case Studies from Financial Systems

(WAPT) Web Application Penetration Testing

3. Broken Account and Session Management. 4. Cross-Site Scripting (XSS) Flaws. Web browsers execute code sent from websites. Account Management

ETHICAL HACKING APPLICATIO WIRELESS110 00NETWORK APPLICATION MOBILE MOBILE0001

So happy to be here! Paparazzi over IP. Daniel Mende & Pascal Turbing {dmende pturbing}@ernw.de.

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

Integrating Web Application Security into the IT Curriculum

Adobe Systems Incorporated

Mobile Application Hacking for Android and iphone. 4-Day Hands-On Course. Syllabus

WEB APPLICATION FIREWALLS: DO WE NEED THEM?

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

Logs and Tactical Defence. Allan Stojanovic David Auclair University of Toronto #include <disclaimer.h>

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

XSS Lightsabre techniques. using Hackvertor

Hacking Web Apps. Detecting and Preventing Web Application Security Problems. Jorge Blanco Alcover. Mike Shema. Technical Editor SYNGRESS

Arrow ECS University 2015 Radware Hybrid Cloud WAF Service. 9 Ottobre 2015

CONTENTS. PCI DSS Compliance Guide

NETWORK SECURITY. Scott Hand. Melanie Rich-Wittrig. Enrique Jimenez

Information Supplement: Requirement 6.6 Code Reviews and Application Firewalls Clarified

Website Security. End-to-End Application Security from the Cloud. Cloud-Based, Big Data Security Approach. Datasheet: What You Get. Why Incapsula?

Cross Site Scripting in Joomla Acajoom Component

End-to-End Application Security from the Cloud

Security Testing: Step by Step System Audit with Rational Tools. First Presented for:

IndusGuard Web Application Firewall Test Drive User Registration

The Wide World of WAFs

Client vs. Server Implementations of Mitigating XSS Security Threats on Web Applications

State of Web Application Security

Hardening Moodle. Concept and Realization of a Security Component in Moodle. a project by

STOPPING LAYER 7 ATTACKS with F5 ASM. Sven Müller Security Solution Architect

Pentests more than just using the proper tools

INTRUSION DECEPTION CZYLI BAW SIĘ W CIUCIUBABKĘ Z NAMI

10 Things Every Web Application Firewall Should Provide Share this ebook

Hacker Intelligence Initiative, Monthly Trend Report #15

Bypassing Web Application Firewalls (WAFs) Ing. Pavol Lupták, CISSP, CEH Lead Security Consultant

Web App Security Audit Services

2013 MONITORAPP Co., Ltd.

David Rook. The Principles of Secure Development. OWASP Ireland Conference, Dublin

Introduction: 1. Daily 360 Website Scanning for Malware

Detecting (and even preventing) SQL Injection Using the Percona Toolkit and Noinject!

Web attacks and security: SQL injection and cross-site scripting (XSS)

Enterprise-Grade Security from the Cloud

STABLE & SECURE BANK lab writeup. Page 1 of 21

Hayri Tarhan, Sr. Manager, Public Sector Security, Oracle Ron Carovano, Manager, Business Development, F5 Networks

Transcription:

Some Notes on Web Application Firewalls or Why You still Get Owned

#whoami Member of Application Security Team, ERNW GmbH Contact: ERNW GmbH Frank Block Breslauer Str. 28 69124 Heidelberg Email: fblock@ernw.de 19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #2

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #3 #whoami Head of Application Security & Chief Security Officer, ERNW GmbH Contact: ERNW GmbH Michael Thumann Breslauer Str. 28 69124 Heidelberg Email: mthumann@ernw.de

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #4 Attack Vectors Web Application

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #5 Web Application Attacks

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #6 SQL Injection Example

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #7 What s a WAF Web Application Firewalls

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #8 Web Application Firewalls Basically a filter that controls the traffic between a client and the application Its main purpose is to detect and defend against application layer attacks which could lead to - Data loss - Denial of Service - Web Site Defacement

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #9 Possible reasons for the usage of WAFs Insecure Application with maybe already known vulnerabilities Additional Protection No confidence in own/foreign Software developers

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #10 Web Application Firewalls Detection mechanisms - Negative Detection Model - Positive Detection Model - Additional Mechanisms Possible deployments - Reverse Proxy - Layer 2 Bridge - Network monitor - Server based - Embedded

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #11 Detection Mechanisms Negative Detection Model - Blacklisting approach - Database with known "bad" Strings Positive Detection Model - Whitelisting approach - WAF learns/gets teached "good" Input and rejects all other Input Additional Mechanisms - Time based detection - Anomaly based detection

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #12 WAF deployments Network Monitor Layer 2 Bridge Reverse Proxy

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #13 WAF deployments Server based Embedded Web app

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #14 but... Effort - for the WAF testing/ configuration (and retesting/ configuration on new releases) - concerning the environment adjustment - regarding maintenance/ troubleshooting

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #15 Vulnerabilities that could be mitigated by a WAF

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #16 Fingerprinting Web Application Firewalls

WAFs covered in research ModSecurity PHPIDS WebKnight URLScan Web Application Firewall 460 19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #17

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #18 Fingerprinting Phase one: 10 Teststrings Phase two: "Specialties"

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #19 ModSecurity GET /print.php?message=a HTTP/1.1\r\n Host: modsec.waf\r\n User-Agent: libwww\r\n \r\n GET /print.php?message=a HTTP/1.1\r\n Host: modsec.waf\r\n User-Agent: libwww\r\n Accept: a\r\n \r\n

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #20 PHPIDS No global Filtering http://example.com/pfyq/hohkfs/ $BAD_STRING

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #21 WebKnight Status Code: 999 Status Message: No Hacking Server: WWW Server/1.1 WebKnight specific Errorpage http://webknight.server/path/to/site.php?parm="<> http://webknight.server/path/to/site.php?parm=%22%3c %3E

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #22 URLScan GET / HTTP/1.1\r\n Host: webknight.waf:80\r\n User-Agent: Mozilla/5.5 (compatible; MSIE 5.5; Windows NT 5.1) \r\n Accept: */*\r\n If: aaaa\r\n Translate: aaaa\r\n Lock-Token: aaaa\r\n Accept: */*\r\n If: \r\n Translate: \r\n Lock-Token: \r\n

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #23 Web Application Firewall 460 Custom Errorpage 404 - The specified URL cannot be found 503 - The requested service is temporarily unavailable. It is either overloaded or under maintenance. Please try later. Additional HTML comment:... 0123456789

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #24 Circumvention Web Application Firewalls

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #25 WAF secured J

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #26 SQLi based Circumvention 'or 'a='='a= 'or 'a'='a'-- 'or 1 -- ' --

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #27 But these statements can't be used to extract data, hm? Remember? SELECT count(*) FROM Users WHERE Username = '$NAME' AND Password = '$PASSWORD' Christmas already? UPDATE orders SET dstaddress = '$ADDRESS' WHERE orderid = '123456789' Heartland,Hannaford? MasterCard? SELECT owner,cc_num,cc_type FROM customers WHERE owner = '$NAME'

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #28 A note on vendor reactions Regarding a very simple and common SQLi attack string: or a = a J "We are also aware of that issue, but I don't see how we can effectively block this without causing a lot of false positives..."

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #29 XSS filter Circumvention 1. Initial circumvention <input oninput=alert(1)>asd 2. After applying "Tag Filter" <input%0aaaaaaa oninput=location.href='http:// www.heise.de'>asd 3. After applying "URL Filter" <input%0aaaaaaa oninput=location.href='htt'+'p:// www.heise.de'>asd

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #30 General Circumvention 3 of 4 WAFs seemed to be vulnerable to the usage of some event handlers especially in combination with tags/event handlers introduced in HTML5

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #31 Short current example Web Application Firewalls

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #32 Reasons for a WAF deployment Delay between discovery and fix of a vulnerability Access to application source code is: - limited - impossible

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #33 tsakwaf The Swiss Army Knife for Web Application Firewalls Web Application Firewalls

tsakwaf Developed to support the daily work of a web application pentester and to help testing the detection capabilities of a WAF Current version: 0.9.5 The Troopers Version J Licensed under the 3-clause BSD license http:///download/tsakwaf/ tsakwaf-0.9.5.tar.gz 19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #34

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #35 Supported functions Encoding XSS Code Generator HPP/HPF Code Generator WAF Fingerprinting

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #36 time for a demo? tsakwaf

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #37 Fingerprinting

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #38 Fingerprinting

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #39 Fingerprinting

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #40 Fingerprinting

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #41 Fingerprinting

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #42 XSS Code Generator

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #43 XSS Code Generator

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #44 Conclusions Identification of a specific WAF is possible Blacklisting - no effective protection WAF vendors are only slowly adding new technologies Focus should lie on secure Programming (SDL)

19.03.2012 ERNW GmbH Breslauer Straße 28 D-69124 Heidelberg #45 Questions?