Using Foundstone CookieDigger to Analyze Web Session Management



Similar documents
Check list for web developers

Proof of Concept. A New Data Validation Technique for Microsoft ASP.NET Web Applications. Foundstone Professional Services

Design Authorization Systems Using SecureUML

BASELINE SECURITY TEST PLAN FOR EDUCATIONAL WEB AND MOBILE APPLICATIONS

Application Security Testing. Generic Test Strategy

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

HP WebInspect Tutorial

Secure Authentication and Session. State Management for Web Services

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

Thick Client Application Security

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

Criteria for web application security check. Version

AJAX Storage: A Look at Flash Cookies and Internet Explorer Persistence

(WAPT) Web Application Penetration Testing

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

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

Sitefinity Security and Best Practices

Web Application Security

Web Application Security Guidelines for Hosting Dynamic Websites on NIC Servers

Session Management in Web Applications

JVA-122. Secure Java Web Development

elearning for Secure Application Development

What is Web Security? Motivation

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

Active Directory Authentication Integration

Passing PCI Compliance How to Address the Application Security Mandates

Safewhere*Identify 3.4. Release Notes

Lecture 11 Web Application Security (part 1)

Web Application Security

Network Security Audit. Vulnerability Assessment (VA)

FINAL DoIT v.8 APPLICATION SECURITY PROCEDURE

Lotus Domino Security

Introduction to Web Application Security. Microsoft CSO Roundtable Houston, TX. September 13 th, 2006

Remedy ITSM Service Request Management Quick Start Guide

IBM Security QRadar Version Vulnerability Assessment Configuration Guide IBM

Proto Balance SSL TLS Off-Loading, Load Balancing. User Manual - SSL.

Contents. Identity Assurance (Scott Rea Dartmouth College) IdM Workshop, Brisbane Australia, August 19, 2008

OPENID AUTHENTICATION SECURITY

SECURITY DOCUMENT. BetterTranslationTechnology

SCADA Security. Enabling Integrated Windows Authentication For CitectSCADA Web Client. Applies To: CitectSCADA 6.xx and 7.xx VijeoCitect 6.xx and 7.

Configuring Single Sign-on for WebVPN

CMP3002 Advanced Web Technology

ADFS Integration Guidelines

Top Ten Web Application Vulnerabilities in J2EE. Vincent Partington and Eelco Klaver Xebia

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

Using EMC Unisphere in a Web Browsing Environment: Browser and Security Settings to Improve the Experience

How-to: Single Sign-On

Two-Factor Authentication

CA Nimsoft Service Desk

Marcum LLP MFT Guide

Adobe Systems Incorporated

NeoMail Guide. Neotel (Pty) Ltd

Web application security

Elluminate Live! Access Guide. Page 1 of 7

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

Integrated Network Vulnerability Scanning & Penetration Testing SAINTcorporation.com

Table of Contents. Open-Xchange Authentication & Session Handling. 1.Introduction...3

Web Application Security

Web Application Report

Workday Mobile Security FAQ

Multi Factor Authentication API

Windows XP Exchange Client Installation Instructions

ASP.NET Forms Authentication Best Practices for Software Developers

Evaluation of different Open Source Identity management Systems

Secure Web Development Teaching Modules 1. Threat Assessment

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

Columbia University Web Security Standards and Practices. Objective and Scope

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

Web Application Security

How To Use Saml 2.0 Single Sign On With Qualysguard

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

Elluminate Live! Access Guide. Page 1 of 7

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

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

An overview of configuring WebEx for single sign-on. To configure the WebEx application for single-sign on from the cloud service (an overview)

Installing the ASP.NET VETtrak APIs onto IIS 5 or 6

Hushmail Express Password Encryption in Hushmail. Brian Smith Hush Communications

Where every interaction matters.

Riverbed Cascade Shark Common REST API v1.0

IBM Security QRadar SIEM Version MR1. Vulnerability Assessment Configuration Guide

Chapter 7 Transport-Level Security

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

User-password application scripting guide

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

