Intro to Web Application Security. iHostCodex Web Services - CEO Project-AG – CoFounder OWASP Panay -Chapter Leader -Web Application Pentester -Ethical.

Slides:



Advertisements
Similar presentations
Nick Feamster CS 6262 Spring 2009
Advertisements

Past, Present and Future By Eoin Keary and Jim Manico
What is code injection? Code injection is the exploitation of a computer bug that is caused by processing invalid data. Code injection can be used by.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
OWASP Web Vulnerabilities and Auditing
SEC835 OWASP Top Ten Project.
Creating Stronger, Safer, Web Facing Code JPL IT Security Mary Rivera June 17, 2011.
Common Exploits Aaron Cure Cypress Data Defense. SQL Injection.
Chapter 9 Web Applications. Web Applications are public and available to the entire world. Easy access to the application means also easy access for malicious.
Information Networking Security and Assurance Lab National Chung Cheng University The Ten Most Critical Web Application Security Vulnerabilities Ryan J.W.
It’s always better live. MSDN Events Securing Web Applications Part 1 of 2 Understanding Threats and Attacks.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
Injection Attacks by Example SQL Injection and XSS Adam Forsythe Thomas Hollingsworth.
Handling Security Threats in Kentico CMS Karol Jarkovsky Sr. Solution Architect Kentico Software
Presenter Deddie Tjahjono.  Introduction  Website Application Layer  Why Web Application Security  Web Apps Security Scanner  About  Feature  How.
Expert System Approach on Web Vulnerability Analysis / Jong Heon, PARK / Hyun Woo, CHO CS548 Advanced Information Security Term Project.
OWASP Mobile Top 10 Why They Matter and What We Can Do
Secure Software Engineering: Input Vulnerabilities
OWASP Zed Attack Proxy Project Lead
Cosc 4765 Server side Web security. Web security issues From Cenzic Vulnerability report
Prevent Cross-Site Scripting (XSS) attack
+ Websites Vulnerabilities. + Content Expand of The Internet Use of the Internet Examples Importance of the Internet How to find Security Vulnerabilities.
WEB SECURITY WEEK 3 Computer Security Group University of Texas at Dallas.
The OWASP Way Understanding the OWASP Vision and the Top Ten.
CSCI 6962: Server-side Design and Programming Secure Web Programming.
Chapter 9 Web Applications. Web Applications are public and available to the entire world. Easy access to the application means also easy access for malicious.
Robust Defenses for Cross-Site Request Forgery CS6V Presented by Saravana M Subramanian.
© All rights reserved. Zend Technologies, Inc. PHP Security Kevin Schroeder Zend Technologies.
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
Web 2.0 Security James Walden Northern Kentucky University.
Copyright 2007 © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Chapter 2. Core Defense Mechanisms. Fundamental security problem All user input is untrusted.
Web Application Security Sebastian Lopienski CERN Computer Security Team Summer/openlab students lectures 2012.
Security Scanners Mark Shtern. Popular attack targets Web – Web platform – Web application Windows OS Mac OS Linux OS Smartphone.
Top Five Web Application Vulnerabilities Vebjørn Moen Selmersenteret/NoWires.org Norsk Kryptoseminar Trondheim
Robust Defenses for Cross-Site Request Forgery
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
October 3, 2008IMI Security Symposium Application Security through a Hacker’s Eyes James Walden Northern Kentucky University
Security Attacks CS 795. Buffer Overflow Problem Buffer overflows can be triggered by inputs that are designed to execute code, or alter the way the program.
Web Applications Testing By Jamie Rougvie Supported by.
Building Secure Web Applications With ASP.Net MVC.
By Sean Rose and Erik Hazzard.  SQL Injection is a technique that exploits security weaknesses of the database layer of an application in order to gain.
Web Security SQL Injection, XSS, CSRF, Parameter Tampering, DoS Attacks, Session Hijacking SoftUni Team Technical Trainers Software University
Presented By: Chandra Kollipara. Cross-Site Scripting: Cross-Site Scripting attacks are a type of injection problem, in which malicious scripts are injected.
CS526Topic 12: Web Security (2)1 Information Security CS 526 Topic 9 Web Security Part 2.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Copyright © The OWASP Foundation This work is available under the Creative Commons SA 2.5 license The OWASP Foundation OWASP Denver February 2012.
Module: Software Engineering of Web Applications Chapter 3 (Cont.): user-input-validation testing of web applications 1.
Web Login, Cookies Web Login | Old way HTML
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
ASP.NET 2.0 Security Alex Mackman CM Group Ltd
The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under.
Do not try any of the techniques discussed in this presentation on a system you do not own. It is illegal and you will get caught.
Page 1 Ethical Hacking by Douglas Williams. Page 2 Intro Attackers can potentially use many different paths through your application to do harm to your.
SECURE DEVELOPMENT. SEI CERT TOP 10 SECURE CODING PRACTICES Validate input Use strict compiler settings and resolve warnings Architect and design for.
Group 18: Chris Hood Brett Poche
Module: Software Engineering of Web Applications
Web Application Vulnerabilities
An Introduction to Web Application Security
Intro to Web Application Security
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
TOPIC: Web Security (Part-4)
World Wide Web policy.
What is REST API ? A REST (Representational State Transfer) Server simply provides access to resources and the REST client accesses and presents the.
CSC 495/583 Topics of Software Security Intro to Web Security
WWW安全 國立暨南國際大學 資訊管理學系 陳彥錚.
Presentation transcript:

