old-05 -- JavaScript (RE + Null Byte Bypass)

URL: https://webhacking.kr/challenge/web-05/arrow-up-right

old-05.png

We are given 2 options Login and Join. We certainly can't login, so we have to join. Unlucky for us Javascript blocks us from Join. If we inspect login we are redirected to https://webhacking.kr/challenge/web-05/mem/login.phparrow-up-right and lucky for us if we visit /join.php we get a page.

Going to https://webhacking.kr/challenge/web-05/mem/join.phparrow-up-right we get alert(bye).

View Source:

I used VSCode to rename variables, F2 does global replace for variable names which is pretty neat!

Note: Alternatively you could have ran the variables in Javascript Console and got values that way.

First we need to set oldzombie cookie and we need to send mode=1 in params

old-05-1.png

I registered with x:y and on login got

We have to register with admin username, but it already exists... I tried padding with spaces, but that was also not working.

Injecting null byte allows us to bypass certain filter and login as admin:

Note: admin+space+null_byte also worked

Last updated