Reader small image

You're reading from  Mastering Reverse Engineering

Product typeBook
Published inOct 2018
PublisherPackt
ISBN-139781788838849
Edition1st Edition
Tools
Right arrow
Author (1)
Reginald Wong
Reginald Wong
author image
Reginald Wong

Reginald Wong has been in the software security industry for more than 15 years.Currently, Reggie is a lead anti-malware researcher at Vipre Security, a J2 Global company, covering various security technologies focused on attacks and malware. He previously worked for Trend Micro as the lead for the Heuristics team, dealing with forward-looking malware detection. Aside from his core work, he has also conducted in-house anti-malware training for fresh graduates. He is currently affiliated with CSPCert.ph, Philippines' CERT, and is a reporter for Wildlist.org. He has also been invited to speak at local security events, including Rootcon.
Read more about Reginald Wong

Right arrow

Other obfuscation techniques


The obfuscation techniques we discussed are based on hiding actual strings and code using simple cryptography. Still, there are other ways to obfuscate code. As long as the concept of impeding data and code from easy extraction and analysis is present, then obfuscation still occurs. Let's discuss some more obfuscation techniques.

Control flow flattening obfuscation

The aim of control flow flattening is to make a simple code look like a complicated set of conditional jumps. Let's consider this simple code:

    cmp byte ptr [esi], 0x20
    jz loc_00EB100C
    mov eax, 0
    jmp loc_00EB1011
loc_00EB100C:
    mov eax, 1
loc_00EB1011:
    test eax, eax
    ret

When obfuscated using the control flow flattening method, it would look something like this:

    mov ecx, 1
    mov ebx, 0                ; initial value of control variable
loc_00EB100A:
    test ecx, ecx
    jz loc_00EB103C           ; jump will never happen, an endless loop
loc_00EB100E:
    cmp ebx, 0      ...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering Reverse Engineering
Published in: Oct 2018Publisher: PacktISBN-13: 9781788838849

Author (1)

author image
Reginald Wong

Reginald Wong has been in the software security industry for more than 15 years.Currently, Reggie is a lead anti-malware researcher at Vipre Security, a J2 Global company, covering various security technologies focused on attacks and malware. He previously worked for Trend Micro as the lead for the Heuristics team, dealing with forward-looking malware detection. Aside from his core work, he has also conducted in-house anti-malware training for fresh graduates. He is currently affiliated with CSPCert.ph, Philippines' CERT, and is a reporter for Wildlist.org. He has also been invited to speak at local security events, including Rootcon.
Read more about Reginald Wong