Auditing Web Applications



Similar documents
WEB SECURITY CONCERNS THAT WEB VULNERABILITY SCANNING CAN IDENTIFY

Web applications. Web security: web basics. HTTP requests. URLs. GET request. Myrto Arapinis School of Informatics University of Edinburgh

Where every interaction matters.

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

Magento Security and Vulnerabilities. Roman Stepanov

Six Essential Elements of Web Application Security. Cost Effective Strategies for Defending Your Business

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

OWASP Top Ten Tools and Tactics

OWASP AND APPLICATION SECURITY

Web Application Penetration Testing

FINAL DoIT v.4 PAYMENT CARD INDUSTRY DATA SECURITY STANDARDS APPLICATION DEVELOPMENT AND MAINTENANCE PROCEDURES

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

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

Members of the UK cyber security forum. Soteria Health Check. A Cyber Security Health Check for SAP systems

Testing the OWASP Top 10 Security Issues

Is Drupal secure? A high-level perspective on web vulnerabilities, Drupal s solutions, and how to maintain site security

The Top Web Application Attacks: Are you vulnerable?

Cloud Security:Threats & Mitgations

WHITE PAPER. FortiWeb Web Application Firewall Ensuring Compliance for PCI DSS 6.5 and 6.6

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

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

Nuclear Regulatory Commission Computer Security Office Computer Security Standard

Sitefinity Security and Best Practices

Integrating Security Testing into Quality Control

Data Breaches and Web Servers: The Giant Sucking Sound

Rational AppScan & Ounce Products

Hack Proof Your Webapps

Essential IT Security Testing

National Information Security Group The Top Web Application Hack Attacks. Danny Allan Director, Security Research

Introduction:... 1 Security in SDLC:... 2 Penetration Testing Methodology: Case Study... 3

(WAPT) Web Application Penetration Testing

Web application security

What is Web Security? Motivation

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

Overview of the Penetration Test Implementation and Service. Peter Kanters

External Vulnerability Assessment. -Technical Summary- ABC ORGANIZATION

Criteria for web application security check. Version

SECURITY TRENDS & VULNERABILITIES REVIEW 2015

Securing Your Web Application against security vulnerabilities. Ong Khai Wei, IT Specialist, Development Tools (Rational) IBM Software Group

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

CSE598i - Web 2.0 Security OWASP Top 10: The Ten Most Critical Web Application Security Vulnerabilities

National Endowment for the Arts Evaluation Report. Table of Contents. Results of Evaluation Areas for Improvement Exit Conference...

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

SQuAD: Application Security Testing

FortiWeb Web Application Firewall. Ensuring Compliance for PCI DSS requirement 6.6 SOLUTION GUIDE

ETHICAL HACKING APPLICATIO WIRELESS110 00NETWORK APPLICATION MOBILE MOBILE0001

Columbia University Web Security Standards and Practices. Objective and Scope

ASL IT SECURITY BEGINNERS WEB HACKING AND EXPLOITATION

Quality Assurance version 1

Secure Programming Lecture 12: Web Application Security III

Advanced Web Technology 10) XSS, CSRF and SQL Injection 2

Passing PCI Compliance How to Address the Application Security Mandates

Common Security Vulnerabilities in Online Payment Systems

Mean Time to Fix (MTTF) IT Risk s Dirty Little Secret Joe Krull, CPP, CISSP, IAM, CISA, A.Inst.ISP, CRISC, CIPP

Barracuda Web Site Firewall Ensures PCI DSS Compliance

Sichere Webanwendungen mit Java

Kenna Platform Security. A technical overview of the comprehensive security measures Kenna uses to protect your data

Application Security Vulnerabilities, Mitigation, and Consequences

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

OWASP TOP 10 ILIA

Web Application Guidelines

Using Free Tools To Test Web Application Security

Web Application Security Assessment and Vulnerability Mitigation Tests

Sichere Software- Entwicklung für Java Entwickler

Recon and Mapping Tools and Exploitation Tools in SamuraiWTF Report section Nick Robbins

How To Fix A Web Application Security Vulnerability

Web Application Firewall on SonicWALL SSL VPN

Adobe Systems Incorporated

Detecting and Exploiting XSS with Xenotix XSS Exploit Framework

Cross Site Scripting in Joomla Acajoom Component

Ruby on Rails Secure Coding Recommendations

The Key to Secure Online Financial Transactions

Secure Web Development Teaching Modules 1. Threat Assessment

Enterprise Application Security Workshop Series

Thomas Röthlisberger IT Security Analyst

Secure development and the SDLC. Presented By Jerry

