Web App Access Control Design

Slides:



Advertisements
Similar presentations
Lecture 10 Sharing Resources. Basics of File Sharing The core component of any server is its ability to share files. In fact, the Server service in all.
Advertisements

Operating System Security
Forms Authentication, Users, Roles, Membership Ventsislav Popov Crossroad Ltd.
APPLICATION DEVELOPMENT SECURE CODING WORKSHOP JIM MANICO VP, Security Architecture MARCH 2013.
Building web applications on top of encrypted data using Mylar Presented by Tenglu Liang Tai Liu.
Bypassing Client-Side Protection CSE 591 – Security and Vulnerability Analysis Spring 2015 Adam Doupé Arizona State University
Attacking Authentication and Authorization CSE 591 – Security and Vulnerability Analysis Spring 2015 Adam Doupé Arizona State University
ATTACKING AUTHENTICATION The Web Application Hacker’s Handbook, Ch. 6 Presenter: Jie Huang 10/31/2012.
Access Control Methodologies
Environmental Council of States Network Authentication and Authorization Services The Shared Security Component February 28, 2005.
SOFTWARE SECURITY JORINA VAN MALSEN Attacking Access Control 1.
Information Networking Security and Assurance Lab National Chung Cheng University The Ten Most Critical Web Application Security Vulnerabilities Ryan J.W.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
The OWASP Foundation Web App Access Control Design.
Designing Security In Web Applications Andrew Tomkowiak 10/8/2013 UW-Platteville Software Engineering Department
Web Application Vulnerabilities Checklist. EC-Council Parameter Checklist  URL request  URL encoding  Query string  Header  Cookie  Form field 
Web-based Document Management System By Group 3 Xinyi Dong Matthew Downs Joshua Ferguson Sriram Gopinath Sayan Kole.
D ATABASE S ECURITY Proposed by Abdulrahman Aldekhelallah University of Scranton – CS521 Spring2015.
Introduction to Application Penetration Testing
Security.NET Chapter 1. How Do Attacks Occur? Stages of attack Examples of attacker actions 1. FootprintRuns a port scan on the firewall 2. PenetrationExploits.
Forms Authentication, Users, Roles, Membership Svetlin Nakov Telerik Corporation
CSCI 6962: Server-side Design and Programming Secure Web Programming.
Author: Bill Buchanan. Work Schedule Author: Bill Buchanan.
1-Vulnerabilities 2-Hackers 3-Categories of attacks 4-What a malicious hacker do? 5-Security mechanisms 6-HTTP Web Servers 7-Web applications attacks.
WaveMaker Visual AJAX Studio 4.0 Training Authentication.
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
Copyright 2000 eMation SECURITY - Controlling Data Access with
Design Patterns Phil Smith 28 th November Design Patterns There are many ways to produce content via Servlets and JSPs Understanding the good, the.
Lecture 16 Page 1 CS 236 Online SQL Injection Attacks Many web servers have backing databases –Much of their information stored in a database Web pages.
SEC835 Practical aspects of security implementation Part 1.
Chapter 2. Core Defense Mechanisms. Fundamental security problem All user input is untrusted.
Oracle Application Express Security. © 2009 Oracle Corporation Authentication Out-of-the-Box Pre-Configured Schemes LDAP Directory credentials Oracle.
Secure Credential Manager Claes Nilsson - Sony Ericsson
Top Five Web Application Vulnerabilities Vebjørn Moen Selmersenteret/NoWires.org Norsk Kryptoseminar Trondheim
 Chapter 14 – Security Engineering 1 Chapter 12 Dependability and Security Specification 1.
Dr. Mustafa Cem Kasapbaşı Security in ASP.NET. Determining Security Requirements Restricted File Types.
Effective Security in ASP.Net Applications Jatin Sharma: Summer 2005.
SEC835 Runtime authentication Secure session management Secure use of cryptomaterials.
Beyond negative security Signatures are not always enough Or Katz Trustwave ot.com/
APPLICATION PENETRATION TESTING Author: Herbert H. Thompson Presentation by: Nancy Cohen.
SQL INJECTIONS Presented By: Eloy Viteri. What is SQL Injection An SQL injection attack is executed when a web page allows users to enter text into a.
Chapter 10: Rights, User, and Group Administration.
Linux Security. Authors:- Advanced Linux Programming by Mark Mitchell, Jeffrey Oldham, and Alex Samuel, of CodeSourcery LLC published by New Riders Publishing.
 Registry itself is easy and straightforward in implementation  The objects of registry are actually complicated to store and manage  Objects of Registry.
