[HITB CTF Singapore 2017] Web 434 – Website


No description

The login form!, we create an account and login to it, the challenge begin!

Obviously, we will click get flag, but it require us as admin. There is some clearly point for us to attack: “personal website”

So, we need to create a xss somewhere, and trick admin access to it.

After surfing, i see something good:

Change “getInfo” to some random random char, its printback, so how about a XSS payload?

So construct a redirect payload with cookie, send it to admin to steal his cookie solved the challenge? Nope!

The length is limit by 50 chars, we cant send it directly!


The idea is, create our php page which redirect whoever visit to the XSS page above!

i create index.php at /var/www/html/tsu/ like this

<?php header("Location:");

Send my host to admin: https://meepwn.team/tsu/

wait some sec, and got it! the PHPSESSID of admin, but… we need “username” cookie to make us admin. Unfortunately, the http only flag is on so we cant steal it.

The only way to get flag is, trick admin click get flag himself and send flag back to us. It means we have to got csrf token, and do an request to make it real.

I’m not practice deep much with XSS, so this stage will bother me. Luckily, i got a very good xss in action teammate @quynhnhu
and he did it well, here the script:


we got flag!

2 thoughts on “[HITB CTF Singapore 2017] Web 434 – Website

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s