Architecture of Enterprise Applications III Single Sign-On

User-ID Features. PAN-OS New Features Guide Version 6.0. Copyright Palo Alto Networks

Building a Robust Web Application Security Plan

Tenrox. Single Sign-On (SSO) Setup Guide. January, Tenrox. All rights reserved.

STABLE & SECURE BANK lab writeup. Page 1 of 21

QUANTIFY INSTALLATION GUIDE

Copyright: WhosOnLocation Limited

Business ebanking Fraud Prevention Best Practices

New Single Sign-on Options for IBM Lotus Notes & Domino IBM Corporation

Step-by-Step guide for SSO from MS Sharepoint 2010 to SAP EP 7.0x

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

Application Security Testing

ICE Trade Vault. Public User & Technology Guide June 6, 2014

Transcription:

Using Foundstone CookieDigger to Analyze Web Session Management Foundstone Professional Services May 2005

Web Session Management Managing web sessions has become a critical component of secure coding techniques. Malicious intruders, e- shoplifters, and hackers are increasingly targeting poorly designed applications which do not properly manage web sessions. Web session management encompasses the techniques used by web applications to transparently authenticate users over HTTP without having them repeatedly login. The HTTP protocol is inherently stateless in nature and so the application needs some way of performing session management. Session management entails the server sending a token of identity to the client (e.g. web browsers) after successful authentication. The most common way of performing session management is via the Set-Cookie directive of HTTP which stores a token on the client. Every subsequent request made by the client includes that token as a means to prove its identity. The application server has a database of user information corresponding to every token issued. Upon receiving a request that includes a token the application server correlates the user state with the token received. If the token is recognized, the request is processed, if it is not recognized, the request is rejected. Therefore, the token set on the client is the most critical information which provides a user access to his / her resources. This token is popularly called a Cookie. Foundstone CookieDigger CookieDigger, designed by Foundstone, is a free tool to help identify weak cookie generation and insecure implementations of session management by web applications. The tool works by collecting and analyzing cookies issued by a web application for multiple users. The tools functionality can be divided into 3 broad categories; 1. Cookie Collection 2. Cookie Analyses 3. Results www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 1

To use CookieDigger, the user needs to point the tool to the web application that is being analyzed. When the tool is launched a scaled down version of a web browser is presented. 1. The user needs to browse to the website using this browser. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 2

2. Login in as a regular user on the web site with valid credentials. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 3

3. Logout of the web site. This is required because some websites do not allow multiple logins simultaneously. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 4

4. Click on Replay URLs. This shows all the URLs that have been visited. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 5

5. The Visited URLs panel displays a tree view of all the URLs visited along with the associated parameter names and values. 6. Identify the request that has the credentials that were used to log on to the website. The application tries to make the best guess of the User ID and Password parameter but that may not be accurate in all cases. Select the right User ID and Password parameter using the drop down box. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 6

www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 7

7. Enter a set of credentials which can be used by the tool to log on the web application to collect the cookies. The tool does not use the initially entered credentials if not they are not reentered during this phase. The user needs to enter a minimum of one set of credentials and a maximum of 20 sets of credentials can be entered. 8. Select the number of times you want to repeat the login process for each set of credentials. The tool collects cookies set for each login attempt. The minimum is 2 and the maximum is 100. Press Done after having selected the number of attempts. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 8

9. Depending on the number of credentials and number of login attempts the tool can take from a few seconds to a few minutes to collect the cookies. 10. After the cookie collection is complete, you can choose to save the cookies in XML files for more extensive testing, manually analyze the results with the options provided, display the report with the default analyses performed on the collected cookies, or just ignore the collected cookies and the analyses. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 9

11. Save the cookies as an XML file. 12. The user can choose to manually test the cookies collected for commonly known mistakes. 13. The users can choose the instance of cookie that they wants to analyze. The tool provides the ability to choose the user and the instance number of the cookie that the user wants to see. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 10

