Web Application Firewall Technology Insight OWASP 22/2-2007. The OWASP Foundation. Joakim Sandström Role: OWASP Prospect. http://www.owasp.



Similar documents
Web Intrusion Detection with ModSecurity. Ivan Ristic

Web Application Firewalls: When Are They Useful? OWASP AppSec Europe May The OWASP Foundation

Implementation of Web Application Firewall

ModSecurity The Open Source Web Application Firewall

Defending Against Web App A0acks Using ModSecurity. Jason Wood Principal Security Consultant Secure Ideas

The Wide World of WAFs

Intrusion detection for web applications

<Insert Picture Here> Oracle Web Cache 11g Overview

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

Addressing Application Layer Attacks with Mod Security

Guidelines for Web applications protection with dedicated Web Application Firewall

Web Application Security. Radovan Gibala Senior Field Systems Engineer F5 Networks

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

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

Core Feature Comparison between. XML / SOA Gateways. and. Web Application Firewalls. Jason Macy jmacy@forumsys.com CTO, Forum Systems

Information Supplement: Requirement 6.6 Code Reviews and Application Firewalls Clarified

Where every interaction matters.

Check list for web developers

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

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

F5 Silverline Web Application Firewall Onboarding: Technical Note

Adobe Systems Incorporated

Firewalls P+S Linux Router & Firewall 2013

2013 MONITORAPP Co., Ltd.

Sophos UTM Web Application Firewall for Microsoft Exchange connectivity

LAMP Secure Web Hosting. A.J. Newmaster & Matt Payne 8/10/2005

Web Application Firewall Policy File Specification

Information Technology Policy

Cloud Security:Threats & Mitgations

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

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

Playing with Web Application Firewalls

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

IJMIE Volume 2, Issue 9 ISSN:

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

Integrating Web Application Security into the IT Curriculum

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

What is Web Security? Motivation

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

elearning for Secure Application Development

Web Application Vulnerability Testing with Nessus

F5 ASM i DB Monitoring w ofercie NASK

NSFOCUS Web Application Firewall White Paper

Securing Web Apps with NGINX

CCM 4350 Week 11. Security Architecture and Engineering. Guest Lecturer: Mr Louis Slabbert School of Science and Technology.

Certified Secure Web Application Secure Development Checklist

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

Web Application Firewall for Untrusted Web Environments > White Paper

Advanced Administration for Citrix NetScaler 9.0 Platinum Edition

Flexible Routing and Load Control on Back-End Servers. Controlling the Request Load and Quality of Service

Table of Contents. Page 2/13

Appendix D: Configuring Firewalls and Network Address Translation

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

Web Application Threats and Vulnerabilities Web Server Hacking and Web Application Vulnerability

(WAPT) Web Application Penetration Testing

CS 665: Computer System Security. Network Security. Usage environment. Sources of vulnerabilities. Information Assurance Module

CTS2134 Introduction to Networking. Module Network Security

Deploying F5 to Replace Microsoft TMG or ISA Server

Imperva s Response to Information Supplement to PCI DSS Requirement Section 6.6

Pass Through Proxy. How-to. Overview:..1 Why PTP?...1

The New PCI Requirement: Application Firewall vs. Code Review

Secure Web Appliance. Reverse Proxy

mod_security the web application firewall

Magento Security and Vulnerabilities. Roman Stepanov

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

Installation and configuration guide

Basic & Advanced Administration for Citrix NetScaler 9.2

Content Scanning for secure transactions using Radware s SecureFlow and AppXcel together with Aladdin s esafe Gateway

Web Application Penetration Testing

Strategic Information Security. Attacking and Defending Web Services

Web Application Security

HOW TO CONFIGURE PASS-THRU PROXY FOR ORACLE APPLICATIONS

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

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

Contemporary Web Application Attacks. Ivan Pang Senior Consultant Edvance Limited

Network Security. Tampere Seminar 23rd October Overview Switch Security Firewalls Conclusion

Advanced Web Security, Lab

Anonymity on the Internet Over Proxy Servers

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

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

Application Firewalls

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

HTTPS HTTP. ProxySG Web Server. Client. ProxySG TechBrief Reverse Proxy with SSL. 1 Technical Brief

White Paper Secure Reverse Proxy Server and Web Application Firewall

WEB APPLICATION FIREWALLS: DO WE NEED THEM?

OWASP and OWASP Top 10 (2007 Update) OWASP. The OWASP Foundation. Dave Wichers. The OWASP Foundation. OWASP Conferences Chair

