BX02 - 100pts
Briefing
Access the network service at url:
cfta-bx02.allyourbases.co
port:8013
and find a way to get the flag.
Solution
It doesn't matter what input we give the service. It always tells us
DEBUG: Input length too large
. So, the first step is to see if we can find an input that is not too large. I wrote a Python script.py to try every printable ascii character.The script.py finds that
#
is the only printable ASCII character that is considered short enough.I tried sending a lot of
#
s by runningpython -c "print('#'*4000)" | nc cfta-bx02.allyourbases.co 8013
and got this errorERROR: Expected userID Variable of 1.
.Maybe this service is vulnerable to a buffer overflow. Let's try to find an offset using a script similar to the one used for BX01. The next stage of script.py does this. It keeps sending more and more
#
s until the messageERROR: Expected userID Variable of 1
is shown. The offset is found to be2005
.A buffer overflow is successful. The final payload is:
python -c "print('#'*2005+'1'*30)" | nc cfta-bx02.allyourbases.co 8013
. The 301
s is arbitrary. I tried one1
and nothing changed so I tried 30 and it worked.
Flag
ThIsOneIsAbITFuZZy-6y
Last updated