Web Application Security. Vulnerabilities, Weakness and Countermeasures. Massimo Cotelli CISSP. Secure

Drupal Security. A High-Level Perspective on Web Vulnerabilities, Solutions and Tips for Securing Your Drupal Website

WEB ATTACKS AND COUNTERMEASURES

Introduction: 1. Daily 360 Website Scanning for Malware

Web Application Vulnerability Testing with Nessus

Web Application Worms & Browser Insecurity

Chapter 1 Web Application (In)security 1

A6- Sensitive Data Exposure

Web Vulnerability Scanner by Using HTTP Method

Attack and Penetration Testing 101

Check list for web developers

White Paper Secure Reverse Proxy Server and Web Application Firewall

Högskoleexamen. Web application Security. Sektionen för informationsvetenskap, data- och elektroteknik. Rapport för Högskoleexamen, January 2013

How to complete the Secure Internet Site Declaration (SISD) form

DFW INTERNATIONAL AIRPORT STANDARD OPERATING PROCEDURE (SOP)

Web Application Security

PCI Compliance Updates

What s Wrong with Information Security Today? You are looking in the wrong places for the wrong things.

Transcription:

Auditing Web Applications IT Audit strategies for web applications August 2015 ISACA Geek Week Robert Morella MBA, CISA, CGEIT, CISSP Rob.morella@gmail.com 1

About Me Been there done that: IT Systems IT Architecture Governance/Security IT Audit Cybercrime Investigator ISACA QAT, CISA Boot Camp Geek In 2014 reported security breach on TV Helped to Pass SB386 Privacy Law 2

Agenda Definition Web applications vs Web Sites Risks of each type Informational/Operational & Internal/External Risks Security Risks of Web Apps Audit Risks of Web Apps OWASP Top Ten Techniques Review Web Site/App Quickly Demonstrate some useful tools 3

Definition

What is a Web Application? Sometimes subject to interpretation

Definition of a Web Application Any program that runs in a web browser. Typically created in a browser-supported programming language (e.g. the combination of JavaScript, HTML and CSS). Relies on web browser to render the application. Web apps can be part of web page or web site Since there are 'web apps' that create web sites, and web sites that contain web apps, it can be tricky to tell the difference. Bottom line is something with a web interface that does something. 6

Typical Three-Tier Web Application

Got Risk? Best approach from an audit perspective? Hint: Risk Based Approach

The 'Good Old Days' When Risk was Simple Custom (Proprietary) Workstation Applications Custom (Proprietary) Server Applications Risk Off the shelf Workstation Applications Off the shelf Server Applications Risk

Web Applications > Function vs. Location Informational or Operational? Internal or External Facing? Risk 2 Internal Operational (Order Entry, G/L) 4 Internal Informational (Intranet) Risk 1 External Operational (ecommerce) 3 External Informational (Public Web Site)

Web Application vs Site vs Web Interface Web page/site that 'does something useful' Audit risk: page/site that does something bad

Web Applications > Function vs. Location Primary Risks Risk Internal Operational (G/L, Inventory) Lost Productivity / Fraud Internal Informational (Intranet) Risk? Risk External Operational (ecommerce) Reputation + Business Risk External Informational (Public Web Site) Reputation Risk

Hosting Location (Self hosted vs third party) Proprietary vs. Off-the-Shelf (Code Development) Custom (Proprietary) Cloud-hosted (Iaas, Paas) Custom (Proprietary) Self-hosted (your app here) Risk Off the shelf Self-hosted (CMS, Sharepoint) Off the shelf Cloud-hosted (Salesforce.com, Quickbooks Online, Facebook) Risk?

Web Application Risk Assessment: Must Carefully Consider Where Key Risks Internal Operational External Operational Custom Cloud-hosted Custom Self-hosted Internal Informational External Informational Off the shelf Self-hosted Off the shelf Cloud-hosted Bottom line: web applications are not inherently riskier, but require more thought.

Audit Risk of Web Apps Audit Risk = IR x CR x DR Inherent x Control x Detection Risk we got it wrong Operational Internet-Facing Apps most likely riskiest audit we do. For Highest Risk Items: Third-party vulnerability assessment Third-party application penetration test

Risks of Web Applications The Strength and Power of Web Applications is that the Interface Can be Adapted and essentially 'created on the fly'. The Weakness and Risk of Web Applications is that the Interface Can be Adapted and essentially 'created on the fly'.

Risks of Web Applications Input Validation Data Protection Web Apps Session Mgt. Authorization

Risks of Web Apps: Input Validation Input Data Validation: interface untrusted ANY input can be sent to application Controls: Initial values Error/exception handling Logging Fail safe vs fail open Resource exhaustion controls

