2012/05/24

CTF write-ups


I hope you'll enjoy the write-ups as much as I've enjoyed solving the challenges.

Crypto 1
Points: 25
Instructions: I read about this once... -- Submit in all lowercase no spaces
Category: Crypto/Stego
File: f3d0c9e33f9479a5109445d6c00f12559ea21e75

Solution:

$ file ./f3d0c9e33f9479a5109445d6c00f12559ea21e75.txt
./f3d0c9e33f9479a5109445d6c00f12559ea21e75.txt: gzip compressed data, from Unix, last modified: Fri Mar 23 13:06:29 2012

$ cat ./f3d0c9e33f9479a5109445d6c00f12559ea21e75.txt | tar -tzvf -
-rw-r--r-- jdm/jdm          76 2012-03-23 13:04 86d13ae80f15bda5818552afb669f86bb02af9a0

$ cat ./f3d0c9e33f9479a5109445d6c00f12559ea21e75.txt | tar -zxvf -

$ cat 86d13ae80f15bda5818552afb669f86bb02af9a0
DOHA JPWOLY'Z HSALYUHAL UHTL OPKLZ AOL MHJA AOHA PA PUCVSCLZ WSHFPUN JHYKZ?

Running it through Caesar cipher with offset of 7 it turns it into the following question:
WHAT CIPHER'S ALTERNATE NAME HIDES THE FACT THAT IT INVOLVES PLAYING CARDS?

Quick googling session reveals the answer.

Flag: pontifex

Crypto 2
Points: 75
Instructions: We got the password hashes from a system but don't know what to do with them. -- Crack the passwords and concatenate them alphabetically for the key. Submit in all uppercase, no spaces.
Category: Crypto/Stego
File: 2d2cda7a3f0b8f0b292c646f94bf9836073e94db

Solution:

$ file ./2d2cda7a3f0b8f0b292c646f94bf9836073e94db.txt
./2d2cda7a3f0b8f0b292c646f94bf9836073e94db.txt: gzip compressed data, from Unix, last modified: Sat May  5 17:07:27 2012

$ cat 2d2cda7a3f0b8f0b292c646f94bf9836073e94db.txt | tar -zxvf -
10896c1cb3d61b1c2d65690dc7c0d05e

$ file 10896c1cb3d61b1c2d65690dc7c0d05e
10896c1cb3d61b1c2d65690dc7c0d05e: ASCII text


$ cat 10896c1cb3d61b1c2d65690dc7c0d05e
Derp McDerp:1005:E94FB3E8775E0FE98B0EA5A7DF135B03:8EECDD4B8B43677BB162A15DBCB2C231:::
TehSuperUser:1006:AA1AB12D9BE8C0D126F8092A33DAAF05:76D202B312C8523D37FCDB4CD8288242:::
AnotherUser:1007:6F87CD328120CC55FF17365FAF1FFE89:B3EC3E03E2A202CBD54FD104B8504FEF:::
rockstar:1008:59FA69C37A475354FF7447F7A53FE0E0:2EAAE8097EDA4BE66FABB52A3EFDDB8E:::

Using invaluable http://www.objectif-securite.ch/en/products.php we can crack the lm hashes in seconds:

Hash: E94FB3E8775E0FE98B0EA5A7DF135B03
Password: DERPDERP
Hash: AA1AB12D9BE8C0D126F8092A33DAAF05
Password: SUPERPASS
Hash: 6F87CD328120CC55FF17365FAF1FFE89
Password: ABCD1234
Hash: 59FA69C37A475354FF7447F7A53FE0E0
Password: ZERGSTORM45

Flag: ABCD1234DERPDERPSUPERPASSZERGSTORM45


Crypto 3
Points: 175
Instructions: Crack the cipher, get the key ------------ The key to the cipher is the answer. Submit the key in all lower case, no spaces
Category: Crypto/Stego
File: 17ca6426ac08cef3641a5695667c921af89edb82

Solution:
$ file ./17ca6426ac08cef3641a5695667c921af89edb82./17ca6426ac08cef3641a5695667c921af89edb82: BinHex binary text, version 4.0

$ cat 17ca6426ac08cef3641a5695667c921af89edb82 | hexbin -l
This file is in "hqx" format.
name="809f9232ac55c50317c93753b6099a1d", type=    , author=    , 1 excess bytes ignored
data=2442, rsrc=0

$ hexbin -s 17ca6426ac08cef3641a5695667c921af89edb82 -u

