Okay, here's a breakdown of free Broken Access Control challenges on TryHackMe and Hack The Box, categorized and with details to help you get started. I'll also give some tips on how to approach these challenges. I'll focus on challenges that are consistently available as of late 2023/early 2024. Availability can change, so double-check.
Understanding Broken Access Control
Before diving in, let's quickly recap what this vulnerability is. Broken Access Control happens when a web application doesn't properly restrict access to authorized functionality. This means users might be able to:
- Access other users' data: View, modify, or delete information they shouldn't.
- Perform administrative functions: Without having the necessary privileges.
- Bypass authentication: In some cases, directly access protected resources.
- Horizontal Privilege Escalation: Accessing resources belonging to other users with the same privilege level.
- Vertical Privilege Escalation: Accessing resources requiring higher privilege levels (e.g., admin).
I. TryHackMe Challenges (Free)
TryHackMe is generally more beginner-friendly, with guided learning paths.
- Basic Broken Access Control: (Room: Start Here) - This is a foundational room. It introduces the core concepts with simple examples. It's highly recommended as a starting point. https://tryhackme.com/room/start-here
- Broken Access Control: (Room: Web Fundamentals) - Another good introductory room, part of the Web Fundamentals learning path. It covers common techniques. https://tryhackme.com/room/web-fundamentals
- Forgotten Functionality: (Room: Web Application Exploitation) - This room often involves finding hidden admin panels or functionality that wasn't intended to be publicly accessible. It's a bit more challenging than the basics. https://tryhackme.com/room/web-application-exploitation
- Damn Vulnerable Web App (DVWA): (Room) - While not specifically a Broken Access Control room, DVWA has a section dedicated to it. It's a great place to practice different attack vectors in a safe environment. https://tryhackme.com/room/dvwa
- Postman: (Room) - Learning Postman is crucial for API testing, and many Broken Access Control vulnerabilities are found in APIs. This room will help you get familiar with the tool. https://tryhackme.com/room/postman
- Blind SQLi & Broken Access Control: (Room) - This room combines two vulnerabilities, but the Broken Access Control part is significant. https://tryhackme.com/room/blindsqliandbac
II. Hack The Box Challenges (Free Tier)
Hack The Box is generally more difficult than TryHackMe. The free tier has rotating challenges, so availability varies. I'll list some that have appeared frequently or are likely to reappear.
- Lame Website: (Machine) - A classic starting point. It often has a straightforward Broken Access Control vulnerability. Look for predictable resource locations.
- Default Login: (Machine) - While not purely Broken Access Control, it often leads to it. Finding default credentials can give you access to admin panels.
- Shop: (Machine) - This machine often involves manipulating parameters in the URL or POST requests to access other users' shopping carts or account information.
- Museum: (Machine) - A good challenge that often involves finding hidden directories or files.
- Retro: (Machine) - Often has vulnerabilities related to file inclusion and potentially Broken Access Control.
- EternalTeam: (Machine) - A good starting point for learning about web application vulnerabilities, including broken access control.
- Factory: (Machine) - This machine often involves exploiting vulnerabilities in a web application to gain access to sensitive information.
Important Hack The Box Notes:
- Initial Access: Hack The Box machines usually require you to gain initial access (e.g., through SSH) before you can start exploiting the web application.
- VPN: You must connect to the Hack The Box VPN to access the machines.
- Reset: If you get stuck, you can reset the machine to its initial state.
III. Common Techniques to Look For (Both Platforms)
Here's a breakdown of techniques to try when tackling Broken Access Control challenges:
-
URL Manipulation:
- Parameter Tampering: Change the values of parameters in the URL (e.g.,
user_id=1 to user_id=2). See if you can access data belonging to other users.
- Path Traversal: Try to access files outside the intended directory using
../ sequences in the URL (e.g., http://example.com/images/../../../etc/passwd). Be careful with this; it can be dangerous if you're not sure what you're doing.
- Hidden Parameters: Inspect the HTML source code and network requests (using your browser's developer tools) to look for hidden form fields or parameters that might control access.
-
HTTP Request Manipulation:
- POST Request Tampering: If the application uses POST requests, intercept them (using Burp Suite or ZAP – see "Tools" below) and modify the data being sent.
- HTTP Method Spoofing: Try using different HTTP methods (e.g., PUT, DELETE) on resources that only allow GET.
-
IDOR (Insecure Direct Object Reference):
- This is a common type of Broken Access Control. The application uses a direct reference to an object (e.g., a file, a database record) without proper authorization checks. Try changing the ID to access other objects.
-
Forced Browsing:
- Try to access directories or files that are not linked to from the main website (e.g.,
/admin/, /backup/, /config.php).
-
API Testing:
- If the application has an API, use Postman or similar tools to test it. Try making requests to endpoints that you shouldn't have access to.
-
Source Code Review (If Available):
- If the challenge provides access to the source code, carefully review it for authorization checks and potential vulnerabilities.
IV. Tools You'll Need
- Browser Developer Tools: Essential for inspecting network requests, HTML source code, and cookies. (Chrome, Firefox, Edge all have excellent developer tools).
- Burp Suite Community Edition: A powerful web proxy that allows you to intercept, analyze, and modify HTTP requests. https://portswigger.net/burp/communitydownload
- OWASP ZAP: Another excellent web proxy, similar to Burp Suite. https://www.zaproxy.org/
- Postman: For testing APIs. https://www.postman.com/
- curl: A command-line tool for making HTTP requests. Useful for quick testing.
Tips for Success
- Be Systematic: Don't just randomly try things. Follow a methodical approach.
- Read the Challenge Description Carefully: The description often provides hints.
- Take Notes: Keep track of what you've tried and what the results were.
- Google is Your Friend: If you're stuck, search for similar vulnerabilities or techniques.
- Don't Give Up: Broken Access Control challenges can be tricky, but they're very rewarding to solve.
- Learn from Writeups: After you've attempted a challenge, read writeups from other users to see how they solved it. (Search on Google or YouTube).
Disclaimer: These challenges are for educational purposes only. Do not attempt to exploit vulnerabilities in systems that you do not have permission to test. Always respect the law and ethical hacking principles.
Good luck, and have fun! Let me know if you have any other questions.