Showing posts with label CodeGate CTF 2011. Show all posts
Showing posts with label CodeGate CTF 2011. Show all posts

Wednesday, May 29, 2013

CodeGate CTF 2011 : Binary - 100 Points

CodeGate CTF 2011 : Binary - 100 Points

File given to us:
This is the original file:
87C483A4CA85374E98FFB85FD5E867EC.zip

Recommended Tools:
Google
Luck+memory
Windows Script Decoder (http://www.virtualconspiracy.com/index.php?page=scrdec/intro) - Decode encoded stuff by Microsoft Script Encoder
FireBug (http://getfirebug.com/)
TriD (http://mark0.net/soft-trid-e.html)

Analysing the File:
Using file and TriD and i cannot correctly identify what is this file. Then i opened up in Notepad++ and i find it familiar.
Thank goodness i'm a fan of Yosuke Hasegawa and i saw that this file bears resemblance to his jjencode (http://utf-8.jp/public/jjencode.html)

Ok, now i may be on the right track that this file may be encoded with jjencode...so how do i decode this? :(
I started googling for a decoder and i found this website (http://www.e-x-e.dk/2011/07/28/jjencode-decoder-jjdecode/).
But sadly it couldn't work for this. :(

Solving the Puzzle:
Finally, after several hours. i found this, Microsoft Script Encoder (http://www.microsoft.com/download/en/details.aspx?id=3375).
Could it be using this? So instantly i googled for the decoder for this and i found this useful tool, Windows Script Decoder (http://www.virtualconspiracy.com/index.php?page=scrdec/intro).
So i downloaded and tried it and i got back some Obfuscated looking Javascript like this.



Immediately, i placed the Obfuscated Javascript into a html file and start using Firebug to debug it.
Finally, i got the following key CodeGate_JavaScriptEncode_Key with value "120a151156120a163t111163120lea163u162e!" in the DOM tab. :P




cheers
0x4a61636f62

CodeGate Qualifiers CTF 2011 : Network - 100 Points

CodeGate Qualifiers CTF 2011 : Network - 100 Points

Hints given to us:
I didn't write down the exact hints for this but i remember vividly that the answer will be in the form of MD5 hash of a file.

This is the original file:
File:117A1160EC201EB79D2331A3E3C2979D.zip

Recommended Tools:
Linux's "file" & "md5sum" commands
Wireshark (http://www.wireshark.org/) - For sniffing and analysing traffic.

Identifying the File:
Using Linux's file command, we have identified this file as a pcap file. That makes sense since it is in the Network category. :P
Ok, now let's fire up our Wireshark and take a look at the pcapfile.
Since we are given a clue of finding the MD5 hash of a file.
Let's check out all the files in this given pcap file.

First we click File -> Export -> Objects -> HTTP



Geez....a lot of files in there. Finally, we notice there is a H1A1.exe file
Let's click on that and "SaveAs".

Final Solution:
Now let's use "md5sum" on the exported file and the returned results is "7A5807A5144369965223903CB643C60E"
So i tried that as the key and it worked. :D

cheers
0x4a61636f62

CodeGate Qualifiers CTF 2011 : Crypto - 200 Points

CodeGate Qualifiers CTF 2011 : Crypto - 200 Points

Hints given to us:
Find a key.
SCMPKBOUPDPHYTIAVIVRBTMVORUDNBDFNETDOIVTXROUNDKOBFWBPVOEQLTGKKARACYCGDNAECBXIZIKPTLEERZTYCYKIVXCPKPTPOVCAQRHRVKJUWMTWCMSXKADYHRVNAHCBRVSVSSCQCZQYDJXGSNRVSWCESTTBHIFCIASXRTAHKRRTUMVOKWITZPFZDISXZVVLGETPPLKSELDPGKELSHCBJBWXBIFCPEZYNBWXCDYMGAOVWNDKAKKKWBBQKPTIODKMGGHRVVNHINFCQESDYMLACVVBWBBQROPBBDFOXOSKDIGZWXFNTKFYIICWHRVVNHIYILTKHRVXPISB

This is the original file:
File:CodeGate_2011_Crypto_200.txt

Recommended Tools:
Brains - Actually, more of guesswork.
pygenere (http://smurfoncrack.com/pygenere/pygenere.php) - For cracking ciphertext using Vigenere cipher.

Finding the "Cipher" behind the Puzzle:
Looking at the given ciphertext, it seems to strongly suggest that it could be a polyalphabetic cipher.
This time round, i made use of www.simonsingh.net again to check which cipher it could be using.

Finally, i tried Vigenere cipher using the following link.
http://www.simonsingh.net/The_Black_Chamber/vigenere_cracking_tool.html

The returned results is as followed:


It seems to suggest that if the ciphertext is indeed using Vigenere cipher, the possible key length is 2,3 or 6.
Final Solution:
So using pygenere (http://smurfoncrack.com/pygenere/pygenere.php), i've tried entering explicitly 2 followed by 3 and 6 as the keylength.
Only keylength, 6, give me back sensible english words like the following picture.



On top of the page is the returned keyword that pygenere returned to me. So i've tried that as the key and Bingo.


Using "KRIPTO", we solve this challenge. :D

cheers
0x4a61636f62

CodeGate CTF 2011 : Crypto - 100 Points

CodeGate CTF 2011 : Crypto - 100 Points


File given to us:
This is the original file:



Recommended Tools:
Brains


Solving the Puzzle:
First, i took a look at the image and all i can see is numbers. o.O"

After looking at the image for an hour or so, then i realised something is strange as it didn't contain "0" and "1".

I just couldn't figure it out until my phone rang and i saw the "abc" on the keys.

Hmmm...could it be using that to change the numbers to actual letters?

So i took out my old handphone and type in numbers via a SMS and i got back this text.

In cryptography, a substitution cipher is a method of encryption by which units of plain text are replaced with cipher text according to a regular system.
The units may be single letters, pairs of letters, triplets of letters, mixtures of the above.
This cipher text is encrypted by telephone key pad, so we call this keypad cipher.

Correct Key:
So i type in keypad cipher and we added another 100points.

cheers
0x4a61636f62