Administration Manual. Web Security Manager 4.2

SonicWALL Clean VPN. Protect applications with granular access control based on user identity and device identity/integrity

ΕΠΛ 674: Εργαστήριο 5 Firewalls

Enterprise Application Security Workshop Series

Some Notes on Web Application Firewalls

Why Web Applications are making a hackers life easy. Presented by Jon Grew BT SBS

Administration Manual. Web Security Manager 4.4

Security Technology: Firewalls and VPNs

Application Firewall Overview. Published: February 2007 For the latest information, please see

Firewalls. Chapter 3

SERVER HARDENING. Presented by: Daniel Waymel and Corrin Thompson at TexSAW 2014 at the University of Texas at Dallas

DNS REBINDING DENIS BARANOV, POSITIVE TECHNOLOGIES

Move over, TMG! Replacing TMG with Sophos UTM

Transcription:

Web Application Firewall Technology Insight Joakim Sandström Role: Prospect 22/2-2007 Copyright The Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the License. The Foundation http://www.owasp.org

Web Application Firewalls (WAF) Introduction Essentials Protection mechanisms White- & Blacklisting Virtualisation other.. mod_security Configuration Whitelisting XML schema & dtd validation WAF Definition & Addvalue etc. Evaluating criterias Benefits Drawbacks Other.. 2

Introduction Web Application Firewalls because.. Most application deployed today are insecure because the average developer is still not trained enough. Ivan Ristic 3

Introduction Web Application Firewalls Interpose themselves between the web server and the user-side client. Hereby intercept all http queries between the client and server. Analyze the traffic based on both blacklisting & white listing rules. hereby blocks the bad requests AND responses. 4

Introduction Like IDS/IPS/FW s exactly... Three types of implementations Host based (mod_security can do more also) Inline / network Reverse proxies (most commercial products) 5

Introduction Just to straighten things up.. Application firewalls are no substitute for good programming practices. Relying on an application firewall to protect bad software is doomed to the eventual catastrophic failure of the application Blacklisting = known threats in know code Whitelisting = unknown threats in unknown code Whats inbetween? 6

Essentials Complete support for HTTP Now that means everything and in every aspect headers, fields, 1.0 and 1.1, responses and requests Anti anti ids & ips functionality Normalisation & enforcing encoding schemes and such. 7

Essential Protection Mechanisms Two main protection mechanisms Blacklisting Look for bad stuff Whitelisting Verify that input is correct Learning how application works over time.. + Defining what functionality you wish to be visible from your webserver (methods, headers etc..) 8

Protections other. High level of virtualisation session data cookies application state links request flow certain fields & data Brute-force protection 9

Protections other. Different level of whitelisting (honestly don t know what to call this) client aware whitelisting (dynamic) Links virtualization ^ signing Request flow enforcement XML schema & dtd validations made for you 10

Protections other. And :/ Hardening your server configuration Methods, headers (in and out) protecting file uploads Protecting your web server validating http (whitelisting according to rfc =)) DOS protection as well. 11

Things that cause problems.. masked parameter names /dir/sessionid123123123/index.php Ajax, amfphp, applets rpc etc.. 12

Mod_security Audit logging Provides access to requests and responses Flexible regular expression-based rule engine. Rules can be combined External logic can be invoked well.. flexible =) 13

Mod_security waf built on Apache $sudo apt-get install libapache2-mod-security $sudo a2enmod mod-security $sudo /etc/init.d/apache2 force-reload 14

mod_security sample rules Configuring (emacs /etc/apache2/conf.d/mod_security) 15

mod_security - basic SecRule REQUEST_URI QUERY_STRING dirty Rejects a request which contains the word dirty in the querystrings or uri. SecRule ARGS:p dirty parameter p cannot contain word dirty Different types: SecRule ARGS!ARGS:z dirty (z can contain dirty) SecRule ARGS:/^id_/ dirty (radio buttons and such -> which transform into arrays kinda) SecRule REQUEST_FILENAME "^/cgi-bin/login\.php$ "chain,log,deny,status:403,phase:2 SecRule ARGS_COMBINED_SIZE "@gt 25" Prevent buffer overflows?? :D SecRule REQUEST_FILENAME "/index.php" "chain,log,deny,status:403,phase:2" SecRule ARGS_NAMES "!^(p a)$" Whitelisting allowed parameters (p and a only allowed) SecServerSignature MESHUGGAH WEB SERVER 1.0" Web server type is now: norwegian black metal 16

