Skip to content

Commit 500d502

Browse files
committed
xss
1 parent 634e269 commit 500d502

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

fallctf-2024/src/web/web.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,22 @@ If you want more resources on learning the linux command line...
125125

126126
+ Review our [Setup/Terminal Meeting Slides](https://sigpwny.com/meetings/fa2023/2023-09-03/)
127127

128-
## Cross Site Scripting (XSS)
128+
## Cross-Site Scripting (XSS)
129129

130+
Cross-Site Scripting is a vulnerability that allows an attacker to execute malicious scripts on a website. This can be used to steal cookies, redirect users to malicious websites, or deface the website.
131+
132+
I like to think of XSS as as another type of injection attack, but instead of injecting into a database or command line, you're injecting into the website's HTML.
133+
134+
For example, let's say you have a website that displays a user's name on the page. If the website includes the input directly into the HTML, you can put your own HTML code in the input and have it execute on the page.
135+
136+
```html
137+
<p>Welcome, <span id="username">USER INPUT</span></p>
138+
```
139+
140+
If I had set `USER INPUT` to `<script>alert("Hello!")</script>`, then the website would display a popup saying "Hello!".
141+
142+
```html
143+
<p>Welcome, <span id="username"><script>alert("Hello!")</script></span></p>
144+
```
145+
146+
More details on XSS: https://portswigger.net/web-security/cross-site-scripting

0 commit comments

Comments
 (0)