Repsheet. A Behavior Based Approach to Web Application Security. Aaron Bedra Application Security Lead Braintree Payments. tirsdag den 1.

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

Intrusion Detection Systems

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

IDS / IPS. James E. Thiel S.W.A.T.

Outlook Data File navigate to the PST file that you want to open, select it and choose OK. The file will now appear as a folder in Outlook.

Monitoring and Alerting

Intrusion Detection & SNORT. Fakrul Alam fakrul@bdhbu.com

Rule 4-004M Payment Card Industry (PCI) Monitoring, Logging and Audit (proposed)

How to Make the Client IP Address Available to the Back-end Server

End-to-End Application Security from the Cloud

AlienVault. Unified Security Management (USM) 5.x Policy Management Fundamentals

A Whirlwind Introduction to Honeypots

HONEYD (OPEN SOURCE HONEYPOT SOFTWARE)

Apache Tomcat. Load-balancing and Clustering. Mark Thomas, 20 November Pivotal Software, Inc. All rights reserved.

VISIBLY BETTER RISK AND SECURITY MANAGEMENT

Network- vs. Host-based Intrusion Detection

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

#splunkconf. Analyzing & Mitigating Malicious Web Activity using Splunk Enterprise

SANS Dshield Webhoneypot Project. OWASP November 13th, The OWASP Foundation Jason Lam

Advanced Web Security, Lab

COURSE NAME: INFORMATION SECURITY INTERNSHIP PROGRAM

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

Mata : Garuda An advanced Network Monitoring System The S.L.A.D Network Security Framework. FIRST Conference Berlin, 19 June 2015

Announcements. Lab 2 now on web site

Contents. Intrusion Detection Systems (IDS) Intrusion Detection. Why Intrusion Detection? What is Intrusion Detection?

WHITE PAPER PROCESS CONTROL NETWORK SECURITY: INTRUSION PREVENTION IN A CONTROL SYSTEMS ENVIRONMENT

Securing Web Apps with NGINX

ipad Classroom Installation & Deployment Important information

From Network Security To Content Filtering

Load balancing Microsoft IAG

Device Fingerprinting and Fraud Protection Whitepaper

Monitoring applications in multitier environment. Uroš Majcen A New View on Application Management.

Intrusion Detection. Overview. Intrusion vs. Extrusion Detection. Concepts. Raj Jain. Washington University in St. Louis

Cisco IPS Tuning Overview

Securing Web Applications...at the Network Layer

CRYPTUS DIPLOMA IN IT SECURITY

DDoS Attacks & Mitigation

Quick Start Guide.

Common Event Format Configuration Guide

Learning To Fly: How Angry Birds Reached the Heights of Store Performance

IP Application Security Manager and. VMware vcloud Air

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

Security Event Management. February 7, 2007 (Revision 5)

Computer Security Self-Test: Questions & Scenarios

BASICS OF SCALING: LOAD BALANCERS

Collax Web Security. Howto. This howto describes the setup of a Web proxy server as Web content filter.

Traffic Monitoring : Experience

Barracuda Networks Web Application Firewall

Introduction... Error! Bookmark not defined. Intrusion detection & prevention principles... Error! Bookmark not defined.

Hardened Plone. Making Your Plone Site Even More Secure. Presented by: Nathan Van Gheem

Daniel Meier & Stefan Badertscher

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

Playing with Web Application Firewalls

Joe St Sauver, Ph.D. or Manager, InCommon Cer;ficate Program and Manager, Internet2 Na;onwide Security Programs

Web Tap: Detecting Covert Web Traffic. Presented By: Adam Anthony

Defining, building, and making use cases work

Monitoring System Status

Computer Systems Security 2013/2014. Single Sign-On. Bruno Maia Pedro Borges

Networks and the Internet A Primer for Prosecutors and Investigators

Combating Web Fraud with Predictive Analytics. Dave Moore Novetta Solutions

Life after Microsoft Outlook Google Apps

Zimbra to Gmail Migration

Intrusion Detection Systems

MFPConnect Monitoring. Monitoring with IPCheck Server Monitor. Integration Manual Version Edition 1

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

INinbox Start-up Pack

AusCERT Remote Monitoring Service (ARMS) User Guide for AusCERT Members

How To Ensure Your Is Delivered

Doyourwebsitebot defensesaddressthe changingthreat landscape?

Apache Tomcat Clustering

Wikto how does it work and how do I use it?

INTRUSION DECEPTION CZYLI BAW SIĘ W CIUCIUBABKĘ Z NAMI

Hillstone T-Series Intelligent Next-Generation Firewall Whitepaper: Abnormal Behavior Analysis