Risks of Web Apps: Authentication Authorization & Authentication since application is exposed to untrusted users, privilege escalation is dangerous. Controls: Tokens & Two-Factor Authentication (2FA) Authorize transaction, not user Use of Certificates for non-repudiation Adaptive Authorization, Site keys Out of band (SMS/voice)

Risks of Web Apps: Data Protection Network is untrusted so any communcation can be intercepted and/or modified Controls: Valid SSL certs Encrypted connection strings Encrypted cookies Encrypted database

Risks of Web Apps: Session Management Session Management since nothing is trusted! Risk of hijack of user session. Controls: Session time limits Geolocation, IP, known PC Hard to guess session varibles/ids

OWASP Top 10 Application Security Risks https://www.owasp.org/index.php/category:owasp_top_ten_project 22

A1 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. The attacker's hostile data can trick the interpreter into executing unintended commands or accessing data without proper authorization. Example: http://example.com/app/accountview?id=' or '1'='1 Real world example: "In July 2012 a hacker group stole 450,000 login credentials from Yahoo!. The logins were stored in plain text and were allegedly taken from a Yahoo subdomain, Yahoo! Voices. The group breached Yahoo's security by using a "union-based SQL injection technique" See: OWASP SQL Injection Cheat Sheet 23

Web application used as a SQL query tool 8/11/2015

A2 Broken Authentication and Session Management Application functions related to authentication and session management are often not implemented correctly, allowing attackers to compromise passwords, keys, or session tokens, or to exploit other implementation flaws to assume other users identities. Example: http://example.com/sale/saleitems;jsessionid= 2P0OC2JSNDLPSKHCJUN2JV?car_model=BMW_335i Real world example: Intruders accessed Target's network on Nov. 15, 2013 using network credentials stolen from a provider of refrigeration and HVAC systems. 25

A3 Cross-Site Scripting (XSS) XSS flaws occur whenever an application takes untrusted data and sends it to a web browser without proper validation or escaping. XSS allows attackers to execute scripts in the victim's browser which can hijack user sessions, deface web sites, or redirect the user to malicious sites. See: OWASP XSS Cheat Sheet Example: <script> name='alert(document.domain)'; location.href='http://tw.adspecs.yahoo.com/tc/index.php'; </script> Real world example: (January 2013) "Hackers exploit a cross-site scripting (XSS) vulnerability in a Yahoo website to hijack the email accounts of Yahoo users and use them for spam. In the background, a piece of JavaScript code exploits a crosssite scripting (XSS) vulnerability in the Yahoo Developer Network (YDN) Blog site in order to steal the visitor's Yahoo session cookie." 26

A4 Insecure Direct Object References An direct object reference occurs when a developer exposes a reference to an internal implementation object, such as a file, directory, or database key. Without an access control check or other protection, attackers can manipulate these references to access unauthorized data. Example: http://www.victim.com/global.asa+.htr Real world example: " WordPress Site Hacks Continue: 70% of WordPress sites are running outdated software..recent examples hit MIT, NEA and Penn State servers." -Information Week 10/1/2013 The.htaccess file of WordPress is often not properly protected which makes the site vulnerable. 27

A5 Security Misconfiguration Good security requires having a secure configuration defined and deployed for the application, frameworks, application server, web server, database server, and platform. Secure settings should be defined, implemented, and maintained, as defaults are often insecure. Additionally, software should be kept up to date. Example: Webserver admin password set to password Real world example: Hardened ecommerce server started sending spam email for one day, then suddenly stopped. Firewall administrator had accidentally made a rule change. (personal experience) 28

A6 Sensitive Data Exposure Many web applications do not properly protect sensitive data, such as credit cards, tax IDs, and authentication credentials. Attackers may steal or modify such weakly protected data to conduct credit card fraud, identity theft, or other crimes. Sensitive data deserves extra protection such as encryption at rest or in transit, as well as special precautions when exchanged with the browser. Example: Passwords stored unencrypted in database Real world example: The Sony PlayStation Network was compromised in April 2011 and the personal details from approximately 77 million accounts were stolen and prevented users of PlayStation 3 and PlayStation Portable consoles from playing online through the service. 29

A7 Missing Function Level Access Control Most web applications verify function level access rights before making that functionality visible in the UI. However, applications need to perform the same access control checks on the server when each function is accessed. If requests are not verified, attackers will be able to forge requests in order to access functionality without proper authorization. Example: https://vmware1/folder?dcpath=ha-datacenter Need to prohibit ability to execute functions on web page not just hide page from navigation. Real world example: "Server hack prompts call for cpanel customers to take immediate action Change root and account passwords and rotate SSH keys, company advises."-arstechnica February 2013 30

