Lab 04 Broken Access Control - Muamaidbengt/juice-shop GitHub Wiki
Broken Access Control
Challenge "Access the administration section of the store"
Search through the page source code for any interesting links
- With the Juice Shop open, go to the Sources tab of the Developer tools in your browser.
- Go to the
dist/juice-shop.min.js resource in the source tree.
- Notice how the file has been minified and is hard to read.
- Use the "Pretty print"/code formatting feature to make it more readable.
- Scroll down a bit to find the route configuration (try searching within the file view for
routeprovider if you can't find it).
- This section shows some of the logical contents of the site, not all of which are accessible via the navigation.
- Notice how there's a route that looks particularly interesting called
/administration.
Attempt to open the URL you just discovered
- Try appending
/administration after the hash sign (#) in the address bar of your browser.
Questions
- What security measures seems to have been used to protect the Administration section from unintended use?
Challenge "Access someone else's basket"
Create a basket for the victim
- Login as any user.
- Add some Strawberry juice to the basket.
- Logout.
Attempt to access the victim's basket as a different user
- Login as any other user (create a new if necessary).
- Go to the "Application"(Chrome) or "Debug"(Edge) tab of the developer tools and check under "Session storage".
- Notice there's a
bid key there. Maybe "bid" is short for "basket id"?
- Decrease the value of
bid by 1.
- Refresh the page.
- Go to the basket/checkout page.
Questions
- What risk does this present to
- the Juice Shop?
- the customers of the Juice Shop?
- How could this vulnerability be negated?
Recommended reading