Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| modul:m183:learningunits:lu10:lu10b [2025/12/27 19:30] – angelegt 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 | + | \\ |
| + | ==== Types of XSS Attacks ==== | ||
| + | |||
| + | There are **two major types** of cross-site scripting attacks commonly discussed: | ||
| + | |||
| + | * **Stored XSS (Persistent)** – A malicious | ||
| + | * **Reflected XSS (Non-Persistent)** – A malicious script is embedded | ||
| \\ | \\ | ||
| - | ==== Reflected XSS attack example | + | ==== What is Stored Cross-Site Scripting |
| - | 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 be embedded into a link. That being said, in order for the attack to be successful, the user needs to click on the infected link. | ||
| - | As such, there are a number of key differences between reflected and stored XSS attacks, including: | + | To execute |
| - | | + | **Example**: An attacker enters |
| - | | + | |
| - | | + | |
| - | | + | |
| \\ | \\ | ||
| - | ==== Reflected | + | ==== Stored |
| - | While visiting a forum site that requires users to log in to their account, a perpetrator executes this search query < | + | {{:modul: |
| - | The query produces | + | - The attacker discovers a page with an input field that allows HTML. |
| + | - They insert malicious JavaScript code into that field. | ||
| + | - The application stores and later serves that code as part of normal content. | ||
| + | - When other users visit the page, their browser executes the attack script. | ||
| - | < | + | \\ |
| - | <script type=' | + | ==== How Stored |
| - | </code> | + | Stored XSS is especially dangerous because: |
| + | |||
| + | * It can impact **all users** who view the infected page. | ||
| + | * Attacker-controlled scripts can steal session credentials or redirect users to phishing sites. | ||
| + | * Malicious payloads can embed external JavaScript that reports user data back to the attacker. | ||
| + | |||
| + | \\ | ||
| + | ==== Related Topics ==== | ||
| + | [1]: https:// | ||
| - | The page's URL reads < | + | [2]: https://developer.mozilla.org/docs/Web/Security/Attacks/XSS?utm_source=chatgpt.com Cross-site scripting (XSS) - Security | MDN |
| - | 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 and subject line may appear suspect to some, it does not mean that it won’t be clicked on. | + | ---- |
| - | In fact, even if only one in every 1,000 recipients of the email click on the link, that still amounts to several dozen infected forum users. They will be taken to the forum’s website, where the malicious script will be reflected back to their browser, enabling the perpetrator to steal their session cookies and hijack their forum accounts. | + | [[https:// |