Intro to Web Application Security

iHostCodex Web Services - CEO Project-AG – CoFounder OWASP Panay -Chapter Leader -Web Application Pentester -Ethical Hacker -Web Developer Francis Al Victoriano

The Web Apps System Search Engine Social Network Multimedia Online Banking Online Shopping

Typical Web Setup OS/Web Server Database Server Client HTTP (cleartext) or HTTPS HTTP (cleartext) or HTTPS PHP PERL PYTHON Apache IIS Nginx Apache IIS Nginx MariaDB PostgreSQL MariaDB PostgreSQL Custom Code Custom Code

What is WebAppSec? Simply, Web Application Security is... “The securing of web applications”

Why we need Security?

Essentials Terminologies Threat An action or event that has the potential to compromise and/or violate security Vulnerability Existence of a weakness, design, or implementation error that can lead to an unexpected, undesirable event compromising the security of the system Exploit A defined way to breach the security of an IT system through vulnerability

Technical/Business Impact Compromised Information Leakage or Lost Reputational Damage Money Lost

Common Web Vulnerabilities 1 Injection 2 XSS (Cross Site Scripting) 3 Cross Site Request Forgery

Injection Injection flaws, such as SQL, OS, and LDAP injection occur when untrusted data is sent to an interpreter as part of a command or query. Threat Consider anyone who can send untrusted data to the system, including external users, internal users, and administrators. Impact Injection can result in data loss or corruption, lack of accountability, or denial of access.Injection can sometimes lead to complete host takeover. Injection

SQL Injection Example SELECT user_id FROM user_data WHERE user_name = '' or 1=1 --' AND user_password = '1234 '; // … String query = "SELECT user_id FROM user_data WHERE " + user_name = '" + req.getParameter("user") + "' AND user_password = '" + req.getParameter("password") +"'"; // … String query = "SELECT user_id FROM user_data WHERE " + user_name = '" + req.getParameter("user") + "' AND user_password = '" + req.getParameter("password") +"'"; // …

Prevent Injection Encode all user input before passing it to the interpreter. (White List Validation) Use an interface that supports bind variables Always minimize database privileges to reduce the impact of a flaw

