摘要 |
Compiled computer code (300) comprising computer code instructions organised in a plurality of basic blocks (310-370) is obfuscated by replacing (410) a jump instruction in a first basic block (360; 370) with a function call with at least one parameter, wherein the function call when executed determines the address of the next function to execute in dependence on the parameter; inserting (440) into the compiled computer code (300) an instruction that allocates a value to the parameter, the value being such that the address determined by the function call corresponds to the address of the replace jump instruction. The allocation function is inserted into the computer code in a second basic block (320-350), different from the first basic block (360; 370), preferably using information from a control flow graph (CFG). This can ensure that the obfuscated code cannot be disassembled without information from the CFG, while the CFG cannot be generated from the obfuscated code. Also provided is a device for code obfuscation. |