Security within a development lifecycle. Enhancing product security through development process improvement

Alert (TA14-212A) Backoff Point-of-Sale Malware

EVALUATING COMMERCIAL WEB APPLICATION SECURITY. By Aaron Parke

Splunk Enterprise Log Management Role Supporting the ISO Framework EXECUTIVE BRIEF

Web Application Security

Junos WebApp Secure (formerly Mykonos)

About Cisco PIX Firewalls

smarshencrypt User s Guide

Smarter Security for Smarter Local Government. Craig Sargent, Solutions Specialist

SlowShop.com SuperShop.com A practical example of how FusionReactor v5 can identify 10 common problems in ColdFusion applications.

Course Content: Session 1. Ethics & Hacking

How to build and use a Honeypot. Ralph Edward Sutton, Jr. DTEC 6873 Section 01

ICTN Enterprise Database Security Issues and Solutions

Divide and Conquer Real World Distributed Port Scanning

Presentation Title: When Anti-virus Doesn t Cut it: Catching Malware with SIEM

Wordpress Security. A guide on how to not get hacked when using wordpress. David Kennedy (ReL1K) Twitter: Dave_ReL1K

INTRUSION DETECTION SYSTEMS and Network Security

Intrusion Detection Systems. Darren R. Davis Student Computing Labs

GOOD GUYS VS BAD GUYS: USING BIG DATA TO COUNTERACT ADVANCED THREATS. Joe Goldberg. Splunk. Session ID: SPO-W09 Session Classification: Intermediate

Securing your Apache Tomcat installation. Tim Funk November 2009

Seven Ways to Create an Unbeatable Enterprise Mobility Strategy

FortiWeb 5.0, Web Application Firewall Course #251

AlienVault Unified Security Management Solution Complete. Simple. Affordable Life Cycle of a log

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

DDoS Attacks - Peeling the Onion on One of the Most Sophisticated Ever Seen. Eldad Chai, VP Product

Frequently Asked Questions (FAQ)

Transcription:

Repsheet A Behavior Based Approach to Web Application Security Aaron Bedra Application Security Lead Braintree Payments

Right now, your web applications are being attacked

And it will happen again, and again, and again

But not always in the way you think

Let s take a look at typical application security measures

User Requests Web Server Application Environment

roland : 12345

roland : 12345

And we go on with our day

How many of you stop there?

It s time to start asking more questions

But remember

Don t impact user experience!

???

Signature based detection Anomaly detection Reputation based intelligence Action Repsheet

Signatures

ModSecurity

Web Application Firewall

Rule based detection

Allows you to block or alert if traffic matches a signature

Improved by the OWASP Core Rule Set

A great tool to add to your stack

Works with Apache, nginx, and IIS

Works well with Apache

Like most signature based tools it requires tuning

And has a high possibility of false positives

Great for helping with 0-day attacks

Favor alerting over blocking in most scenarios

User Requests Web Server ModSecurity Application Environment

Anomalies

10.20.253.8 - - [23/Apr/2013:14:20:21 +0000] "POST /login HTTP/1.1" 200 267"-" "Mozilla/ 5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/ 20100101 Firefox/8.0" "77.77.165.233"

10.20.253.8 - - [23/Apr/2013:14:20:22 +0000] "POST /users/king-roland/credit_cards HTTP/ 1.1" 302 2085 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/ 8.0" "77.77.165.233"

10.20.253.8 - - [23/Apr/2013:14:20:23 +0000] "POST /users/king-roland/credit_cards HTTP/ 1.1" 302 2083 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/ 8.0" "77.77.165.233"

10.20.253.8 - - [23/Apr/2013:14:20:24 +0000] "POST /users/king-roland/credit_cards HTTP/ 1.1" 302 2085 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/ 8.0" "77.77.165.233"

What do you see?

I see a website getting carded

???

Play by play

Login Request 10.20.253.8 - - [23/Apr/2013:14:20:21 +0000] "POST /login HTTP/1.1" 200 267"-" "Mozilla/ 5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/ 20100101 Firefox/8.0" "77.77.165.233"

Add credit card to account #1 1 sec delay 10.20.253.8 - - [23/Apr/2013:14:20:22 +0000] "POST /users/king-roland/credit_cards HTTP/ 1.1" 302 2085 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/ 8.0" "77.77.165.233"

Add credit card to account #2 1 sec delay 10.20.253.8 - - [23/Apr/2013:14:20:23 +0000] "POST /users/king-roland/credit_cards HTTP/ 1.1" 302 2083 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/ 8.0" "77.77.165.233" FF 8 on Windows 7 or Bot?

