News for hackers. Stuff that matters.
Re:How We Decoded Some Nasty Multi-Level Encoded Malware by JonnieCache on Tuesday December 10, 2013 @05:23AM (#6879922)
This is roughly what I was imagining doing in my head when I brashly wrote "obviously bruteforce." Hooray! Apparently I've still got it, at least to some small extent.

Thanks for your writeup!

Why does define work so well? Chance?

Re:How We Decoded Some Nasty Multi-Level Encoded Malware by alexkus on Tuesday December 10, 2013 @05:38AM (#6879951)
Not sure, "define" only appears 10 times but "function" appears 19 times. It's probably because 'e' is more popular in the code and "define" has two of them. Looking at the decrypted code there are much better strings to try; "function_exists" gives the right key first time too.

It could have been made a lot harder by using comments at the end of each line to pad the code with extra characters to equal out the frequency distribution and make this kind of frequency analysis impossible.

Re:How We Decoded Some Nasty Multi-Level Encoded Malware by JonnieCache on Tuesday December 10, 2013 @06:00AM (#6880021)
Could I make it even worse using ruby's unicode support?

eg this kind of nonsense:

    π = Math::PI
    alias λ proc

    ● = λ {|r| π*r**2}
    puts ●.call 5

    # 78.53981633974483
Re:How We Decoded Some Nasty Multi-Level Encoded Malware by alexkus on Tuesday December 10, 2013 @06:35AM (#6880119)
Oh yes, although too many "alias" commands will mean that it's possible to search for the known plaintext of 'alias'. But the more non-ascii bytes there are the more it will put off my analysis which dependeds on isprint().