Learn to view source code and uncover the secrets developers hide in plain sight: a leaked file path in an HTML comment that hands you the flag. A beginner-friendly introduction to information disclosure and broken access control.
Learning to view source code is one of the most fundamental skills in web security and the starting point for countless vulnerability discoveries. Most people interact only with the visual layer of a website, but security professionals know that the HTML source code, JavaScript files, and hidden comments often hold sensitive information developers never meant to expose. Reading that code is the first step toward understanding how web applications work, and where they break.
Web developers frequently leave information in source code that creates security risk. HTML comments meant as development notes can contain credentials, API keys, internal URLs, or database connection strings. Hidden form fields reveal application logic, user roles, or debug parameters. JavaScript files may carry hardcoded tokens, authentication endpoints, or business logic that belongs on the server. Even CSS class names and file paths leak details about the technology stack. These leaks are not theoretical: bug bounty programs routinely reward researchers who find API keys in JavaScript files, admin credentials in HTML comments, and internal paths buried in client-side code.
Browser tools provide the main interface for inspection. The View Source option (Ctrl+U), sometimes called view page source, shows the raw HTML exactly as the server delivered it. The Elements panel in Developer Tools shows the live DOM, including content generated by JavaScript. The Sources panel lists every loaded script and stylesheet. The Network tab captures each request and response, including API calls that may return sensitive data.
This hands-on HackerDNA lab walks you through the exact workflow a tester uses on a real engagement. You open an ordinary-looking company website, view source code, and read it the way an attacker would. A developer has left a comment pointing at a file they forgot to lock down. You follow that clue, request the file directly, and capture the flag, picking up information disclosure and broken access control along the way.
Source code inspection is the foundation of web application testing. Every advanced technique, from XSS discovery to authentication bypass to API abuse, starts with understanding the client-side code. Building the habit of reading source before you interact with an application is what separates a careful tester from a casual user. This beginner-friendly lab gives you a quick, practical way to build that habit on HackerDNA.
Create a free account and start practicing cybersecurity hands-on.
Launch your dedicated machine to begin hacking
Create a free account to start your own dedicated server, submit flags, and earn XP on the leaderboard.
Start Hacking FreeLabs that share similar skills with this one
Choose how you want to get started
Sign in to your account