Top Ten Web Attacks. Saumil Shah Net-Square. BlackHat Asia 2002, Singapore



Similar documents
Web security. Live hacking demo. Rick van Tol Arthur Donkers Paul van Maaren Eilko Bos.

HTTP Fingerprinting and Advanced Assessment Techniques

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

What is Web Security? Motivation

Last update: February 23, 2004

IJMIE Volume 2, Issue 9 ISSN:

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

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

External Vulnerability Assessment. -Technical Summary- ABC ORGANIZATION

The Weakest Link: Mitigating Web Application Vulnerabilities. webscurity White Paper. webscurity Inc. Minneapolis, Minnesota USA

Web Application Security

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

Java Web Application Security

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

Common Security Vulnerabilities in Online Payment Systems

Application Security Best Practices. Wally LEE Principal Consultant

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

Where every interaction matters.

Advanced Administration for Citrix NetScaler 9.0 Platinum Edition

Testing Web Applications for SQL Injection Sam Shober

Web Application Report

Web App Security Audit Services

Programming Flaws and How to Fix Them

Chapter 1 Web Application (In)security 1

Barracuda Web Site Firewall Ensures PCI DSS Compliance

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

Basic & Advanced Administration for Citrix NetScaler 9.2

WEB APPLICATION HACKING. Part 2: Tools of the Trade (and how to use them)

MatriXay WEB Application Vulnerability Scanner V Overview. (DAS- WEBScan ) The best WEB application assessment tool

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

Web Application Security

Thick Client Application Security

Web Applications The Hacker s New Target

Lotus Domino Security

Ethical Hacking as a Professional Penetration Testing Technique

Application Security Testing

Application Security: What Does it Take to Build and Test a Trusted App? John Dickson, CISSP Denim Group

Web Application Penetration Testing

VULNERABILITY ASSESSMENT WHITEPAPER INTRODUCTION, IMPLEMENTATION AND TECHNOLOGY DISCUSSION

Virtualization System Security

Bank Hacking Live! Ofer Maor CTO, Hacktics Ltd. ATC-4, 12 Jun 2006, 4:30PM

HONEYD (OPEN SOURCE HONEYPOT SOFTWARE)

The Top Web Application Attacks: Are you vulnerable?

Enterprise Application Security Workshop Series

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

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

(WAPT) Web Application Penetration Testing

WEB APPLICATION FIREWALLS: DO WE NEED THEM?

Database Security Guide

Web Vulnerability Assessment Report

ABC LTD EXTERNAL WEBSITE AND INFRASTRUCTURE IT HEALTH CHECK (ITHC) / PENETRATION TEST

WEB SECURITY. Oriana Kondakciu Software Engineering 4C03 Project

Evaluation of Penetration Testing Software. Research

Information Technology Policy

FINAL DoIT v.8 APPLICATION SECURITY PROCEDURE

Exploiting Fundamental Weaknesses in Command and Control (C&C) Panels

CNS-301-3I ~ Citrix NetScaler 11 Advanced Implementation

Still Aren't Doing. Frank Kim

2013 MONITORAPP Co., Ltd.

CS 356 Lecture 25 and 26 Operating System Security. Spring 2013

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

The purpose of this report is to educate our prospective clients about capabilities of Hackers Locked.

Network and Host-based Vulnerability Assessment

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

Implementation of Web Application Firewall

Lecture 11 Web Application Security (part 1)

Lecture 15 - Web Security

Manipulating Microsoft SQL Server Using SQL Injection

Locking down a Hitachi ID Suite server

Ruby on Rails Secure Coding Recommendations

SANDCAT THE WEB APPLICATION SECURITY ASSESSMENT SUITE WHAT IS SANDCAT? MAIN COMPONENTS. Web Application Security

CSE331: Introduction to Networks and Security. Lecture 32 Fall 2004

Migrating helpdesk to a new server

Integrating Web Application Security into the IT Curriculum

New IBM Security Scanning Software Protects Businesses From Hackers

Sitefinity Security and Best Practices

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

SAP WEB DISPATCHER Helps you to make decisions on Web Dispatcher implementation

Essential IT Security Testing

CS5008: Internet Computing

Criteria for web application security check. Version

WHITE PAPER FORTIWEB WEB APPLICATION FIREWALL. Ensuring Compliance for PCI DSS 6.5 and 6.6

KEN VAN WYK. Fundamentals of Secure Coding and how to break Software MARCH 19-23, 2007 RESIDENZA DI RIPETTA - VIA DI RIPETTA, 231 ROME (ITALY)