Need for Security Control access to servicesControl access to services Ensure confidentialityEnsure confidentiality Guard against attacksGuard against.
Trusted Operating Systems
Writing secure Flex applications  MXML tags with security restrictions  Disabling viewSourceURL  Remove sensitive information from SWF files  Input.
Securing Web Applications Lesson 4B / Slide 1 of 34 J2EE Web Components Pre-assessment Questions 1. Identify the correct return type returned by the doStartTag()
LINUX Presented By Parvathy Subramanian. April 23, 2008LINUX, By Parvathy Subramanian2 Agenda ► Introduction ► Standard design for security systems ►
ASP.NET 2.0 Security Alex Mackman CM Group Ltd
PREPARED BY: MS. ANGELA R.ICO & MS. AILEEN E. QUITNO (MSE-COE) COURSE TITLE: OPERATING SYSTEM PROF. GISELA MAY A. ALBANO PREPARED BY: MS. ANGELA R.ICO.
Business Objects XIr2 Windows NT Authentication Single Sign-on 18 August 2006.
Windows Active Directory – What is it? Definition - Active Directory is a centralized and standardized system that automates network management of user.
Developing a Secure Internet Service SE Linux in Production Russell Coker Linux Consultant.
Database and Cloud Security
Identity and Access Management
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
World Wide Web policy.
Outline What does the OS protect? Authentication for operating systems
Radius, LDAP, Radius used in Authenticating Users
Server Concepts Dr. Charles W. Kann.
SQL Injection Attacks Many web servers have backing databases
Security mechanisms and vulnerabilities in .NET
Outline What does the OS protect? Authentication for operating systems
Lesson 16-Windows NT Security Issues
Lecture 2 - SQL Injection
WWW安全 國立暨南國際大學 資訊管理學系 陳彥錚.
Designing IIS Security (IIS – Internet Information Service)
Fast-Track UiPath Developer Module 10: Sensitive Data Handling
Presentation transcript:

Web App Access Control Design ©2007 Ernst & Young Advanced Security Center April 19, 2017 Web App Access Control Design

What is Access Control / Authorization? ©2007 Ernst & Young Advanced Security Center April 19, 2017 What is Access Control / Authorization? Authorization is the process where a system determines if a specific user has access to a particular resource The intent of authorization is to ensure that a user only accesses system functionality to which he is entitled Role based access c ontrol (RBAC) is commonly used to manage permissions within an application

Attacks on Access Control Vertical Access Control Attacks A standard user accessing administration functionality Horizontal Access Control attacks Same role, but accessing another user's private data Business Logic Access Control Attacks Abuse of workflow

©2007 Ernst & Young Advanced Security Center April 19, 2017 Access Control Issues Many applications utilize an “all or nothing” approach Once authenticated all users have equal privilege levels Authorization logic often relies on Security Through Obscurity (STO) by assuming: Users won’t find unlinked or “hidden” paths/functionality. Users will not find and tamper with “obscured” client side parameters (i.e. “hidden” form fields, cookies, etc) Applications with multiple permission levels/roles often increases the possibility of conflicting permission sets resulting in unanticipated privileges STO Can be used as a complimentary technique in otherwise secure systems

Access Control Anti-Patterns Hard-coded role checks in application code Lack of centralized access control logic Untrusted data driving access control decisions Access control that is “open by default” Lack of addressing horizontal access control in a standardized way (if at all) Access control logic that needs to be manually added to every endpoint in code

