When authentication functions related to the application are NOT implemented correctly which will allow hackers to compromise passwords or session ID's or to exploit other implementation flaws using other users credentials.
Example
An e-commerce application supports URL rewriting, putting session IDs in the URL: http://example.com/sale/saleitems/jsessionid=2P0OC2JSNDLPSKHCJUN2JV/?item=laptopAn authenticated user of the site forwards the URL to their friends to know about the discounted sales. He e-mails the above link without knowing that the user is also giving away the session ID's. When his friends use the link they will use his session and credit card.
Hands ON
1. Login to Webgoat and navigate to 'Session Management Flaws' Section. Let us bypass the authetication by spoofing the cookie. Below is the snapshot of the scenario.2. When we login using the credentials webgoat/webgoat, we find from Burp Suite that the JSESSION ID is C8F3177CCAFF380441ABF71090748F2E while the AuthCookie=65432ubphcfx upon successful authentication
4. Now we need to analyze the AuthCookie Patterns. The first half '65432' is common for both authentications. Hence we are now interested in analyzing the last part of the authcookie values viz- ubphcfx for webgoat user and udfqtb for aspect user respectively.
6. If we pass this cookie value and let us see what happens. Upon authenticating as user webgoat, change the authcookie value to mock the user Alice by finding the authcookie for the same by performing step#4 and step#5.
Preventing Mechanisms
Develop a strong authentication and session management controls such that it meets all the authentication and session management requirements defined in OWASP�s Application Security Verification StandardDev should ensure that they avoid XSS flaws that can be used to steal session IDs.
Aucun commentaire:
Enregistrer un commentaire