Saturday, May 25, 2013

BSidesDenver CTF Stuff

Many thanks to the BSidesDenver crew and @DisK0nn3ct for the fun challenges. I worked on this with @drbearsec and @Essobi.

.:. DONG .:.


In this one you're given a pcap.  The pcap contains a chat conversation that amounts to this:

"Hello Alice, I'm glad you made it."
"Me too; I''m ready for the DONG"
"Ok, then I'll give it to you"
"Here you go: http:\/\/ctf.bsidesdenver.com\/images\/crypt.gif"
"Got it. Thats one weird looking DONG"
"Where is the key?"
"I thought I gave that to you?"
"Nope, just this DONG"
"ummhmm."
"ok, here... try this"
"http:\/\/ctf.bsidesdenver.com\/images\/key.gif"
"Perfect. Got it now... "
"gotta go"
"bye."

Download the two images (crypt.gif and key.gif) which just looked like scrambled bits to me...

Crypt.gif


Key.gif


@Essobi suggested using the tool 'diffimg' which overlays two images to show the differences / overlap.

Using diffimg shows the image below:


The key was 'MRTD0NGL3'

.:. OBSERV .:.


*Even though this challenge was broken, i feel like its worth mentioning as its a good one.*

You're given a PNG file.


If you look closely in the bottom right corner there is a string 'h4ckm3r1gh7m30w', this is not the key.

Looking at the image in a hex editor, i noticed a b64 string appended after the IEND chunk. This string when deobfuscated says 'openpuff'. 


You were supposed to open the png in openpuff and use the string 'h4ck...' to unhide the flag in the image. This however gave stream errors and made it impossible to get the flag AFAIK. 

I did however learn lots about Will Rogers.

 .:. CRYPTO 0x62(64) .:.


You were given a blob of text. Decode it 2x with base64 to get some binary. Convert the binary to ascii  to get a 32 char hexstring. This is the key.