Hard Coded Roles if (user.isManager() || user.isAdministrator() || user.isEditor() || user.isUser()) { // execute action }

Hard Coded Roles Makes “proving” the policy of an application difficult for audit or Q/A purposes Any time access control policy needs to change, new code need to be pushed Fragile, easy to make mistakes

Order Specific Operations Imagine the following parameters http://example.com/buy?action=chooseDataPackage http://example.com/buy?action=customizePackage http://example.com/buy?action=makePayment http://example.com/buy?action=downloadData Can an attacker control the sequence? Can an attacker abuse this with concurrency?

Never Depend on Untrusted Data Never trust user data for access control decisions Never make access control decisions in JavaScript Never make authorization decisions based solely on hidden fields cookie values form parameters URL parameters anything else from the request Never depend on the order of values sent from the client

©2007 Ernst & Young Advanced Security Center April 19, 2017 Access Control Issues Many administrative interfaces require only a password for authentication Shared accounts combined with a lack of auditing and logging make it extremely difficult to differentiate between malicious and honest administrators Administrative interfaces are often not designed as “secure” as user-level interfaces given the assumption that administrators are trusted users Authorization/Access Control relies on client-side information (e.g., hidden fields) <input type=“text" name=“fname" value=“Derek”> <input type=“text" name=“lname" value=“Jeter”> <input type=“hidden" name=“usertype" value=“admin”>

Attacking Access Controls ©2007 Ernst & Young Advanced Security Center April 19, 2017 Attacking Access Controls Elevation of privileges Disclosure of confidential data Compromising admin-level accounts often results in access to user’s confidential data Data tampering Privilege levels do not distinguish users who can only view data and users permitted to modify data

Testing for Broken Access Control ©2007 Ernst & Young Advanced Security Center April 19, 2017 Testing for Broken Access Control Attempt to access administrative components or functions as an anonymous or regular user Scour HTML source for “interesting” hidden form fields Test web accessible directory structure for names like admin, administrator, manager, etc (i.e. attempt to directly browse to “restricted” areas) Determine how administrators are authenticated. Ensure that adequate authentication is used and enforced For each user role, ensure that only the appropriate pages or components are accessible for that role If able to compromise administrator-level account, test for all other common web application vulnerabilities (poor input validation, privileged database access, etc)

Defenses Against Access Control Attacks ©2007 Ernst & Young Advanced Security Center April 19, 2017 Defenses Against Access Control Attacks Implement role based access control to assign permissions to application users for vertical access control requirements Implement data-contextual access control to assign permissions to application users in the context of specific data items for horizontal access control requirements Avoid assigning permissions on a per-user basis Perform consistent authorization checking routines on all application pages Where applicable, apply DENY privileges last, issue ALLOW privileges on a case-by-case basis

Defenses Against Access Control ©2007 Ernst & Young Advanced Security Center April 19, 2017 Defenses Against Access Control Where possible restrict administrator access to machines located on the local area network (i.e. it’s best to avoid remote administrator access from public facing access points) Log all failed access authorization requests to a secure location for review by administrators Perform reviews of failed login attempts on a periodic basis Utilise the strengths and functionality provided by the SSO solution you chose, e.g. Netegrity

Best Practice: Code to the Activity if (AC.hasAccess(ARTICLE_EDIT)) { //execute activity } Code it once, never needs to change again Implies policy is persisted/centralized in some way Requires more design/work up front to get right

Best Practice: Centralized ACL Controller Define a centralized access controller ACLService.isAuthorized(ACTION_CONSTANT) ACLService.assertAuthorized(ACTION_CONSTANT) Access control decisions go through these simple API’s Centralized logic to drive policy behavior and persistence May contain data-driven access control policy information

Using a Centralized Access Controller In Presentation Layer if (isAuthorized(VIEW_LOG_PANEL)) { <h2>Here are the logs</h2> <%=getLogs();%/> } In Controller try (assertAuthorized(DELETE_USER)) deleteUser();

Best Practice: Verifying policy server-side Keep user identity verification in session Load entitlements server side from trusted sources Force authorization checks on ALL requests JS file, image, AJAX and FLASH requests as well! Force this check using a filter if possible

SQL Integrated Access Control Example Feature http://mail.example.com/viewMessage?msgid=2356342 This SQL would be vulnerable to tampering select * from messages where messageid = 2356342 Ensure the owner is referenced in the query! select * from messages where messageid = 2356342 AND messages.message_owner = <userid_from_session>

Access Control Positive Patterns Code to the activity, not the role Centralize access control logic Design access control as a filter Deny by default, fail securely Build centralized access control mechanism Apply same core logic to presentation and server-side access control decisions Server-side trusted data should drive access control

Data Contextual Access Control Data Contextual / Horizontal Access Control API examples ACLService.isAuthorized(EDIT_ORG, 142) ACLService.assertAuthorized(VIEW_ORG, 900) Long form isAuthorized(user, EDIT_ORG, Organization.class, 14) Essentially checking if the user has the right role in the context of a specific object Protecting data a the lowest level!

Data Contextual Access Control User User ID User Name Role/Activity Role/Activity ID Role/Activity Name Entitlement / Privilege User ID Role/Activity ID Data Type ID Data Instance Id Data Type Data ID Data Name