Tuesday, June 4, 2013

Sophos Puzzle 2013

So one of my friends sent me a link to the Sophos puzzle which was a cryptogram to be solved. The rules are below or you can go here:
 So you can solve this year's AusSHIRT #sophospuzzle straight from the shirt, using nothing but pencil, paper and intellect. Of course, you can still throw some home-hacked scripts at the problem if you want: a little bit of brute force goes a long way, and you can leave your scripts running while you attend the conference parties.

How to get started

The puzzle is a cryptogram, which means that the letters on the cube have been scrambled using an encryption algorithm.

Encryption algorithms usually rely on a mixture of substitution, where one letter is changed into another, though not necessarily always into the same one, and transposition, where two letters are switched around, like an anagram.

The easy part in this puzzle is that the substitution always replaces each decrypted letter with the same encrypted letter.

And the letters in the answer appear in the same left-to-right, top-to-bottom order that they do on the cube.

The only transposition you need to worry about is to put the three faces in the right order, so there are only six possible combinations to worry about.

Usually, a straight letter-for-letter substitution is called a Caesar cipher.

The cipher gets its name because it was considered state-of-the-art back in 55BC, when J. Caesar first invaded Britain. He just shifted every letter two places along in the alphabet, writing C for A, D for B and so on. At the end, he wrapped round, so Y became A and Z turned into B.

Caesar ciphers are easy to solve because of repeated letters: the encrypted text shows the same bias (e.g. in English, that ETAOIN are more common than JKXQZ) as normal text.

So we've made this slightly harder than that, as follows:

Letters appearing more than once in the puzzle are all shifted by the same fixed amount (obviously, the shift is somewhere from 1 to 25). Each letter that appears just once in the puzzle is shifted by a different amount, with one letter shifted by 9, another by 8, and so on down to a shift of 1. By the way, the Sophos Shield icons are just for decoration - they don't count as letters in the puzzle.

How to get hints

Follow @Sophos_ANZ on Twitter, and keep your eye on the hashtag #sophospuzzle.

Oh, and bear in mind that a dictionary attack probably wouldn't hurt, so you might like to start out by trying to guess at text that is likely to appear in the solution.


I solved it by first brute forcing the key space of 26 to find out what key shift the multiple letters were using. After finding that out I pen and papered it to find out the solution. I decided to script the ability to give every possible combination for the single letters which then could be sifted through to find the correct solution. Both the solution and code can be found after the jump or you can go here to read the nakedsec solution.

Tuesday, November 13, 2012

SSID Switcher

I am taking a wireless security class and one of the projects I was working on is to defend a wireless network. I thought it would be cool to create some program that would switch the SSID of the router at a set time interval. This combined with not broadcasting your SSID should make it hard for a hacker to break your WLAN. I used a pool of 5 SSID's and had them already loaded on my computer to see how practical this would be. It seemed to be fine with longer time intervals, but I think a designated computer would need to have a physical line to the router to run the program. Anyway the code and a better write up are given after the break.

Sunday, August 5, 2012

I'm a Tweeting Robot


Or at least I have a tweeting robot. I've had the idea to automate a twitter account for a while now after seeing other various robotweeters such as the one that tweets poetry. It doesn't do much right now (as a matter of fact its offline right now) other than tweet out a number every hour. I have been working on writing some additional functionality to tweet out the weather in the morning, a word of the day in the afternoon, and a picture of the day at night. As with all my projects this is still in its beginning stages. The program was written in Python and uses the Twitter API to tweet. Maybe someday I'll actually complete something, but until then you can follow my robot @RoboCWOOD. Below is the code I use to do it excluding my access keys and such.

Follow @RoboCWOOD


Thursday, June 28, 2012

I HAZ ALL THE VOTES

I'm living in the DC area for the summer and am a huge NBA fan. Not having cable forced me to watch the NBA playoffs on the Internet. The Western Conference Finals were hosted on TNT's website where you could vote for a fan cam to follow a player from each team. I wanted to put two unlikely players on the fan cam so I wrote a little program with the help of Selenium WebDriver to repeatedly vote for me. The expected results were for Tony Parker and Kevin Durant to be the leading vote getters. Instead it was to bench warmers. The script is after the jump.


Tuesday, May 29, 2012

OINK OINK

Some progress has been made on the Snort GUI including the general template of the GUI as well as the ability to make a rule and save a list of rules. For the first version I just want a simple edit rules interface that is clean and usable with the ability to save and load the rules as needed. Below is a picture of how it looks right now. I need to clean some of it up, but I think you will get the idea of what goes where if you've ever written a Snort rule.


Thursday, April 19, 2012

Colorduino

Been working on setting up a colorduino as a network monitor. Took a little while, but I have it displaying colors now. Still trying to figure out why its not clearing correctly, but have a sweet video of it.

Lincomatic Colorduino Library: http://blog.lincomatic.com/?p=148
Steve Ocepek Blinkie Lights Talk: http://defcon.org/html/links/dc-archives/dc-19-archive.html#Ocepek



UPDATE: Got it to print my name!



Thursday, February 9, 2012

1st Android App

While not technically the 1st Android App I've made it is the 1st one I have put on the Android market. Just a simple animal soundboard. You can get it here: https://market.android.com/details?id=com.chuckwoodraska Also found this useful for signing them:

Compile and sign with Eclipse ADT
If you are using Eclipse with the ADT plugin, you can use the Export Wizard to export a signed .apk (and even create a new keystore, if necessary). The Export Wizard performs all the interaction with the Keytool and Jarsigner for you, which allows you to sign the package using a GUI instead of performing the manual procedures to compile, sign, and align, as discussed above. Once the wizard has compiled and signed your package, it will also perfom package alignment with zipalign. Because the Export Wizard uses both Keytool and Jarsigner, you should ensure that they are accessible on your computer, as described above in the Basic Setup for Signing.
To create a signed and aligned .apk in Eclipse:
  1. Select the project in the Package Explorer and select File > Export.
  2. Open the Android folder, select Export Android Application, and click Next.
    The Export Android Application wizard now starts, which will guide you through the process of signing your application, including steps for selecting the private key with which to sign the .apk (or creating a new keystore and private key).
  3. Complete the Export Wizard and your application will be compiled, signed, aligned, and ready for distribution.