Penetration Testing: Lessons from the Field



Similar documents
Secure Web Development Teaching Modules 1. Security Testing. 1.1 Security Practices for Software Verification

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

The Top Web Application Attacks: Are you vulnerable?

Criteria for web application security check. Version

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

(WAPT) Web Application Penetration Testing

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

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

ASL IT Security Advanced Web Exploitation Kung Fu V2.0

External Vulnerability Assessment. -Technical Summary- ABC ORGANIZATION

Client logo placeholder XXX REPORT. Page 1 of 37

Last update: February 23, 2004

Application Security Testing. Generic Test Strategy

Application Security Testing. Erez Metula (CISSP), Founder Application Security Expert

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

Rational AppScan & Ounce Products

Web App Security Audit Services

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

Penetration Testing. Types Black Box. Methods Automated Manual Hybrid. oless productive, more difficult White Box

Technical Testing. Application, Network and Red Team Testing DATA SHEET. Test your security defenses. Expert Testing, Analysis and Assessments

Application Security Testing

Security Awareness For Website Administrators. State of Illinois Central Management Services Security and Compliance Solutions

Web Application Security

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

EC-Council CAST CENTER FOR ADVANCED SECURITY TRAINING. CAST 619 Advanced SQLi Attacks and Countermeasures. Make The Difference CAST.

Passing PCI Compliance How to Address the Application Security Mandates

Web Plus Security Features and Recommendations

Web application testing

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

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

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

Security Awareness For Server Administrators. State of Illinois Central Management Services Security and Compliance Solutions

What is Web Security? Motivation

How We're Getting Creamed

New Systems and Services Security Guidance

Secure Web Applications. The front line defense

Ed Ferrara, MSIA, CISSP Fox School of Business

Audit/Logging Repudiation. Security Testing: Testing for What It s NOT supposed to do

Web Application Security

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

2012 Data Breach Investigations Report

The Key to Secure Online Financial Transactions

Single Sign-On for the Internet: A Security Story. Eugene Tsyrklevich eugene@tsyrklevich.name Vlad Tsyrklevich vlad902@gmail.com

Essential IT Security Testing

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

Five Steps to Improve Internal Network Security. Chattanooga ISSA

Remote Access Securing Your Employees Out of the Office

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

SECURING SELF-SERVICE PASSWORD RESET

Security Threat Kill Chain What log data would you need to identify an APT and perform forensic analysis?

Check list for web developers

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

Web Application Security Considerations

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

FORBIDDEN - Ethical Hacking Workshop Duration

ITEC441- IS Security. Chapter 15 Performing a Penetration Test

We ve been hacked! We did it! Rick Grandy Lockheed Martin Hanford Site

Kentico CMS security facts

WHITE PAPER AUGUST Preventing Security Breaches by Eliminating the Need to Transmit and Store Passwords

Chapter 1 Web Application (In)security 1

Security Products Development. Leon Juranic

STABLE & SECURE BANK lab writeup. Page 1 of 21

defending against advanced persistent threats: strategies for a new era of attacks agility made possible

Digital Pathways. Penetration Testing

Compliance Guide ISO Compliance Guide. September Contents. Introduction 1. Detailed Controls Mapping 2.

Web Application Penetration Testing

COURSE NAME: INFORMATION SECURITY INTERNSHIP PROGRAM

Universities and Schools Under Cyber-Attack: How to Protect Your Institution of Excellence

Penetration Testing Report Client: Business Solutions June 15 th 2015

Testing the OWASP Top 10 Security Issues

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

Discovering passwords in the memory

Certified Ethical Hacker Exam Version Comparison. Version Comparison

Auditing a Web Application. Brad Ruppert. SANS Technology Institute GWAS Presentation 1

Adobe Systems Incorporated

Common Security Vulnerabilities in Online Payment Systems

Working Practices for Protecting Electronic Information

Web Application Guidelines

Detecting and Exploiting XSS with Xenotix XSS Exploit Framework

Web application security

Real World Healthcare Security Exposures. Brian Selfridge, Partner, Meditology Services

Information Security Services

CMP3002 Advanced Web Technology

Internal Penetration Test

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

Guideline on Auditing and Log Management

EVALUATING COMMERCIAL WEB APPLICATION SECURITY. By Aaron Parke

Acunetix Web Vulnerability Scanner. Getting Started. By Acunetix Ltd.

INTRUSION PROTECTION AGAINST SQL INJECTION ATTACKS USING REVERSE PROXY

ASP.NET MVC Secure Coding 4-Day hands on Course. Course Syllabus

SecurityMetrics Vision whitepaper

Adobe ColdFusion. Secure Profile Web Application Penetration Test. July 31, Neohapsis 217 North Jefferson Street, Suite 200 Chicago, IL 60661

