Junior Penetration Tester Introduction to WebHacking Get hands-on, learn about and exploit some of the most popular web application vulnerabilities seen in the industry today. Walking an Application Introduction In this room you will learn how to manually review a web application for security issues using only the in-built tools in your browser. More often than not, automated security tools and scripts will miss many potential vulnerabilities and useful information. Browser Tools Overview Here is a short breakdown of the in-built browser tools you will use throughout this room: View Source - Use your browser to view the human-readable source code of a website. Inspector - Learn how to inspect page elements and make changes to view usually blocked content. Debugger - Inspect and control the flow of a page's JavaScript Network - See all the network requests a page makes. The Penetration Testing Approach As a penetration tester, your role when reviewing a website or web application is to discover features that could potentially be vulnerable and attempt to exploit them to assess whether or not they are. These features are usually parts of the website that require some interactivity with the user. Finding interactive portions of the website can be as easy as spotting a login form to manually reviewing the website's JavaScript. An excellent place to start is just with your browser exploring the website and noting down the individual pages/areas/features with a summary for each one. Example Site Review An example site review for the Acme IT Support website would look something like this: Feature URL Summary Home Page / This page contains a summary of what Acme IT Support does with a company photo of their staff. Latest News /news This page contains a list of recently published news articles by the company, and each news article has a link with an id number, i.e. /news/article?id=1 News Article /news/article?id=1 Displays the individual news article. Some articles seem to be blocked and reserved for premium customers only. Contact Page /contact This page contains a form for customers to contact the company. It contains name, email and message input fields and a send button. Customers /customers This link redirects to /customers/login . Customer Login /customers/login This page contains a login form with username and password fields. Customer Signup /customers/signup This page contains a user-signup form that consists of a username, email, password and password confirmation input fields. Customer Reset Password /customers/reset Password reset form with an email address input field. Customer Dashboard /customers This page contains a list of the user's tickets submitted to the IT support company and a "Create Ticket" button. Create Ticket /customers/ticket/new This page contains a form with a textbox for entering the IT issue and a file upload option to create an IT support ticket. Customer Account /customers/account This page allows the user to edit their username, email and password. Customer Logout /customers/logout This link logs the user out of the customer area. Viewing Page Source The page source is the human-readable code returned to our browser/client from the web server each time we make a request. The returned code is made up of HTML (HyperText Markup Language), CSS (Cascading Style Sheets) and JavaScript, and it's what tells our browser what content to display, how to show it and adds an element of interactivity with JavaScript. For our purposes, viewing the page source can help us discover more information about the web application. How to View Page Source There are three main ways to view page source: Right-click method : While viewing a website, you can right-click on the page, and you'll see an option on the menu that says "View Page Source". URL prefix method : Most browsers support putting view-source: in front of the URL, for example: view-source:https://www.google.com/ Browser menu : In your browser menu, you'll find an option to view the page source. This option can sometimes be in submenus such as developer tools or more tools. What to Look For in Page Source Comments At the top of the page, you'll notice some code starting with — these are comments. Comments are messages left by the website developer, usually to explain something in the code to other programmers or even notes/reminders for themselves. These comments don't get displayed on the actual webpage. Links Links to different pages in HTML are written in anchor tags (these are HTML elements that start with