Berner Fachhochschule, Technik und Informatik
Advanced Web Technology 11) Web Security : ESAPI
- Dr. E. Benoist
Fall Semester 2010/2011
Advanced Web Technology 11) Web Security : ESAPI 1
Advanced Web Technology 11) Web Security : ESAPI Dr. E. Benoist - - PowerPoint PPT Presentation
Berner Fachhochschule, Technik und Informatik Advanced Web Technology 11) Web Security : ESAPI Dr. E. Benoist Fall Semester 2010/2011 Advanced Web Technology 11) Web Security : ESAPI 1 Table of Contents Motivations Problems and
Advanced Web Technology 11) Web Security : ESAPI 1
Advanced Web Technology 11) Web Security : ESAPI 2
◮ The Open Web Application Security Project (OWASP)
the security of application software.
◮ Products developed within OWASP
communicate using the HTTP and HTTPS protocols.
four levels of application-level security verification for Web applications.
◮ ESAPI
against security-related design and implementation flaws.
Advanced Web Technology 11) Web Security : ESAPI Motivations 3
◮ Presentation Layer
◮ Business Layer
◮ Persistence Layer
instance)
◮ DataBase Layer
Advanced Web Technology 11) Web Security : ESAPI Motivations 4
◮ Presentation Layer
weak)
reference)
◮ Business Layer
reference)
◮ . . .
Advanced Web Technology 11) Web Security : ESAPI Motivations 5
1Source: Javadoc documentation of the ESAPI package Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Decoding / Encoding Untrusted Data 6
◮ One should never trust input given by the user
◮ Work with the simplest string ◮ May be stored encoded
distinguished name).
◮ Encode for the output
encodeForHTMLAttribute
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Decoding / Encoding Untrusted Data 7
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Handling Authentication and Identity 8
◮ defines a set of methods for generating and handling
◮ Application must set current user as soon as possible
places in this API.
◮ Method for login uses request and or session parameter
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Handling Authentication and Identity 9
◮ Handle password
changePassword()
generateStrongPassword()
site-specific complexity requirements, like length or number of character sets.
hashPassword()
◮ Handles login / logout
information in method login()
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Handling Authentication and Identity 10
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Enforcing Access Control 11
◮ Use the login done by Authenticator ◮ Interface AccessController must be extended according
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Enforcing Access Control 12
◮ Each time a resource is accessed, one must “Assert” its
→businessFunction”,
◮ an attacker can attempt to invoke any business function
in both the business logic and data layers.
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Enforcing Access Control 13
◮ Vulnerability: gives access to internal structure
www.toto.com/download.do?res=mysecretfile.pdf
◮ As a rule, developers should not expose their direct
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Enforcing Access Control 14
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Enforcing Access Control 15
◮ Indirect references are handled as strings, to facilitate
◮ When a reference is sent to the browser
◮ When a reference is received from the browser
◮ If per-user AccessReferenceMaps are used, then request
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Enforcing Access Control 16
◮ Example of use
→;
→indRef );
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Enforcing Access Control 17
◮ Based on two classes
application
reacts according to given “rules”.
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Intrusion detection 18
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Intrusion detection 19
◮ The Logger interface defines a set of methods that can
◮
trace (lowest value)
at stats in a browser)
address, a time stamp
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Intrusion detection 20
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Intrusion detection 21
◮ Track security relevant events and identify attack
◮ The interface is currently designed to accept exceptions
◮ Implemented in the DefaultIntrusionDetector class
see if any user exceeds a configurable threshold in a configurable time period.
minute period.
second period.
◮ More complex implementation are possible
Advanced Web Technology 11) Web Security : ESAPI Problems and Solutions: Intrusion detection 22
◮ Default implementation can be configured
rules
◮ Develop your own implementation of Interfaces ◮ Need to integrate the new classes in the framework
Pattern”
Advanced Web Technology 11) Web Security : ESAPI Configure ESAPI for your business 23
→locator class
Advanced Web Technology 11) Web Security : ESAPI Configure ESAPI for your business 24
◮ At runtime change the instance used in the ◮ The instance of class ESAPI contains the default values
Advanced Web Technology 11) Web Security : ESAPI Configure ESAPI for your business 25
◮ ESAPI groups all the security items in one place
◮ ESAPI has been tested and developed by security
◮ ESAPI can easily be tailored for your business needs
set methods).
Advanced Web Technology 11) Web Security : ESAPI Conclusion 26
◮ The ESAPI Toolkit web pages http://www.owasp.org ◮ OWASP Javadoc of ESAPI http://owasp-esapi-java.
Advanced Web Technology 11) Web Security : ESAPI Conclusion 27