old-13 -- SQLi (Heavy Filters, No Table Name or No Column Name)

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

old-13-1.png

After some experimenting with first form I found that it was highly restricted, like no spaces characters, most of keywords and logical operators were blocked, but IF worked. Also it only returns 1 if input is 1 and 0 on anything else.

old-13.png

This took so much function time.... First of all the column of flag wasn't known meaning it wasn't in table or we had to guess it... Since WHERE was blocked this became much harder. After going through many payloads on PayloadsAllTheThingsarrow-up-right I found this somewhat neat payload.

Brute the tables... and btw no quotes were allows along with hex strings, but binary strings worked so that's good. One more thing about STRCMP function, the results are kinda reversed... Not exactly sure how to describe it, better to play around in MySQL.

Now to get columns from the table. Essentially the query get's all tables that match the found table, concatenates, joins the output in single string, replaces empty matches and starts bruteforcing.

Brute the flag:

Note: If you're wondering why Im not using params in the get request it's because for some reason the webapp didn't like urlencoded params?..

Last updated