BruCON 2023 CTF Web and DNS challenges
This is a write-up for BruCON CTF Web and DNS challenges
Web: Baby LFI
The description says: “Local File Inclusions are so cool! Can you get the flag at /flag.txt?” and leads to a web page which shows this piece of PHP code:
|
|
I tried http://URL/?file=flag.txt which returned several interesting warning messages.
|
|
They tell me that the file flag.txt
is not found in the same directory as index.php
. Actually, the description said to try /flag.txt
, so that’s what I tried http://URL/?flag=/flag.txt and got the flag FLAG={Th4tW4s34444sy!}
. Yes, that was easy indeed.
Web: Beginner LFI
Very similar to Baby LFI, this one says “That last one was a bit too easy. Let’s see if you can get past my filters! Can you get the flag at /flag.txt?”
I probably did not understand what additional security there was, because the same request, http://URL/?flag=/flag.txt flagged: FLAG={R3curs1v3Ch3cksAr3N33ded!}
DNS: Do Not Search 1
This DNS challenge says: “Do Not Search for the answer in brucon-ctf1.be.”.
I immediately thought something would be hidden in a DNS answer. I tried dig brucon-ctf1.be
which did not provide any useful information.
I searched for “dns CTF” and found this interesting writeup. I tried the txt
command and it revealed the flag:
|
|
The flag is TORFLAG:602C0CC369C134E25861F335EC1F290E
. The flag format wasn’t fixed in this CTF.
DNS: Do Not Search 3
Same, but you need to search for brucon-ctf3.be
. Actually the same solution worked again: dig brucon-ctf3.be txt
and revealed the flag: TORFLAG.ECCBC87E4B5CE2FE28308FD9F2A7BAF3
(without trailing dot at the end).
|
|
DNS: Do Not Search 2
Find information on brucon-ctf2.be
, but this time txt
did not provide the flag. This information was in the TXT record:
|
|
As this was about spam and mail MX record, I tried the MX record:
|
|
The flag did not have the trailing dot: TORFLAG.BC3C1A70072998AFA42892CF9F880DB4
.