Cross-Site Scripting (XSS)
| Field | Value |
|---|---|
| Module ID | 103 |
| Difficulty | Easy |
| Tier | Tier II |
| Category | Offensive |
| Estimated Time | 6 hours |
| Cubes Earned | 20 |
| Experience Points | 390 |
| Creators | 21y4d |
| Last Updated | 2021-09-17T00:00:00.000000Z |
| URL | https://academy.hackthebox.com/app/module/103 |
Module Includes
- 10 Sections
- 7 Interactive Exercises
- 1 Assessments
- 20 Cubes
Module Description
Cross-Site Scripting (XSS) vulnerabilities are among the most common web application vulnerabilities. An XSS vulnerability may allow an attacker to execute arbitrary JavaScript code within the target's browser and result in complete web application compromise if chained together with other vulnerabilities. This module will teach you how to identify XSS vulnerabilities and exploit them.
Module Summary
Web Application Penetration Testing is a vital part of any penetration test. It plays an essential role in identifying critical vulnerabilities that may lead to the organization's assets being compromised. Cross-Site Scripting (XSS) vulnerabilities are among the most common vulnerabilities in any web application, with studies indicating that over 80% of all web applications are vulnerable to it. An XSS vulnerability may allow an attacker to execute arbitrary JavaScript code within the target's browser, leading to various types of attacks, including compromising web admins and their web applications.
While many organizations choose to ignore XSS vulnerabilities, as it only affects end-users without having a direct ability to execute code on the back-end server, in this module, we will discuss why XSS should be taken seriously. We will discuss the three types of XSS vulnerabilities, how to identify them, and how to exploit them.
In addition to this, the Cross-Site Scripting (XSS) module will teach you the following:
- What is an XSS vulnerability?
- History of XSS attacks in real-life
- What are
Stored XSS,Reflected XSS, andDOM-based XSSvulnerabilities - Techniques to identify XSS vulnerabilities
- Performing
Defacingattacks to change the look of a website - Performing
Phishingattacks to steal the victim's login details and to perform a phishing simulation exercise - Performing
Session Hijackingattacks to obtain the victim's session cookie and use them to access their account - Front-end and Back-end steps to prevent XSS vulnerabilities and protect your web application against them
CREST CPSA/CRT-related Sections:
- All sections
CREST CCT APP-related Sections:
- All sections
CREST CCT INF-related Sections:
- All sections
This module is broken into sections with accompanying hands-on exercises to practice each of the tactics and techniques we cover. The module ends with a practical hands-on skills assessment to gauge your understanding of the various topic areas.
You can start and stop the module at any time and pick up where you left off. There is no time limit or "grading," but you must complete all of the exercises and the skills assessment to receive the maximum number of cubes and have this module marked as complete in any paths you have chosen.
As you work through the module, you will see example commands and command output for the various topics introduced. It is worth reproducing as many of these examples as possible to reinforce further the concepts presented in each section. You can do this in the PwnBox provided in the interactive sections or your virtual machine.
The module is classified as "Easy" and assumes a working knowledge of the Linux command line and an understanding of information security fundamentals. The module also assumes a basic understanding of web applications and web requests and will build on this understanding to teach how XSS vulnerabilities and attacks work.
In addition to the above, a firm grasp of the following modules can be considered as prerequisites for the successful completion of this module:
- Learning Process
- Web Requests
- Intro to Web Applications
Sections
10 sections - 7 Interactive
| # | Group | Type | Title |
|---|---|---|---|
| 1 | XSS Basics | theory | Intro to XSS |
| 2 | interactive | Stored XSS | |
| 3 | interactive | Reflected XSS | |
| 4 | interactive | DOM XSS | |
| 5 | interactive | XSS Discovery | |
| 6 | XSS Attacks | theory | Defacing |
| 7 | interactive | Phishing | |
| 8 | interactive | Session Hijacking | |
| 9 | XSS Prevention | theory | XSS Prevention |
| 10 | Skills Assessment | interactive | Skills Assessment |
Conclusion
Congratulations on finishing the Cross-Site Scripting (XSS) module!
Throughout this module, we learned the basics of XSS by identifying and exploiting XSS vulnerabilities. This should now add XSS exploitation to your Web App Pentesting skill set.
In addition to the three common types of XSS attacks we discussed, there are many other advanced attacks that utilize XSS vulnerabilities to carry out various malicious actions:
- Injecting Key Loggers to capture what the victim is typing
- Cross-Site Request Forgery (CSRF), to perform Web/API requests through the victim's session
- Bypassing XSS protections