Broken Authentication is the consequence of programming flaws in session management and authentication. Insufficient conception of identity and access control can lead to security gaps. Attackers are able to exploit these security gaps by using automated tools for brute-force-attacks. The worst case is that attackers gain access to administrator accounts, get sensitive data and the possibility to identity theft.
- Challenge 2.1: Brute-force attack
- Challenge 2.2: Create an administrator account
- Challenge 2.3: Take over the session of a previously logged in user
- Challenge 2.4: Change the password of the user account of Bender
- Challenge 2.5: Log in with the user account of Bjoern
HINT: Make sure that you download Postman and OWASP ZAP.
Log in with the original password of the administrator without SQL injection or changing the password. Detect the password with a brute force attack. For example, you could use https://github.com/zaproxy/zaproxy/wiki/Downloads.
-
Tip: His email is admin@juice-sh.op.
-
Tip: Try to attack the POST call on http://localhost:3000/rest/user/login with OWASP ZAP.
-
Tip: You need a word list with a top list of the weakest passwords. Browse to https://github.com/danielmiessler/SecLists/tree/master/Passwords.
Create an account that has all administrator permissions.
-
Tip: Postman could help you.
-
Tip: Have a look at the GET-Requests in the console of the Web Development Tool.
-
Tip: The GET-Requests sent while interacting with the administration section might help you.
Switch to the session of a previously logged in user without reusing his user credentials. You have to log in the user account that you want to attack at least one time. After a logout, you should try to return to this session without the login section.
-
Tip: Capture all GET and POST requests while logging in by ticking the
Persist Logsoption in the console of the Web Development Tool or leaving the console open. -
Tip: The token in the tab
Responsemight be useful. -
Tip: Have a look at the tab
Storage. -
Tip: Log in while observing the tab
Storage.
Information: Save this challenge for Chapter 3 - Injection.
Change the password of the user account of Bender without using the forgot password mechanism, cracking the password hash or SQL injection. You may use SQL injection for the first login, but the final change of the password shouldn't be a result of this method.
-
Tip: His email is bender@juice-sh.op.
-
Tip: Inspect and adapt the HTTP calls while interacting with the
change passwordmechanism. -
Tip: Postman will help you.
Log in with the original user credentials of Bjoern (without SQL injection).
-
Tip: His email is bjoern.kimminich@googlemail.com.
-
Tip: Bjoern's encrypted password is not a MD5 hash.
-
Tip: Brute-force attacks and decrypting the password hash won't be possible.
-
Tip: The registration has been performed by Google OAuth.
-
Tip: Have a look at the tab
Debugger(Firefox) orSources(Chrome).