wargames reverseme

Defcon 16 was a lot of fun.  There were a lot of fun challenges, but my favorite was probably the wargames revereme in open capture the flag.

You can download the binary here.  Be careful, it can erase you hd.

It is an elf binary, and it runs fine on Linux.  I ran in a (snapshotted) vm to hopefully mitigate some of the nasty things it could do – which luckily it did. It is packed with upx, which i found with strings, so first thing i unpacked it with upx-ucl.  From there, I backtraced it with IDA and found the correct path for the key (which is thermonuclear war -> US -> St. Petersberg run as root).  It then prints out the key before erasing your hd (more specifically your boot sector), so I put a breakpoint at the end to stop this from happening.

Anyway, this is a fun challenge.  good luck!

python anagram finder

This is a silly little program that finds anagrams. Just hangin out practicing python-fu, and this was a challenge I found online.

#!/usr/bin/env python

"""
This is a word descrambler for each word in wordlist.

This may be terribly inefficient, but I only have 10 words
to unscramble, so it's fine

plus it only takes about .1 second per word on my am2 3000
"""

import sys

file = open("./wordlist")
dictionary = []
dictfile = open("/usr/share/dict/words")
for i in dictfile:
  i = i.strip()
  dictionary.append(i)

for scramword in file:
  scramword = scramword.strip()  
  numletters = len(scramword)
  for word in dictionary:
    #first check that lengths are =
    if len(word) == numletters:
      isword = True
      for letter in word:
        if letter not in scramword:
          isword = False
          break
      #by this time most words are gone but there
      #may still be some superfluous guys
      for letter in scramword:
        if letter not in word:
          isword = False
          break   
      if isword:
        print word
Follow

Get every new post delivered to your Inbox.