mod_security - basic SecRule HTTP_REFERER!^www.mysite.com$" CSRF attacks prevented? (ye sure referers can be faked, but anyway) SecRule RESPONSE_BODY "ODBC Error Code" Limiting what the web server talks back to the client. Session evil scoring Blocking sessions based on score system. SecRule REQUEST_HEADERS:User-Agent "nikto" log,deny,msg:'nikto Scanners Identified" Filtering base on user agent. SecRule REQUEST_URI "^/cgi-bin/script\.pl" "log,exec:/usr/local/apache/bin/test.sh,phase:1" Executes external scripts 17

mod_security - xss XSS (as presented in manual 1.9.x) SecFilter "<script" SecFilter "<.+>" OR <Location /cms/article-update.php> SecFilterInheritance Off SecFilterSelective "ARGS!ARG_body" "<.+>" </Location> 18

mod_security mod_security and XML SecRule REQUEST_HEADERS:Content-Type ^text/xml$ phase:1,t:lowercase,nolog,pass,ctl:requestbodyprocessor=xml SecRule REQBODY_PROCESSOR "!^XML$ nolog,pass,skip:1 SecRule XML "@validateschema /path/to/apache2/conf/xml.xsd" 19

mod_security Whitelisting Unfortunately, most of the mod_security samples and documentation doesn t realy guide you towards complete whitelisting. ie. parameter x -> A-z0-9 etc. (SecFilterSelective ARG_recipient "![a-za- Z0-9]+@webkreator\.com$">) Sample core configuration contain stuff like 20

mod_security Ok it requires some regexp skills to write your whitelist.. but what about the blacklist (core samples) SecRule REQUEST_FILENAME ARGS ARGS_NAMES REQUEST_HEADERS "(?:\b(?:on(?:(?:mo(?:use(?:o(?:ver ut) down move up) ve) key(?:press do wn up) c(?:hange lick) s(?:elec ubmi)t (?:un)?load dragdrop resize focus b lur)\b\w*?= abort\b) (?:l(?:owsrc\b\w*?\b(?:(?:java vb)script shell) ivescri pt) (?:href url)\b\w*?\b(?:(?:java vb)script shell) mocha): type\b\w*?\b(?: text\b(?:\w*?\b(?:j(?:ava)? ecma)script\b [vbscript]) application\b\w*?\bx- (?:java vb)script\b) s(?:(?:tyle\b\w*=.*\bexpression\b\w* ettimeout\b\w*?)\( rc\b\w*?\b(?:(?:java vb)script shell http):) (?:c(?:opyparentfolder reat etextrange) get(?:special parent)folder backgroundimage: @import)\b a(?:ctivexobject\b lert\b\w*?\()) <(?:(?:body\b.*?\b(?: backgroun onloa)d input\b.*?\\btype\b\w*?\bimage)\b!\[cdata\[ script meta).(?:(?:execscrip addimpor)t (?:fromcharcod cooki)e innerhtml)\b)" \ "log,id:950004,severity:2,msg:attack name here'" 21

Who does what.. Blacklisting snort, ids/ips vendors VA tools find the same things Configuration hardening Should be standard installation procedure.. Whitelisting WAF!!!!!! and.. Load balancing SSL termination and acceleration Caching and transparent compression ftp -> sftp Web SSO etc..etc. 22

What I m interested in.. That grey area in-between.. Detecting anomalities in user behavor! Reporting!!!!! More virtualisation links & sessions etc. Easy whitelisting Implementation issues need to be solved Configuration & management 23

Benefits Another layer of security (benefit?) Specialized security knowledge Covering the unknown. Developers don t always know what to protect against. Specialized application knowledge In f.ex. Xml firewalls Flexible policy enforcement Centralized policy on approved behavior (requires good cooperation between it-security and application developers) Intrusion attempt detection & logging in general Most people have hardly logs on what happens in their web applications 24

Drawbacks Configuration You often must teach the firewall to understand positive behavior. Single point of failure Performance Complexity Passing the buck Blacklisting Default deny Incompatibility 25

OSS vs. Commercial 26

Evaluation Criteria Evaluating Web Application Firewalls According to WAFEC Deployment Architecture HTTP and HTML Support Detection Techniques Prevention Techniques Logging Reporting Management Performance XML http://www.webappsec.org/projects/wafec 27