Detecting Web Application Vulnerabilities Using Open Source Means. OWASP 3rd Free / Libre / Open Source Software (FLOSS) Conference 27/5/2008

SAST, DAST and Vulnerability Assessments, = 4

Common Criteria Web Application Security Scoring CCWAPSS

Hacking databases for owning your data. Cesar Cerrudo Esteban Martinez Fayo Argeniss (

Web Application Security

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

University of Wisconsin Platteville SE411. Senior Seminar. Web System Attacks. Maxwell Friederichs. April 18, 2013

Transcription:

Top Ten Web Attacks Saumil Shah Net-Square BlackHat Asia 2002, Singapore

TodayÕs battleground Ð the Web Web sites and web applications rapidly growing. Complex business applications are now delivered over the web (HTTP). Increased Òweb hackingó activity. Worms on the web. How much damage can be done? Firewalls?

Typical Web Application set-up Web Client HTTP request (cleartext or SSL) Firewall Web Server SQL Database DB DB HTTP reply (HTML, Javascript, VBscript, etc) Apache IIS Netscape etcé Plugins: Perl C/C++ JSP, etc Database connection: ADO, ODBC, etc.

Traditional HackingÉLimitations Modern network architectures are getting more robust and secure. Firewalls being used in almost all network roll-outs. OS vendors learning from past mistakes (?) and coming out with patches rapidly. Increased maturity in coding practices.

Utility of Firewalls Hacks on OS network services prevented by firewalls. wu-ftpd Web Server DB DB Sun RPC X X NT ipc$ X

Utility of Firewalls Internal back-end application servers are on a nonroutable IP network. (private addresses) Web Server DB DB X

Utility of Firewalls Outbound access restricted. Why would a web server telnet out? Web Server DB DB X

Futility of Firewalls E-commerce / Web hacking is unfettered. Web traffic is the most commonly allowed of protocols through Internet firewalls. Why fight the wall when youõve got an open door? HTTP is perceived as ÒfriendlyÓ traffic. Content/Application based attacks are still perceived as rare.

The Web HackerÕs Toolbox Essentially, all a web hacker needs is É a web browser, an Internet connection, É and a clear mind.

Classifying Web Hacks Web Hacks fall under the following categories: URL Interpretation attacks Input Validation attacks SQL Injection attacks Impersonation attacks Buffer Overflow attacks

Firewalls cannot preventé Web Client Web Server URL Interpretation Attacks. web server misconfiguration

Firewalls cannot preventé Web Client Input Validation attacks. Web Server URL Interpretation attacks poor checking of user inputs

Firewalls cannot preventé Web Client Web Server DB DB SQL Query Poisoning URL Interpretation attacks Input Validation attacks Extend SQL statements

Firewalls cannot preventé Reverseengineering HTTP cookies. Web Client Web Server DB DB HTTP session hijacking. Impersonation. URL Interpretation attacks Input Validation attacks SQL query poisoning

Why is Web Hacking so deadly? Ports 80 and 443 are usually allowed through firewalls. A single URL works its way into may components. And in most cases, the only defense is Òsecure codingó.

The URL as a cruise missile http: // 10.0.0.1 / catalogue / display.asp? pg = 1 & product = 7 Web Server DB DB

Web Hacks - net effects Web Hacks cause three types of effects: Extra information disclosure. (paths, etc.) Source code and arbitrary file content disclosure. Extra data disclosure (e.g. return all rows) Arbitrary command execution.

The Web HackerÕs Toolbox Some desired accessories would be É a port scanner, netcat, vulnerability checker (e.g. whisker), OpenSSL, É etc.

Hacking over SSL SSL Myth: ÒStrong 128 bit crypto stops hackers dead in their tracksó Using netcat and OpenSSL, it is possible to create a simple two-line SSL Proxy! Listen on port 80 on a host and redirect requests to port 443 on a remote host through SSL. web client nc openssl SSL web server

The Top 10 Web Hacking Techniques 1. URL Misinterpretation 2. Directory Browsing 3. Retrieving Ònon-webÓ Files 4. Reverse Proxying 5. Java Decompilation

The Top 10 Web Hacking Techniques 6. Source Code Disclosure 7. Input Validation 8. SQL Query Poisoning 9. Session Hijacking 10. Buffer Overflows

1. URL Misinterpretation The web server fails to parse the URL properly. e.g. the Unicode / Superfluous decode attack. Mismatched resource mappings in the configuration. e.g. +.htr,.jsp, Java remote command execution, etc.

1. URL Misinterpretation Countermeasures: Usually require a vendor supplied fix. Thorough inspection of the web server configuration and bindings.

2. Directory Browsing Ability to retrieve complete directory listing within directories on the web server. Usually happens when the default document is missing. Not-so-strict Web server configuration.

2. Directory Browsing Countermeasures: Web server configuration lock-down. Disable serving of directory listings. Sometimes the error may require a vendor supplied fix.

3. Retrieving Ònon-webÓ Files ÒNon-webÓ files can be: Archive files (.zip,.tar.gz, etc) Backup files (.bak, ~, etc) Header / Include files (.inc,.asa, etc) Text files (readme.txt, etc) Can be retrieved with some guess work. e.g. if there is a directory called /reports/, look for Òreports.zipÓ.

3. Retrieving Ònon-webÓ Files Countermeasures: Eliminate careless presence of such files. Disable serving certain file types by creating a resource mapping. Strict change control measures.

4. Reverse Proxying Web proxy servers may work both ways! Typically meant to allow users from within a network to access external web sites. May end up proxying HTTP requests from the outside world to the internal network. e.g. Compaq Insight Manager Usually happens when the front end web server proxies requests to back end app servers.

4. Reverse Proxying Countermeasures: Check the web server proxy configuration thoroughly. Be careful when creating URL mappings to internal servers.

5. Java Decompilation Java Bytecode can be decompiled quite effectively. May disclose sensitive information such as passwords, application paths, etc. May also disclose application logic Ð such as generation of session IDs, encryption, etc. Java Archive files (.jar files) may contain files other than bytecode, such as configuration files.

5. Java Decompilation Countermeasures: Java bytecode obfuscation. Elimination of sensitive configuration information within bytecode. Elimination of unnecessary files within.jar files.

6. Source Code Disclosure Ability to retrieve application files in an unparsed manner. Attackers can recover the source code of the web application itself. The code can then be used to find further loopholes / trophies. May be caused my many ways: Misconfiguration or vendor errors Poor application design, etc.

6. Source Code Disclosure Countermeasures: Vendor supplied fixes. Locking down the web server configuration. Secure coding practices.

7. Input Validation Root cause of most web hacks. All inputs received should be validated: data types data ranges (e.g. -ve or fractional numbers) buffer sizes and bounds metacharacters Tampering with hidden fields. Bypassing client side checking (e.g. javascript).

7. Input Validation Countermeasures: These are the worst to deal with! There is no other countermeasure but proper coding practices.

8. SQL Query Poisoning Parameters from the URL or input fields get used in SQL queries. An instance of Input Validation attacks. Data can be altered to extend the SQL query. e.g. http://server/query.asp?item=3+or+1=1 Execution of stored procedures. May even lead to back-end database server compromise.

8. SQL Query Poisoning Countermeasures: Again, no easy fix. Thorough source code review. Following the principle of least privilege for the database application. Elimination of unnecessary database users and stored procedures.

9. Session Hijacking HTTP is inherently a ÒstatelessÓ protocol. Many web applications are stateful. Poor mechanisms of state tracking. Hidden fields carrying a session ID Client side cookies É with no server side session tracking. Reverse engineering of the session ID leads to access of other usersõ data.

9. Session Hijacking Countermeasures: Use server side session ID tracking. Match connections with time stamps, IP addresses, etc. Cryptographically generated session IDs. hard to sequence. Use web application server session management APIs when possible.

10. Buffer Overflows Poor bounds checking. Web server HTTP requests. e.g. ASP buffer overflow,.printer, etc. Application Input fields. e.g. ColdFusion DoS, etc. Can cause: Denial of service (crashing the app / service) Remote command execution (shellcode)

10. Buffer Overflows Countermeasures: Vendor supplied fixes. Bounds checking within applications. Source code reviews. Buffer overflow testing.

Hacking Web enabled Devices Network equipment, printers, etc. becoming Òweb enabledó. e.g. Cisco IOS HTTP hack, HP WebJetAdmin hack, etc. May leak sensitive information about a network. May allow proxying of web attacks.

Beating the IDS ÒSecure HackingÓ Ð hacking over SSL. Many ways of writing the same URL. Defeats signature based pattern matching. Spurious parameters. Intentionally generating false positives.

Closing Thoughts Far harder to secure web sites and web applications. Need to create a heightened levels of security awareness. Use of formal software engineering methods for developing web applications. Use of secure coding practices. Thorough application testing.

Closing Thoughts ÒThere is no patch for carelessnessó. Web Hacking: Attacks and Defense Saumil Shah, Shreeraj Shah, Stuart McClure Addison Wesley Ð 2002.

Thank you! saumil@net-square.com http://www.net-square.com/ +91 98254 31192