CodefestCTF 2019

CodefestCTF is a annual online CTF event hosted by IIT BHU. All the challenges were ok. My team NULLKrypt3rs finishes at 14th.

Here are the writeups of some challenges i solved during the event.

What language is this?
Gibberish file
Image Corruption
Mail capture
Weird encoding

What language is this?

We have given a file decode this which contain strings consists of 4 char(i,d,o,s). I realize this is a esoteric language. After a bit of searching, i found that this is deadfish esoteric language. I used deadfish interpreters from TryItOnline(A online interpreters to run almost all esoteric language) to run the program and got a string of decimal number. After decoding it further gift the flag for this challenge.

 Flag:CodefestCTF{Welc0me_t0_C0defest19} 

Gibberish file

In this challenge a file output.txt is given, which contain the reversed of the original file means first the content of the orinigal file is reversed and then each byte of file is reversed. I write a simple python script to reverse the bytes of given file to obtain original file which contain flag for this challenge.

 Flag:CodefestCTF{LiTErAL_REVERSinG} 

Image Corruption

A image file image.bmp is given in this challenge. I try to open the image file but it seems like corrupted image. I open the fil in hexeditor to check header of the image and found that header broken, i change the header to correct header of bmp but still i can’t able to open it. Also image contains bunches of matrix strings. After a bit of thinking i observe that by xoring header with string matrix i got the correct header of bmp, this means original image is xored with key matix. So, we have to xor the whole image with key matrix to obtain the original image. I write a python script to xor the whole file with key matrix, dumping the xor result gives us a bmp image file which contain flag for this challenge.

 Flag:CodefestCTF{f1l35_h4v3_m461c_by735} 

Mail Capture

A file encoded_file is given in this challenge, content of the file looks like a cipher string. I do file command to check the file type and found that contents of the file is uuencoded or xxencoded. I used online tool to decode the cipher and got flag for this challenge.

 Flag:CodefestCTF{7h15_15_4_c001_3nc0d1n9} 

Weird encoding

We have given a file encoded_img. Initially i don’t know what the heck file is containing. I observe that x and + is comman and may be x separates coordinates and + to separate next line. I immediately convert it to coordinates and plot it on graph but i can’t get anything special from result. The challenge description says that encoding is supposed to represent the image, so i was thinking how to convert it to a image and after a bit of discussion with my friend, i write a python script which replace 0x with a space and 1x with a 1 gift the flag for this challenge. My solution may be unintended.

 Flag:CodefestCTF{This_15_7h3_f14g}