![]() |
Removing Obfuscation
You are probably familiar with the type of obfuscation which looks like this in IDA :
Code:
0000008:1005F233 loc_1005F233: ; CODE XREF: _0000008:1005F22EjCode:
_0000008:1005F233 loc_1005F233: ; CODE XREF: _0000008:1005F22EjThe obfuscation usually appears in blocks of 5 bytes that do nothing, like jnz lab jz lab <random byte> lab: ... Sometimes you also get a push/pop pair or an add/sub pair. These can be NOP'd out to finally give : Code:
_0000008:1005F233 8B 15 64 6E 04 10 mov edx, ds:dword_10046E64You can now turn the full block into a Procedure if relevant and the code is readable and assemblable. If you've got this far I have 2 questions. Firstly, what is this obfuscation called? (ie, name of the program that obfuscates it) and secondly, is there a more automated way of removing it?. I wrote a script which I use to turn a selected block into NOPs which helps, but it's still quite a trudge to do it by hand. If you read this far, thanks! Git |
I don't think this is a specific kind of obfuscation.
most of the time they are based on dissassembly way and an added junk byte see PHP Code:
also, I remember the plugin CodeDoctor remove obfuscation but I didn't try it. :) |
Thanks. I'll look more at CodeDoctor, but on first glance it seems dangerous.
Git |
I ended up using a script to use by hand. Put cursor at first of the 2 bad jumps and hit alt-F9 to run the script. It nops the 5 bad positions, makes a block of code Unknown and then makes it code from the first address. :
Code:
#include <idc.idc>Code:
#include <idc.idc>Git |
I agree it`s probably the most common anti-disassembler trick. Olly handles it quiet well, if the code is within the code section & analyzed.
ASProtect uses this quiet heavily, and back in the day i also wrote a script to combat this. :) |
| All times are GMT +8. The time now is 06:09. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX