Introduction to Web Applications
A Walk-Through Solving Hack The Box Academy's Introduction to Web Applications Module
HTML
What is the HTML tag used to show an image? <img>
Cascading Style Sheets (CSS)
What is the CSS "property: value" used to make an HTML element's text aligned to the left? text-align: left;
Sensitive Data Exposure
Objective: Check the above login form for exposed passwords. Submit the password as the answer.
Target(s): 94.237.57.211:32439
Note: I'm using Pwnbox so you don't have to set up a local VM for this.


First, navigate to your target ip in your browser: http://<target ip>/
To check for sensitive data exposure that's usually found in the source code of the web page, simply right click anywhere on the page and select View Page Source or type ctrl+u.
Answer: HiddenInPlainSight


HTML Injection
Objective: What text would be displayed on the page if we use the following payload as our input: <a href="http://www.hackthebox.com">Click Me</a>
target(s): 94.237.122.123:36551
Answer: Your name is Click Me



Cross-Site Scripting (XSS)
Objective: Try to use XSS to get the cookie value in the above page
Target(s): 94.237.122.123:36551

We will enter the command: #"><img src=/ onerror=alert(document.cookie)> to retrieve cookie from HTML document tree.
Answer: XSSisFun




Back End Servers
What operating system is 'WAMP' used with? Windows
Web Servers
If a web server returns an HTTP code 201, what does it stand for? Created
Databases
What type of database is Google's Firebase Database? NOSQL
Development Frameworks & APIs
Objective: Use GET request '/index.php?id=0' to search for the name of the user with id number 1?
Target(s): 94.237.51.185:58339

To solve this, we will use the command : curl -s http://<target ip>/api.php?id=1
or you can go to your browser and type http://<target ip>/api.php?id=1
Answer: superadmin

Common Web Vulnerabilities
To which of the above categories does public vulnerability 'CVE-2014-6271' belongs to? Command Injection
CVE-2014-6271, also known as Shellshock, is a critical vulnerability discovered in GNU Bash (Bourne Again Shell)— a widely used command-line shell in Unix/Linux systems. It was disclosed in September 2014 and quickly became a major security concern due to how easily it could be exploited.
Public Vulnerabilities
What is the CVSS v2.0 score of the public vulnerability CVE-2017-0144? 9.3
CVE-2017-0144 is a critical remote code execution (RCE) vulnerability in Microsoft Windows SMBv1 (Server Message Block version 1). It became globally known because it was used in the WannaCry ransomware attack in 2017.