$ cat 809f9232ac55c50317c93753b6099a1d.text | xxd -r -p
knviuatuwfrztrrcideixrgakbwalvisginwrpxppvvqqciojzlmphyqioeeipkmpoihwkepqfnctomjmlhwymglixgtzjwvhaestrfvaaihpmiccevqcnazbudjtmfbieczhlqatuedmjdwtixueedusiuwjuhfnguekvhzyudfypaaeyslbvqkcpjtqznhqstmhaswpnlvhqclkcatdwrqclwkprvtkvtzwgljefkatjxvlfspkbpneznfitqvtuxziyjvqeioyedfcxjmsvqvwswlgbtzwzeslwjxdvpzkrwlgzdvjffitwowjalttrdzglehmelfdwngpkqzbglrizdvxceudxjiidlzxchhczdbruhjdxqvvbiycajvandyxyeulwvmdmfccrwshmtkxyedccubpsjfzrvxuwuomjezpwhwglwkagkevxglwjeelkcqczxkprjvgmcksdeqciuatkeeljhvgpxuhvrfoeplhwvviqjvqexukuoxyjktaprxbuhypqklvjepqxclddrzvgrxjmlhmkiorlcxalwjaheytjhvjkhfnmvgioekenvxjmbpruogeiuaxlvraussqthheedipacaglqvuohvkvvhrrndtipbhasignnmpoesetiorgqqczseipkiuaqveidezydtxukkprdqqccaekebnluyjhvvmksspmcamrlelvmvtzwwmyompngvqvvfccuqslejxuhvgwuzmegjykdtpjogzrvwwztvrkhfpbvmckiukebwviauiivfdshbwlyeqihvumdmhrtbsijisuirzybfgkdtirnehlgvwlaraarxjqcngfmqciuatkekbuhlgigaswamwxjiikeisgkitmrhqvaqzmpbloiimgkifigrgfumofgvdtsimnqhuwblxyiorxqztalvshdrixgvkiandtwzilhwzbpxczcpwyeenpqcsjejmffsparpslsopwulxcmumqommmqleuspqqgzrbvpiefmpopismebyiplalwjjrdgjbwlgflpcshbwlhrzxvmndtygcovowjqhcmjqbqacahwlvrjnenihalfctkeuqcnpvrfempiaprvlgkikvclvjusqeemdmextbeivppagfnulmpmshpcbulriaxmeclusmpohjsltqeiewjuxvd

Plugging that into http://smurfoncrack.com/pygenere/pygenere.php and expanding the length of codewords to try to 20 yelds just slightly misspelled answer"INDECIPHERLBLECIPHER"

With the proper key it decodes to:
casessensoryinputwarpedwiththeirvelocityhismouthfilledwithanachingtasteofbluehiseyeswereeggsofunstablecrystalvibratingwithafrequencywhosenamewasrainandthesoundoftrainssuddenlysproutingahummingforestofhairfineglassspinesthespinessplitbisectedsplitagainexponentialgrowthunderthedomeofthetessierashpoolicetheroofofhismouthcleavedpainlesslyadmittingrootletsthatwhippedaroundhistonguehungryforthetasteofbluetofeedthecrystalforestsofhiseyesforeststhatpressedagainstthegreendomepressedandwerehinderedandspreadgrowingdownfillingtheuniverseoftadownintothewaitinghaplesssuburbsofthecitythatwasthemindoftessierashpoolsaandhewasrememberinganancientstoryakingplacingcoinsonachessboarddoublingtheamountateachsquareexponentialdarknessfellinfromeverysideasphereofsingingblackpressureontheextendedcrystalnervesoftheuniverseofdatahehadnearlybecomeandwhenhewasnothingcompressedattheheartofallthatdarktherecameapointwherethedarkcouldbenomoreandsomethingtorethekuangprogramspurtedfromtarnishedcloudcasesconsciousnessdividedlikebeadsofmercuryarcingaboveanendlessbeachthecolorofthedarksilvercloudshisvisionwassphericalasthoughasingleretinalinedtheinnersurfaceofaglobethatcontainedallthingsifallthingscouldbecounted

Flag: indecipherablecipher

Crypto 4
Points: 300
Instructions: Decrypt for the key ---------------------------- answer format is strupr(full unencrypted string)
Category: Crypto/Stego
File: 13930c973e7169c84c9c88211cbc5e54f32153cb

Solution:
A TIFF file presents the following ciphertext: RUCIQPQMMRNZEVONDT
running foremost against it reveals an jpg image with the following enigma key:
B,I,IV,III,14,18,20,AH,CK

One can decode using the enigma machinesimulator: http://startpad.googlecode.com/hg/labs/js/enigma/enigma-sim.html , then
after plugging the ciphertext into the enigma machine with the following settings:

Rotors: I-IV-III
Rotor Start: AAA
Rings: NRT
Plugboard: AH CK

the key is revealed.

Flag: THEKEYISALANTURING


Forensics 1
Points: 50
Instructions: Eye Heart FS! -- Submit they key as instructed
Category: Forensics
File: dc7f2a9830f5e8dad51c6f6dbc6edc8b3a7bc22f

hints.txt is inside the provided tar.gz file, after untaring/gunzipping it lists the following clue:

Answer these three questions and concatenate the answers for the key.
How large (in bytes) would a DOS3.3 "nibbled" image be?
What is the minimum journal size (in blocks) for a reiserfs disk?
What partition type (in hex) would a FAT16B partition have?