14. The user can hash strings using MD5 and SHA1 algorithms and compare them with the cookies collected to check if the web application is using hashes of predictable string, or timestamps as cookies. The string value entered is hashed and compared to all the cookie values collected. The results are included in the report generated at the end of manual testing. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 11

15. The user can decode the cookie values to check for useful information passed in the cookies. The user currently has the option to perform Base64 and URL decoding on the collected cookies. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 12

Choose the cookie name value pair that you want to decode. Select the type of decoding and click ok. The decoded value will appear under Covert Value. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 13

16. The tool provides the user with the ability to search for particular strings and/or substrings across all the cookie values collected. This is particularly useful if the user is aware of the encryption algorithm and key used but is not sure of the plain text that is being encrypted. 17. The user has the option to directly go to the Manual Testing panel from the main window to continue performing the manual analyses on the cookies. The user needs to Load Cookies to access the stored XML files. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 14

18. The results of the analyses performed on the collected cookies and the analyses results can be seen through the Show Report tab. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 15

Analyses: CookieDigger performs the following analysis on the cookies collected: Average Length of the Cookie: If the average length of the cookie that is used as an authenticator is small then it would take fewer brute force attempts to hijack another users session. On a popular site we can assume many users to be logged in at the same time, therefore the chances of a successful brute force attempt might be high. Character Set of the Cookie: The character set employed in the generation of cookie value plays an important role in the entropy of the cookie. For any given cookie length, a large character set increases the strength of the authenticator. If the attacker can determine the character set employed by the application, the brute force attempts can be crafted more efficiently. The combination of the length of the cookie and the character set used determines the strength of the authenticator. Critical Information: The tool checks the cookie values set by the application to see if any of the cookies contains the usernames or password values in it. The check is performed on both the plain text value of the cookie and on the base64 decoded value of the cookie. Other common useful information passed in the cookie values are account numbers, names, privilege levels, etc. Entropy of the Cookies: The tool compares the different values of the cookie values to check how many characters are changing for every subsequent login. If the cookie value remains the same on subsequent logins, it shows that the algorithm used for generating the cookies is vulnerable to chosen plain text attacks. Furthermore, if the cookie values remain the same on subsequent logins it gives the attacker longer periods of time to perform the brute forces attempts. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 16

The screen shots below shows a sample report output collected from www.threatsandcountermeasures.com. The report provides a summary of the findings. It generates a predictability index based upon the cookie values collected. The analyses results are displayed in the report. The base line analyses performed on the cookies provides a user with a good indication on how strong the session identifiers are. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 17

The report shows all the collected cookie values in the report for the user to view and analyze the results. The report displays the findings of the manual analyses at the end of the report. If there was any positive finding during the manual testing the report displays the cookie values for user s reference. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 18

Known Issues 1. The tool does not work on the websites that requires scripting on parameter values before being sent back to the application. 2. The tool fails in cases where it the websites sends and expects a nonce for every new login. About Foundstone Professional Services Foundstone Professional Services, a division of McAfee, offers a unique combination of services and education to help organizations continuously and measurably protect the most important assets from the most critical threats. Through a strategic approach to security, Foundstone identifies, recommends, and implements the right balance of technology, people, and process to manage digital risk and leverage security investments more effectively. Foundstone s Secure Software Security Initiative (S3i ) services help organizations design and engineer secure software. By building in security throughout the Software Development Lifecycle, organizations can significantly reduce their risk of malicious attacks and minimize costly remediation efforts. Services include: Source Code Audits Software Design and Architecture Reviews Threat Modeling Web Application Penetration Testing Software Security Metrics and Measurement For more information about Foundstone S3i services, go to www.foundstone.com/s3i. Foundstone S3i training is designed to teach programmers and application developers how to build secure software and to write secure code. Classes include: Building Secure Software Writing Secure Code Java (J2EE) Writing Secure Code ASP.NET (C#) Ultimate Web Hacking For the latest course schedule, go to www.foundstone.com/education. www.foundstone.com 2005 Foundstone, Inc. All Rights Reserved - 19