Add credit card to account #3 1 sec delay 10.20.253.8 - - [23/Apr/2013:14:20:24 +0000] "POST /users/king-roland/credit_cards HTTP/ 1.1" 302 2085 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/ 8.0" "77.77.165.233" FF 8 on Windows 7 Plovdiv Bulgaria or Bot?

And this continues

10,000 more times

Those were the only requests that IP address made

Aside from the number of requests what else gave it away?

GET POST HEAD PUT DELETE 5% 4% 5% 27% 59%

HTTP method distribution is important

When an actor deviates significantly, there must be a reason!

Let s talk GeoIP

Adding GeoIP information is generically useful

But it also helps in the face of an attack

It can help protect you and your users

Scenario

King Roland gets his GMail account hacked

Hacker sends a password reset request to your server

Normally, you would email the reset

Unless...

You realize that King Roland always logs in from Druidia

But the hacker is requesting the reset from Spaceball City

Instead of sending the reset, you now ask some questions

And hopefully protect King Roland from further bad actions

GeoIP detection also helps you block traffic from unwanted countries

User Requests Web Server ModSecurity GeoIP Application Environment

Other Anomalies Request rate Header ordering TCP Fingerprint vs. User Agent Account Create/Delete/Subscribe Anything you can imagine

What do they have in common?

Does the behavior fit an equation?

If so, your detection is simple

Request rate > Threshold

TCP fingerprint!= User Agent

But the HTTP method deviation is harder

100% GET requests with a known UA (e.g. Google) is ok

100% POST requests is not

But it s not always that simple

Scenario

A high rate of account create requests are coming from a single address

Is it a NATed IP or a fraud/spam bot?

We have patterns and data

What s the next step?

Quantitative Analysis

Quantitative Analysis

Security as a Data Science Quantitative Analysis Problem

We can apply some machine learning to the data in an attempt to classify it

User Requests??? Web Server Classifier ModSecurity GeoIP Application Environment

This is where a lot of the value comes from

And combined with signature detection helps correlate attack events

But you still need a way to keep track of it all

Reputation Based Intelligence

Who s naughty and who s really naughty

Built up from the tools/ techniques mentioned previously

Provides local reputation

You can also purchase external reputation feeds

The combination gives you solid awareness of bad actors

User Requests Web Server??? Classifier ModSecurity External Reputation Reputational Intelligence??? GeoIP Application Environment

Action

So now you have a ton of new information

What do you do with it?

Options Block the traffic Honeypot the attacker Modify your response Attack back Contact the authorities

Blocking the traffic is straight forward

Block at the web server level (403)

Block at the firewall level

Both have advantages/ disadvantages

Honeypots are much more interesting

LB Engine LB LB Fake Real DB Partial Replication DB

When you honeypot, the attacker doesn t know they ve been caught

And it allows you to study their behavior

And update your approach to preventing attacks

But all of this requires a way to manage state and act on bad behavior

Where do you act? User Requests State Web Server??? Classifier ModSecurity External Reputation Reputational Intelligence??? GeoIP Here? State Application Environment

Repsheet

Reputation Engine

User Requests Web Server ModSecurity Redis GeoIP External Reputation Feeds Repsheet Backend Repsheet Application Environment

User Requests Web Server ModSecurity Redis GeoIP External Reputation Feeds Repsheet Backend Repsheet Application Environment

User Requests Web Server ModSecurity Redis GeoIP External Reputation Feeds Repsheet Backend Repsheet Recorder Application Environment

User Requests Managed State Web Server ModSecurity Redis GeoIP External Reputation Feeds Repsheet Backend Repsheet Recorder Application Environment

User Requests Managed State Web Server ModSecurity Redis GeoIP External Reputation Feeds Repsheet Backend Repsheet Recorder Actor Application Environment

User Requests Managed State Web Server ModSecurity Redis GeoIP External Reputation Feeds Repsheet Backend Repsheet Out of band processing Recorder Application Environment Actor

Repsheet helps put everything together

Web server module records activity and looks for offenders in the cache

It listens to ModSecurity and adds offending IPs to its list

It provides notification and/or blocking of offenders

Blocking happens at the web server level

But you can send Repsheet data to your firewall for TCP level blocking

Notification sends headers to the downstream application

Which allows each app to chose how it is going to respond

For instance, show a captcha on signup if Repsheet alerts

Back end looks at the recorded data for bad behavior

And updates the cache when it finds offenders

You can supply your own learning models for the data

github.com/repsheet/ repsheet

Summary

There are lots of indicators of attack in your traffic

Build up a system that can capture the data and sort good from bad

Tools ModSecurity GeoIP Custom rules (velocity triggers, fingerprinting, device id, etc) Custom behavioral classification Repsheet

And Remember

Questions?