Quick google search for these items reveals that the mac specific DOS3.3 image was 232960 in length, ReiserFS' minimum journal size is 513 blocks. Finally, the hex code for Big FAT16 is 0x06

Flag: 2329605130x06

Forensics 2
Points: 99
Instructions: Ugh -- this is exactly why interns shouldn't do forensics. What a newb. -- Submit the key as found.
Category: Forensics
File: 94996036b13962bf8baaa324d998ed9476f620e3

$ file 94996036b13962bf8baaa324d998ed9476f620e3 
94996036b13962bf8baaa324d998ed9476f620e3: bzip2 compressed data, block size = 900k

$ cat 94996036b13962bf8baaa324d998ed9476f620e3 | tar xjvf -
dd_rtfm

$ file dd_rtfm 
dd_rtfm: data

When revieved through the "hexdump -C" or "strings" you can clearly see that the strings don't read quite right, it seems that the endianness is flipped.

to reverse that and get the key in a single liner we can do:

$ dd if=dd_rtfm conv=swab | strings | grep n00b

Flag: Silly n00b -- arguments are for l337!

Forensics 3
Points: 200
Instructions: You know that guy? The one who always hides his screen when you walk by? You're never quite sure what he's up to? Yeah -- you know him. Well we need to know what he's up to. We're moving his desk to the basement, and you remember what happened last time... We managed to get a memory dump and a file we think he was working with from his system, but we don't know what to do with it. -- Submit the key in ALL CAPS
Category: Forensics
File: 5748b64df3c691d1766e793e8dcf23b05383899d

Packet 1
Points: 25
Instructions: Who would cross the Bridge of Death must answer me these questions three, ere the other side he see. What should the Checksum always be for IPXWAN___ How many reserved bits in the TCP header, and what must it always be___ The code for a Point to Point Protocol Discard Request --------------------- Find the answer to these three questions, concat them for the first half of the answer, append with the color it creates (answers123Color)
Category: Packet
File: (none)
Flag: FF6011Orange

Packet 2
Points: 150
Instructions: What an odd way to send a secret message... ------------------------ answer format is md5(key including all spaces)
Category: Packet
File: 1c1d8c9c1f7cb39c6eb16efea9c0542447c2934d

Binhex decodes a pcap file, following the udp session reveals a sound file that transcribes into:
4d 61 63 68 30 4d 34 6e 20 73 41 89 35 20 3030 6f 48 20 59 33 61 68
which in ascii is: "Mach0M4n sAy5 00oH Y3ah"
The flag is md5 of that string (sans quotes).

Flag: c37947e01c8b338081e76a62ca5da88b

Potpourri 1
Points: 75
Instructions: LRN2 READ! -- Submit in all uppercase no spaces.
Category: Potpourri
File: b002d66a78882969f9d8eee555582509f01df944

Binhex decodes a zip file with an image of message written in Braile, which decodes into a question along the lines of  (the decode might be not exact):
"On November 2 1988 what worm was unleashed?"

Flag: MORRISWORM

Potpourri 2
Points: 125
Instructions: The PDF spec is so error tolerant, even the monkey from the infinite monkey theorem couldn't reproduce it! -- Submit the key as found
Category: Potpourri
File: cc7931560f8fc6d8df26f058afc6b8b03e31ae60

After decompressing a pdf with hamlet is revealed. One could search for the original pdf and diff it. The result of diff would indicate an object 368 being added. I've used my custom version of pdf-parser to dump the media files for me. Object 368 is an jpg image containing the key.

Flag: Z0MG you found 4n0th3r k3y!1!one1

Potpourri 3


Plugging the following into the sudoku solver


.7....69.35.7.........41..5....9.7..6..2..9.8.2.4..........4..7..91...2.5....7.8.

into http://www.sudokuwiki.org/sudoku.htm and clicking on "Solution Count" button gives the flag.

Flag: 471852693358769214296341875813596742647213958925478361162984537789135426534627189

Reversing 1
Points: 25
Instructions: Do you believe in magic? What tasty hex number was originally used to mark newly allocated (freed) memory prior to initialization? -- Submit the key as hex, all uppercase (so 0x[UPPERCASE])
Category: Reversing
File: (none)

Flag: 0xDEADBEEF

Reversing 3
Points: 175
Instructions: Blast from the not-so-distant past... in more ways than one. -- Submit the key as found
Category: Reversing
File: ad32c019ae35816ce196db2042d572e41875cd44

Another pdf challenge, the pdf is wrapped in a C64 disk image among other things. The pdf contains a javascript, which won't run unless it detects AdobeReader version 5, and then it pops up a question for the code. It turns out that there is a common multiplier to the algorithm used, once one extracts the code and runs it in a debugger or modifies the pdf. It's pretty easy to derive the multiplier by plugging 1, then 10. The result has to be rounded up with no decimal places. 

Flag: 996638400


No comments:

Post a Comment