A8 - Cross-Site Request Forgery (CSRF) Cross-Site Request Forgery (CSRF) is an attack that tricks the victim into loading a page that contains a malicious request. It is malicious in the sense that it inherits the identity and privileges of the victim to perform an undesired function on the victim's behalf, like change the victim's e-mail address, home address, or password, or purchase something. CSRF attacks generally target functions that cause a state change on the server but can also be used to access sensitive data. Example: Malware infected web browser at hotel steals cookies and allows airline site login Real world example: Security researcher Ronen Zilberman publicly disclosed a new Cross-Site Request Forgery (CSRF) attack vector that uses an HTML image tag to steal a Facebook user's information. According to Zilberman's disclosure, the user needs only to load an infected page to launch the attack. -Internet News 8/20/2009 31

A9 - Using Components with Known Vulnerabilities Components, such as libraries, frameworks, and other software modules, almost always run with full privileges. If a vulnerable component is exploited, such an attack can facilitate serious data loss or server takeover. Applications using components with known vulnerabilities may undermine application defenses and enable a range of possible attacks and impacts. Example: Using outdated version of Apache web server Real world example: Heartbleed. Technically vulnerability was not 'known', however this illustrates how single component vulnerability can have widespread impact. 32

A10 Unvalidated Redirects and Forwards Web applications frequently redirect and forward users to other pages and websites, and use untrusted data to determine the destination pages. Without proper validation, attackers can redirect victims to phishing or malware sites, or use forwards to access unauthorized pages. Example: Link within a site to different server to accept payments. Real world example: Super Bowl-Related Web Sites Hacked PC World 2/2/2007 The Dolphins' sites were serving up malicious JavaScript code that exploits two known Windows vulnerabilities, then attempted to connect with a second Web server that installs a Trojan horse downloader and a password stealing program on the victim's computer 33

Vulnerability Assessment of Web Apps

Web Application Vulnerability Assessment AKA Application Penetration Test Explore Application Identify Vulnerabilties Test for Exploitability 35

Explore: What Platform, What Data? What: what do you have? What data is in the system? What is the value of the data? OS Database WebServer Framework Application User Interface Ubuntu 12.04 MySQL 14.5 Apache 7.0.30 PHP 5.4.0 Payroll 1.0 Local HTTPS IE 8.0 8/11/2015

Who: Developer or service provider Who: Trusted third party developer or ASP Unknown third party developer or ASP Trained and seasoned development team Eager and inexperienced development team Business unit management purchase 8/11/2015

Where: Logical & Physical Location Where: Local Intranet Web application Public website hosted internally Customer portal hosted internally Remotely hosted web application Connectivity, firewall, transport, etc. 8/11/2015

One Minute Web Application (or site) Audit Tools Required: Web browser For this example, am using a site I manage and looking at a simple web application.

Step One: Look at the page

View Page Source, Ping, Visit BuiltWith

View Page Source Concrete5 version 5.6.3.3 Google Calendar App, obfuscated string

Visit BuiltWith Site

BuiltWith shows Apache, PHP, and dozens of other elements in use.

CMS Detector shows more: http://guess.scritch.org

What Do We Know So Far? Concrete5 version 5.6.3.3 Google Calendar App, obfuscated string PHP version 5.4.8 IP of 23.21.91.158 Hosted at AWS EC2 East

Google: Published Vulnerabilites for PHP and Concrete5, default passwords for Concrete5.

Drive-by Audit Tips 1) Look closely at versions of everything. Is everything patched? 2) Having done what/why/where/when/who part, what data are you protecting and how you are protecting it? 3) Look for OWASP Top Ten issues. 4) Do some non-invasive pen tests. 8/11/2015

Web Application Security: OWASP OWASP Testing Guide Version 4.0

Excellent Free Teaching Tool: WebGoat WebGoat is a deliberately insecure web application maintained by OWASP designed to teach web application security. Once deployed, the user can go through the lessons and track their progress with the scorecard. There are currently over 30 lessons,

WebGoat Teaches You All About: Cross-site Scripting (XSS) Access Control Thread Safety Hidden Form Field Manipulation Parameter Manipulation Weak Session Cookies Blind SQL Injection Numeric SQL Injection String SQL Injection Web Services Fail Open Authentication Dangers of HTML Comments... and many more!

WebGoat ScreenShot

WebGoat Demo

Takeaways: Define Web Application Risks Unique to Web Applications Explore & Learn about Web Apps OWASP Web Goat Helpful Tips 54

Questions? Thanks!! 55