Didactic XOR Cipher 3

Discussion of challenges you have already solved
Post Reply
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Didactic XOR Cipher 3

Post by adum »

xx
User avatar
yes-man
Posts: 32
Joined: Fri Jan 30, 2009 5:14 pm

Post by yes-man »

Guessing the first one and using brute force on the 'x'.
A RegEx searching for '<space>is<space>' did come up with only one hit :-]
User avatar
LarsH
Posts: 29
Joined: Sun Feb 15, 2009 4:47 pm

Post by LarsH »

I assumed that the string " the " would be in the string.

I xor:ed the encrypted message with " the " in all five ways, and printed
out the difference between each byte and the one following it.

And there, on line two I saw "147 147 147 147 ", and I could calculate b. No brute force required. :wink:
Meelo
Posts: 9
Joined: Sat Apr 25, 2009 11:10 pm

Post by Meelo »

I wrote a program to print all matches of

"is","and","answer", or "hack"

in a string that I got. It worked eventually.
Atsutane
Posts: 3
Joined: Tue Oct 28, 2008 5:31 pm

Post by Atsutane »

Hm I don't know where the problem is, but I only got the solution and the following 'is', the whole sentence looked like this:
'solution' is �F�l��%�K�q�*�P
I used a modified peace of C code with which I already solved some other XOR-related hackits, a friend of mine who solved it using a ruby script got the full sentence as plain text. In the end it was pure luck I noticed the apostrophes surrounding the answer in the file, else I'd probably still be sitting here searching for the error in my code.

As everyone here already solved the challenge I don't see a rule break in posting my code here, if I'm wrong I'm terribly sorry, it's just driving me crazy.

http://atsutane.freethoughts.de/stuff/crackxor3.c

Has anyone of you a idea why I get only 2 words correctly deciphered and the rest is just the common noise?
User avatar
LarsH
Posts: 29
Joined: Sun Feb 15, 2009 4:47 pm

Post by LarsH »

Atsutane: The hex_to_ascii() function is broken. Try making t one byte larger and null-terminate it.
Atsutane
Posts: 3
Joined: Tue Oct 28, 2008 5:31 pm

Post by Atsutane »

Well even after I made sure that every string is null-terminated, I get the same result. I think I'll (try to) solve the next few challenges using a scripting language and do another try with a complete rewrite in about a month.
User avatar
zjorzzzey
Posts: 11
Joined: Fri Oct 30, 2009 7:31 pm
Location: NL

Post by zjorzzzey »

Just made a quick brute force solver in javascript (in the firebug console actually, was too lazy to start a real development tool :oops: ).

Only printing results with > 80% readable chars came up with just one hit 8)
Post Reply