1. Building Testing Environment

Using Foundstone CookieDigger to Analyze Web Session Management

Redhawk Network Security, LLC Layton Ave., Suite One, Bend, OR

10- Assume you open your credit card bill and see several large unauthorized charges unfortunately you may have been the victim of (identity theft)

Security vulnerabilities in new web applications. Ing. Pavol Lupták, CISSP, CEH Lead Security Consultant

Transcription:

Penetration Testing: Lessons from the Field CORE SECURITY TECHNOLOGIES SCS SERVICES May 2009 1

Agenda: About me: Alberto Soliño Director of Security Consulting Services at Core Security One of first five employees at Core Former member of Special Projects Group at World Bank Examine real-world penetration testing consulting engagements for common problems/trends. Focus on understanding what attackers are doing. CORE SECURITY TECHNOLOGIES SCS SERVICES 2

Objective of today s talk: Share with some lessons we have learned through many years of consulting engagements. Focus on problems triggered by the design and implementation of the applications tested. Pay specific attention to Web application issues, which are proliferating rapidly as these apps become more complex and ubiquitous. Illustrate how different vulnerabilities can be used together to compromise systems and steal protected information. CORE SECURITY TECHNOLOGIES SCS SERVICES 3

Common Customer Challenges: Application developers are still taught to consider security as a secondary concern, after uptime and functionality. Many unapproved commercial applications get onto networks and devices driven by user demand, regardless of policies. Organizations are focused on check-box compliance tasks, and don t have resources to focus on underlying security issues. Companies who grow via mergers and acquisitions often find out too late that they will inherit major security problems. Increasingly pen testing thought of as a QA process rather than mimicking what an attacker can do. IT organizations have insufficient capabilities or plans in place to respond to incidents as they occur. Disconnection between application development teams and IT security. CORE SECURITY TECHNOLOGIES SCS SERVICES 4

Application Security Lessons Remember 20 years ago? What were attackers doing with no BO, XSS, etc..? No pen test frameworks? Manually uncovering a set of vulnerabilities that altogether would compromise IT infrastructures. What should pen testers do today? Take advantage of available tools to set a foundation and raise the bar. But.. more importantly: KEEP THINKING LIKE ATTACKERS! CORE SECURITY TECHNOLOGIES SCS SERVICES 5

Notes on today s examples: Testing engagements involved the use of both manual and automated penetration tests conducted by SCS experts. Scope was limited ONLY to application assessments carried out using a black-box approach. Projects involved were medium-size engagements of two weeks using two or three security consultants each. CORE SECURITY TECHNOLOGIES SCS SERVICES 6

Case 1: Weak Authentication Overview: Authentication systems remain a common source of exploitable vulnerabilities in Web applications, typically based on poor design and insufficient controls. Service type: Web application blackbox Attacker profile: Anonymous attacker Main goal: Circumvent authentication to hack into the application Notes: Web interface (case1.com) User profiles: IT staff, application administrators Nothing but an IT staff login page available to anonymous surfers CORE SECURITY TECHNOLOGIES SCS SERVICES 7

Case 1: Weak Authentication Findings: The application was easily subverted via login manipulation. case1.com/images -- directory listing case1.com/admin -- login screen for application administrators Image names within the /images directory were named after the page that included the images, i.e.,: adminlogin_logo.gif (case1.com/admin/login.html), adminlogout_button1.gif (case1.com/admin/logout.html). Through the image names we were able to find new files within the admin subdirectory (e.g.,: admincpanel_header.gif, led us to /admin/cpanel.html). That is how we found the control panel page for page administrators (/admin/cpanel.html), and it didn t request any authentication. CORE SECURITY TECHNOLOGIES SCS SERVICES 8

Case 2: Public Information Overview: Many Web applications provide too much contextual information about their underlying design, giving attackers the clues they need to hack into the systems remotely and carry out a range of potential activities. Service type: External penetration test Attacker profile: Anonymous attacker Main goal: Hack into the tested network from the Internet Notes: One internal Web application found during the network scan. No vulnerabilities were found in the network services. CORE SECURITY TECHNOLOGIES SCS SERVICES 9

Case 2: Public Information Findings: The Web application was subverted via available information. The IP address hosting the application resolved to internal.case2.com. We looked up the host name in several search engines. We found a log file in a third-party Web server that contained pairs of usernames and passwords for the internal application (this looked like the output of a key logger). We used those credentials to log in to the Web application. Once logged in, we exploited an SQL injection vulnerability within the internal application functionality and through xp_cmdshell uploaded a CORE IMPACT agent. As a result, we were able to access the server running the internal database. CORE SECURITY TECHNOLOGIES SCS SERVICES 10

