Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| modul:m183:learningunits:lu10:lu10b [2025/12/27 21:04] – dgaravaldi | modul:m183:learningunits:lu10:lu10b [2026/01/28 16:35] (aktuell) – dgaravaldi | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== LU10b - Reflected cross site scripting | + | ====== LU10b - Cross-Site Scripting |
| - | \\ | + | < |
| - | ==== What is a reflected XSS attack ==== | + | |
| - | Reflected XSS attacks, also known as non-persistent attacks, occur when a malicious | + | **Cross-site scripting (XSS)** is a very common type of web application attack vector in which malicious |
| - | The script is activated through a link, which sends a request to a website with a vulnerability that enables execution | + | A successful XSS attack can cause serious damage — including compromised user accounts, activation |
| - | To distribute the malicious link, a perpetrator typically embeds it into an email or third party website (e.g., in a comment section or in social media). The link is embedded inside an anchor text that provokes the user to click on it, which initiates the XSS request to an exploited website, reflecting the attack back to the user. | + | \\ |
| + | ==== Types of XSS Attacks ==== | ||
| - | {{:modul: | + | There are **two major types** of cross-site scripting attacks commonly discussed: |
| - | Unlike a stored attack, where the perpetrator must locate a website that allows for permanent injection of malicious scripts, reflected attacks only require that the malicious script | + | * **Stored XSS (Persistent)** – A malicious script |
| - | + | * **Reflected XSS (Non-Persistent)** – A malicious script is embedded in a URL or request, then reflected off the web server back to the user’s browser when the link is visited. | |
| - | As such, there are a number of key differences between reflected and stored XSS attacks, including: | + | |
| - | + | ||
| - | * Reflected attacks are more common. | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| \\ | \\ | ||
| - | ==== Reflected XSS attack example | + | ==== What is Stored Cross-Site Scripting |
| - | While visiting a forum site that requires users to log in to their account, a perpetrator executes this search query < | + | |
| - | The query produces an alert box saying: | ||
| - | < | + | To execute a **stored |
| - | <script type=' | + | |
| - | </ | + | |
| - | The page's URL reads < | + | **Example**: An attacker enters a comment containing JavaScript that steals session cookies. Every visitor who views the comment will run the malicious |
| - | This tells the perpetrator that the website is vulnerable. Next, he creates his own URL, | + | |
| - | which reads < | + | |
| - | link into a seemingly harmless email, which he sends to a group of forum users. | + | |
| - | While the sending address | + | \\ |
| + | ==== Stored XSS Attack — Step by Step ==== | ||
| + | {{: | ||
| + | |||
| + | - The attacker discovers a page with an input field that allows HTML. | ||
| + | - They insert malicious JavaScript code into that field. | ||
| + | - The application stores | ||
| + | - When other users visit the page, their browser | ||
| \\ | \\ | ||
| - | ==== Reflected | + | ==== How Stored |
| - | There are several effective methods for preventing and mitigating reflected | + | Stored |
| - | * Emails from unknown senders | + | * It can impact **all users** who view the infected page. |
| - | * A website’s comments section | + | * Attacker-controlled scripts can steal session credentials or redirect users to phishing sites. |
| - | * Social media feed of unknown users | + | * Malicious payloads can embed external JavaScript that reports user data back to the attacker. |
| \\ | \\ | ||
| ==== Related Topics ==== | ==== Related Topics ==== | ||
| - | [1]: https:// | + | [1]: https:// |
| + | |||
| + | [2]: https:// | ||
| + | |||
| + | ---- | ||
| + | [[https:// | ||