XSS XSS flaws occur whenever an application takes untrusted data and sends it to a web browser without proper validation or escaping. Threat Consider anyone who can send untrusted data to the system, including external users, internal users, and administrators.. Impact Attackers can execute scripts in a victim’s browser to hijack user sessions, deface web sites, insert hostile content, redirect users, hijack the user’s browser using malware, etc. XSS (Cross Site Scripting)

Reflected XSS Server Browser DatabaseDatabase Web Application Bug!Bug! URLURL HTMLHTML Victim Request WebsiteWebsite Server Response

Server Browser DatabaseDatabase Web Application Bug!Bug! WebsiteWebsite Server Response HTMLHTML URLURL Initial Request URLURL Subsequent Victim Request Persistent XSS

XSS Pattern Simple Patterns  javascript:alert('XSS'); 

Prevent XSS Don‘t include user supplied input in your output! Output Encode all user supplied input Perform White List Input Validation on user input

Cross Site Request Forgery A CSRF attack forces a logged-on victim’s browser to send a forged HTTP request, including the victim’s session cookie and any other automatically included authentication information, to a vulnerable web application. Threat Consider anyone who can load content into your users’ browsers, and thus force them to submit a request to your website. Impact Attackers can trick victims into performing any state changing operation the victim is authorized to perform, e.g., updating account details, making purchases, logout and even login. Cross Site Request Forgery (CSRF)

bank.com Web App Web App Browser Bug!Bug! evil.org Web App Web App LoginLogin 1000$1000$ RequestRequest GET / HTTP/1.1 Host: GET / HTTP/1.1 Host: ResponseResponse HTTP/ OK <img src=“ ?to=hacker&amount=1000$“/>... HTTP/ OK <img src=“ ?to=hacker&amount=1000$“/>... CSRF-AttackCSRF-Attack GET/transfer?to=hacker &amount=1000$ HTTP/1.1 Host: bank.com GET/transfer?to=hacker &amount=1000$ HTTP/1.1 Host: bank.com Cross Site Request Forgery Explained

Prevent Cross Site Request Forgery Add a secret, not automatically submitted, token to all sensitive requests Make sure your application has no XSS holes Requiring the user to re- authenticate, or prove they are a user (e.g., via a CAPTCHA)

TIPS ON SECURING WEB APPLICATIONS

Define Secure Coding Standards Validate all input parameters to prevent attacksSanitized application responseHTTP trust issuesKeep sensitive session values on the server to prevent client-side modificationUse EncryptionSession managementAccess restrictionBuild a centralised module for application auditing and reporting.

Performed Threat Modeling Identify the key security objectives. Create an overview of the application by itemising the important characteristics of that application Deconstruct the application to identify the features and modules that have a security impact, and that need to be evaluated. Identify all threats Identify all vulnerabilities.

Testing and Quality Assurance Web Application Penetration Testing Code Review

Design Web Application Security Architecture Secured Web Server Secured Application Server Secured Database Server

The Maintenance & Support Application Log Review Version Control and a Separate Environment for Development

Server Network Security Firewall IDS/IPS Web App Web App WAF Guidelines Ruleset Whitelist Blacklist Heuristics Defines legal/ illegal Requests Rejects illegal requests Sometimes rejects legitimate requests („False Positives“) or fails to recognize illegal requests („False Negative“) Web Application Firewall (WAF)

Reminders! 1. Client Side Protection Don’t trust client’s input (Validate all inputs) Encode all user supplied input 2. Server Side Protection White List Validation (Server Side Code) Use Web Application Firewall 3. User Follow all the security hardening guide Test you system

What next for Developers? Application Security Requirements Application Security Architecture Standard Security Controls Secure Development Lifecycle Application Security Education OWASP ASVS OWASP Developer’s Guide, Prevention Cheat Sheets OWASP Developer’s Guide, Prevention Cheat Sheets OWASP Enterprise Security API (ESAPI) project OWASP Software Assurance Maturity Model (SAMM). OWASP Education Project

Thank You