Case 3: Password Reset Overview: Many Web applications do not handle new user authentication intelligently, leaving them open to attacks when outsiders are able to garner enough information to admit themselves to the apps. Service type: Web application black-box Attacker profile: Anonymous attacker Main goal: Hack into someone else s account to subvert application Notes: Anonymous users were presented with a login screen User profiles: Anonymous CORE SECURITY TECHNOLOGIES SCS SERVICES 11

Case 3: Password Reset Findings: The Web application was accessed via available information. While manually reading the contents of all HTML and Javascript files available to anonymous users, we found a reference to a log file that was left behind unintentionally (commented in the html file). The log file contained logs for emails sent to new users after registration. We also found a problem with the authentication scheme of the application. The application would start creating the session for the user, even if the password supplied during login was incorrect. Once inside the password reset page, the ViewState hidden field (ASP.NET application) contained confidential data for the user (e.g. secret Q&A). We successfully used the secret answer to reset the password for any users of the application. All we had to know was the username which, in this case, was equal to the e-mail address of the victim. CORE SECURITY TECHNOLOGIES SCS SERVICES 12

Case 4: Web Services Security Overview: Many organizations don t consider the implications of implementing their own authentication methods instead of using available frameworks. Service type: Web services PT Attacker profile: Authenticated attacker Main goal: Subvert normal web services functionality Notes: WSDLs provided by customer CORE SECURITY TECHNOLOGIES SCS SERVICES 13

Case 4: Web Services Security Findings: Signature collisions Every web service request was signed using a secret key. Signature was calculated sorting the elements based on the element name. Element values were then extracted and appended all together to construct a unique string (value1value2+...+valuen). That unique string was signed using HMAC-SHA-256 with the user s secret, then sent to the server. Having the element s values appended all together allowed us to alter the values (but still maintain the unique string) allowing an attacker to tamper with the request and still have a valid signature. CORE SECURITY TECHNOLOGIES SCS SERVICES 14

Case 5: Hybrid Overview: Many organizations don t consider the implications of specific application vulnerabilities on the company s overall security. Service type: Web application blackbox Attacker profile: Anonymous attacker Main goal: Hack into the customer s organization Notes: Anonymous users were presented with a log-in screen User profiles: Anonymous CORE SECURITY TECHNOLOGIES SCS SERVICES 15

Case 5: Hybrid Findings: User enumeration, WebDAV upload, SQL Injection The password reset functionality allowed us to brute force valid usernames due to the fact it would say whether or not a user was valid for the application. WebDAV functionality allowed us to upload valid HTML files (although nothing else). We uploaded a change password HTML page into the corporate web site and performed a phishing attack against the list of users. Several users trusted the email and opened the link pointing to their website (our fake page) and changed their passwords. The users/passwords recovered allowed us to log into their internal network through their VPN and also to log into the application, exploit a SQL Injection, install an agent and then pivot into their servers. CORE SECURITY TECHNOLOGIES SCS SERVICES 16

Other Common Findings... Attack escalation through instrumentation Internal network access through client side and phishing attacks On internal pen tests, vulnerabilities at network services are still found Backup files, hidden debug parameters, input validation only performed in the client can still be seen Weak custom authentication and encryption algorithms Poor reaction to attacks: only a few customers actually realized something wrong was happening until it was too late And of course, lots of XSS, SQL Injection, RFI/LFI, XSFR, etc... CORE SECURITY TECHNOLOGIES SCS SERVICES 17

What Organizations Need to Consider: How critical it is to pay attention to the security of their services, software and infrastructure, in particular Web applications. The potential damage that employees or users can do to the network, applications and sensitive data they have access to. Business applications may work as expected from a functional standpoint, but each of them carry dozens of critical security vulnerabilities that could ruin their overall enterprise in a matter of minutes. How likely it is that they have already been compromised in the past and how important it is to act fast when they have been breached. The importance of ongoing security reviews. CORE SECURITY TECHNOLOGIES SCS SERVICES 18

Big Picture Conclusions... In the same fashion as network services, with applications you are only as secure as your weakest link. Several low-risk vulnerabilities available together could be used to compromise applications, and to move from one app to another. Application vulnerability scanners, protocol fuzzers and penetration testing solutions are very important for performing applications assessments on ongoing basis to minimize risks. It remains important to complement such tools with security assessments performed by experts who can spot problems, especially those that require deeper understanding of relationships between different components and the customer s business operations. There will always be more vulnerabilities to fix than available time. CORE SECURITY TECHNOLOGIES SCS SERVICES 19

Questions? For more information about Core s Security Consulting Services, contact: Kip West Manager, Security Consulting Services 617-695-1134 kip.west@coresecurity.com Alberto Solino Director, Security Consulting Services beto@coresecurity.com CORE SECURITY TECHNOLOGIES SCS SERVICES 20