Tuesday, October 2, 2012
CSAW CTF Quals: Forensics 500
This was possibly the easiest 500 points of the competition. Open the file in notepad. Copy and paste the readily apparent key... Smile and grin happily to yourself. Continue with your day.
CSAW CTF Quals: Trivia
Google. Learn how to use it...
Trivia - What is the first step of owning a target?
Answer
Trivia - What is the name of the Google's dynamic malware analysis tool for Android applications?
Answer
Trivia - What is the x86 opcode for and al, 0x24? Put your answer in the form 0xFFFF.
Answer
Trivia - Who was the first security researcher to publish the DEP bypass that utilized WriteProcessMemory()?
Answer
Trivia - What is the name of Microsoft's sophisticated distributed fuzzing system that utilizes automated debugging, taint analysis, model building, and constaint solving?
Answer
Trivia - What is the first step of owning a target?
Answer
Trivia - What is the name of the Google's dynamic malware analysis tool for Android applications?
Answer
Trivia - What is the x86 opcode for and al, 0x24? Put your answer in the form 0xFFFF.
Answer
Trivia - Who was the first security researcher to publish the DEP bypass that utilized WriteProcessMemory()?
Answer
Trivia - What is the name of Microsoft's sophisticated distributed fuzzing system that utilizes automated debugging, taint analysis, model building, and constaint solving?
Answer
CSAW CTF Quals: Recon All
Jordan Wiens (100):
Used Jordan Wiens’ twitter username (psifertex) and found psifertex.com. From here, we found the robots.txt which led us to the /csaw directory. Here, there was a riddle.
Some Understanding Becomes Dominant On Manipulation And Inquisitive Naming Don't bother brute forcing file paths, you'll never find it that way.However, Some Understanding Becomes Dominant On Manipulation And Inquisitive Naming clearly spells out SUBDOMAIN with its first letters. This led us to look for key.psifertex.com, which had the key spelled out in ASCII art.
Jeff Jarmoc (100):
We found this one pretty quickly. We downloaded all of the judges pictures and looked at the metadata in them. Jeff Jarmoc's had a finger url in it that when you went to it, spat back a key to you.
Julian Cohen (100):
We checked reddit posts for JulianCohen #HockeyInJune and found http://www.reddit.com/r/MURICA/comments/10a243/murica_free_donuts_and_beverages/.
We then checked all recent posts from this account and the most recent post was a link to http://cockcab.com/ which had the key.
Yoda (400):
Run whoami on yoda inside the IRC. Win!
Dan Guido (400):
This one took the longest. The steps were:
1. Search everything possible 2. Get bored/defeated 3. Browse /r/netsec 4. Casually search "Dan Guido" --> Find a comment thread about "salami and cheese". Win!
CSAW CTF Quals: Reversing 500
This one was a bit more of a headache. We start with an mrom and an mrom.tmp… Let’s start by running the file command:
We see that one of these is a BIOS ROM and the other is an ELF. Our team spent an enormous amount of time trying to reverse the ELF when we really should have just ignored it. It turns out that the elf is really just debugging symbols for what turns our to be an iPXE ROM. Next, let’s run strings to see if we can get more info on the files. We immediately noticed:
This shows that the .mrom is an iPXE rom.
After looking around their site for a while, we noticed a vmware installation guide that should let us play with the rom.
After trying to connect, we get an error that says we don’t have enough room. So, increase the oprom size (see above) to something larger (ex. 26214400) and restart. Now, the ROM is able to successfully connect to https://secure-doomsday-client-loader.c0.cx/boot/vmlinuz. Once it connects, it begins to download a kernel from https://secure-doomsday-client-loader.c0.cx/boot/initrd.gz?include_flag=0 and boots into it. Here, we found a flag.txt file. Yay! But sadly it’s a fake. Catting this flag shows something along the lines of “This is not the initrd you are looking for”... Hilarious aren’t they?
Looking at the download link, we see a very obvious include_flag=0. Most of the URI string was encrypted in the binary, but after some searching we were able to find:
Patch the g=0 to g=1, restart the vm, press ctrl-b, and let it download the flag-included kernel. Cat the flag.txt file in the root directory and win!
Hope you enjoyed the write-up!
-- d1r3w0lf
We see that one of these is a BIOS ROM and the other is an ELF. Our team spent an enormous amount of time trying to reverse the ELF when we really should have just ignored it. It turns out that the elf is really just debugging symbols for what turns our to be an iPXE ROM. Next, let’s run strings to see if we can get more info on the files. We immediately noticed:
This shows that the .mrom is an iPXE rom.
After looking around their site for a while, we noticed a vmware installation guide that should let us play with the rom.
*For more info, see here
To summarize the article, the site tells us that the 8086100f naming convention is for e1000-type network adapters. Blindly following the guide then leads us to create a blank vm and add the following lines to it:
ethernet0.virtualDev = “e1000” ethernet0.opromsize = 262144 e1000bios.filename = “[your path to]/8086100f.mrom”Now we can start the vm and press ctrl-b to enter iPXE.
After trying to connect, we get an error that says we don’t have enough room. So, increase the oprom size (see above) to something larger (ex. 26214400) and restart. Now, the ROM is able to successfully connect to https://secure-doomsday-client-loader.c0.cx/boot/vmlinuz. Once it connects, it begins to download a kernel from https://secure-doomsday-client-loader.c0.cx/boot/initrd.gz?include_flag=0 and boots into it. Here, we found a flag.txt file. Yay! But sadly it’s a fake. Catting this flag shows something along the lines of “This is not the initrd you are looking for”... Hilarious aren’t they?
Looking at the download link, we see a very obvious include_flag=0. Most of the URI string was encrypted in the binary, but after some searching we were able to find:
Patch the g=0 to g=1, restart the vm, press ctrl-b, and let it download the flag-included kernel. Cat the flag.txt file in the root directory and win!
Hope you enjoyed the write-up!
-- d1r3w0lf
CSAW CTF Quals: Forensics 200 - 2
After we completed Forensics200 - version 1, what needed to happen for version 2 was obvious. All the CRC’s must be wrong except one (the opposite of version 1). We had already found a tool that alerted on incorrect checksums, so we found a tool that only reported correct CRC's (PngMeta available here). The reported name was the correct key.
-- syreal
-- syreal
CSAW CTF Quals: Forensics 200 - 1
Quite a simple challenge.
When you put the version1 file into a program called tweakPNG, it gave you an error for the wrong checksum at a certain location. That checksum was for the name takeuchi gregory. Given the picture was a picture of words saying “one of these things is not like the other,” I assumed that the wrong checksum is what made that name different, and that that name was the key. It was.
-- syreal
When you put the version1 file into a program called tweakPNG, it gave you an error for the wrong checksum at a certain location. That checksum was for the name takeuchi gregory. Given the picture was a picture of words saying “one of these things is not like the other,” I assumed that the wrong checksum is what made that name different, and that that name was the key. It was.
-- syreal
CSAW CTF Quals: Reversing 400
Right from the start, we popped the ELF into a VM and decided to run it. Doing this, we see that it pops out with an encrypted key.
Assuming this is like reversing 100, we decided to pop it into IDA and see if we could spot a Decrypt function.
When you first open the ELF in IDA, it looks something like this:
Scrolling down, we see where it encrypts and kicks out. Directly after, there’s a decryption function that never gets touched…
Looks like another NOP patch to me…
Note: To get this menu to show up in IDA, edit idagui.cfg to include the line:
And viola:
-- d1r3w0lf
Assuming this is like reversing 100, we decided to pop it into IDA and see if we could spot a Decrypt function.
When you first open the ELF in IDA, it looks something like this:
Scrolling down, we see where it encrypts and kicks out. Directly after, there’s a decryption function that never gets touched…
Looks like another NOP patch to me…
Note: To get this menu to show up in IDA, edit idagui.cfg to include the line:
DISPLAY_PATCH_SUBMENU = YES
Patch over 4006BE with some nops and commit the changes.And viola:
-- d1r3w0lf
Subscribe to:
Posts (Atom)






