Live data from Hacker News

Anti-Disassembly techniques used by malware

malwinator.com

11–20 of 27 posts

Re: Anti-Disassembly techniques used by malware

#11
post #9
post #3

Many of these techniques were pioneered by games programmers. The idea was that games should be played, not cheated and the same reverse assembly tricks apply and so the same counter-measures apply as well. One game that I'm familiar with had a never ending Matroshka like structure where each pass through a decryption routine would yield just another pile of gibberish and another chunk of code. The game took a couple…

I love cruel easter eggs like that. It worked didn't it.

Yep :)

Re: Anti-Disassembly techniques used by malware

#12
post #3

Many of these techniques were pioneered by games programmers. The idea was that games should be played, not cheated and the same reverse assembly tricks apply and so the same counter-measures apply as well. One game that I'm familiar with had a never ending Matroshka like structure where each pass through a decryption routine would yield just another pile of gibberish and another chunk of code. The game took a couple…

I have a guess, but after reading that, I would very much appreciate knowing what the game was?

More fun if you find out for yourself but I'll give you a hint: BBC Micro.

Re: Anti-Disassembly techniques used by malware

#16
post #3

Many of these techniques were pioneered by games programmers. The idea was that games should be played, not cheated and the same reverse assembly tricks apply and so the same counter-measures apply as well. One game that I'm familiar with had a never ending Matroshka like structure where each pass through a decryption routine would yield just another pile of gibberish and another chunk of code. The game took a couple…

Hmm why not just dump the mapped memory when it started up? Or did it do this even after loading?

Re: Anti-Disassembly techniques used by malware

#18
post #16
post #3

Many of these techniques were pioneered by games programmers. The idea was that games should be played, not cheated and the same reverse assembly tricks apply and so the same counter-measures apply as well. One game that I'm familiar with had a never ending Matroshka like structure where each pass through a decryption routine would yield just another pile of gibberish and another chunk of code. The game took a couple…

Hmm why not just dump the mapped memory when it started up? Or did it do this even after loading?

After loading.

Re: Anti-Disassembly techniques used by malware

#19
I wonder what is it about overlapping instructions that seems to confound even well-established (and expensive!) disassemblers like IDA Pro, since it's basically a solved problem; a long time ago, I wrote a disassembler that would just attempt to disassemble all the paths, and if instructions overlapped then it presented the alternate "streams" side-by-side until they merged together again. The first example would come out looking like this:

    40100E  jz 401011
    401010  call 8B4C55A0      | 401011  mov eax, [ebp+0C]
                               | 401014  mov ecx, [eax+4]
    401015  dec eax
    401016  add al, 0F         | 401017  movsx edx, byte ptr [ecx]
    401018  mov esi, 70FA8311  | 40101A
    40101C
This was in the early PC/XT days, so it handled 8088 and .COM files only, and only needed ~128KB of RAM to run (I remember it also swapped to disk(ette) when needed.) I probably still have the source (in Asm, naturally) and binary somewhere amongst all my 5.25" floppies...

Re: Anti-Disassembly techniques used by malware

#20
post #3

Many of these techniques were pioneered by games programmers. The idea was that games should be played, not cheated and the same reverse assembly tricks apply and so the same counter-measures apply as well. One game that I'm familiar with had a never ending Matroshka like structure where each pass through a decryption routine would yield just another pile of gibberish and another chunk of code. The game took a couple…

You may find this interesting - automated ways to unwrap these multilayered packers:

http://marionjy.loria.fr/wp-content/uploads/2015/10/codisasm...

50 levels is pretty low compared to what modern packers have; according to those slides, 100+ is not uncommon, hence the need to automate the process.

Post reply on HN