> For the complete documentation index, see [llms.txt](https://unsbotch.gitbook.io/unsbotch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unsbotch.gitbook.io/unsbotch/my-writeups/asis-ctf-2025-quals.md).

# ASIS CTF 2025 Quals

**web - Under the Beamers (unintended solution)**

<figure><img src="/files/qUv6LUKT7UAnlY6MNqJF" alt=""><figcaption></figcaption></figure>

In description we can see hint(or not) about dom clobbering attack with XSS (admin bot url).

First thing what i do before look at source code is just to check website blindly

<figure><img src="/files/gWjFDY5z2F6DEp5aZZji" alt=""><figcaption></figcaption></figure>

We have a basic function is rendering our input, first of all we can check some html inputs like:

`<s>bro`

and look is it rendering our input?

<figure><img src="/files/JNs09TrhjKGjh8PuyHau" alt=""><figcaption></figcaption></figure>

Simple html tags are working, but is XSS will work?

<figure><img src="/files/BWG8mAkkBJpWnu3vdJ3Z" alt=""><figcaption></figcaption></figure>

And XSS is working too, first thoughts in my mind was "it is just simple XSS challenge now i should just send payload to admin and steal cookie"

<figure><img src="/files/tgbfX8JI2phVqoPU0T14" alt=""><figcaption></figcaption></figure>

But after visiting admin bot link:

<figure><img src="/files/Sb6MZqLOjbjnSb0upo1T" alt=""><figcaption></figcaption></figure>

I understood that there is no simple link input form for payload url, and started analyzing responce

First thing i did is just look at which url admin got from us

<figure><img src="/files/ymJeoaLtks7euwMher7J" alt=""><figcaption></figcaption></figure>

Then i looked at source code of bot:

<figure><img src="/files/c4TgRBhxiwk7atXDXLvU" alt=""><figcaption></figcaption></figure>

There is same parameter "url" which accept html code

<figure><img src="/files/JMpmZyjWAdz9TXb8Jbkh" alt=""><figcaption></figcaption></figure>

If we looked again at request we can see that parameter html has a "GET" value, we need to just input XSS payload instead of our GET request

<figure><img src="/files/YgRsEtVGFKzRImZBoxl9" alt=""><figcaption></figcaption></figure>

But yes, it will not work because of check on `!html` i spent some time for bypass restrictions, like as admin bot look at all headers, i also tried to paste payload at headers, until i realized we need to check only `?html` parameter, after i again looked at full code for finding sinks for DOM Clobbering attack, but didn't find anything.

After some times i noticed:

<figure><img src="/files/XlrSHyFzFekY27PKghvO" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/fFFBdqKCk8CY9ubrGO4d" alt=""><figcaption></figcaption></figure>

`Every console.log usage on the bot will be sent back to you :)`

`will be sent back you`  - this is what we need

<figure><img src="/files/cYEuCTfIDEvCUpJCSlrG" alt=""><figcaption></figcaption></figure>

Our request was reflected from admin:

<figure><img src="/files/eCuonz8QuyU8X0k0DMJD" alt=""><figcaption></figcaption></figure>

As it turned out by Mizu message it was unintended solution, so accoroding to task name description i guess in intendend solution we had to use clobber something and exploit bypass restrictions to do XSS in `?html` tag.

<figure><img src="/files/jM9UaBpJ6hUv1YrFZSz1" alt=""><figcaption></figcaption></figure>

**web - ScrapScrap 1**

At this chall we did a second blood

<figure><img src="/files/ze87TE6j9q8h60TEsDDn" alt=""><figcaption></figcaption></figure>

As always after reading description of task, we dive into testing web-site blindly

<figure><img src="/files/7D2rsmKlxEFkHyo3UTdF" alt=""><figcaption></figcaption></figure>

At the main page we have default register and login menu create account and log in

<figure><img src="/files/76Gs5JxIAU3KjUccH935" alt=""><figcaption></figcaption></figure>

After log in we redircted in `/checker` endpoint paste a random website we get responce:

`Your website can definitely be scrap, be careful...`

After some attempts to do SSRF like:

`file:///etc/passwd, http://127.0.0.1`  and SQLi in login and register forms, i decided to check source code

![](/files/XDcN9cwOr7oszcO3KQBZ)

A lot of files, but I immediately noticed an interesting one "scrap.ejs" because on the web-site we didnt see this endpoint, and the challenge is calling "ScrapScrap"

<figure><img src="/files/a3q9sSc9AVEUUbCyngVw" alt=""><figcaption></figcaption></figure>

So as you can see, in the code logic: if you visit endpoint `/scrap` and your username is not `superbot` you will get the flag

<figure><img src="/files/kAtpHpFJNodmEFZBmFws" alt=""><figcaption></figcaption></figure>
