Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What exactly is deobfuscation

Lately I have been hearing about code deobfuscation, I know that its something about formatting code to make it readable but, what im really looking for is what would it even look like(an example) why would I even do it, how can it be done. Just to clear it up, i do fully understand the meaning of the word deobfuscation, improving things that are unclear or unreadable. What i don’t understand is the usage of this word in coding.

my main goal is to get a full understanding about deobfuscation because google has really confused me

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Deobfuscation is the process of taking an obfuscated (made difficult to understand) program and modifying it to be more clear and readable. Obfuscation is often used to protect intellectual property or to make it harder for someone to reverse-engineer or modify a program. Deobfuscation is the opposite process, and it can be used to make it easier to understand and modify a program. This can be useful for debugging, testing, or simply to understand how a program works.

simple program in Python that has been obfuscated:

import base64

def decode(encoded_data):
    return base64.b64decode(encoded_data).decode('utf-8')

def main():
    encoded_data = 'SGVsbG8gV29ybGQh'
    decoded_data = decode(encoded_data)
    print(decoded_data)

if __name__ == '__main__':
    main()

This program takes an encoded string and decodes it using base64. The decoded string is then printed to the console.

To deobfuscate this program, you could simply remove the base64 encoding and decoding and print the original string directly. Here’s what the deobfuscated version would look like:

def main():
    decoded_data = 'Hello World!'
    print(decoded_data)

if __name__ == '__main__':
    main()

the two pieces of code are functionally equivalent. The obfuscated code and the deobfuscated code will produce the same output when run.

The difference between the two is in how easy they are to read and understand.

The deobfuscated code is written in a way that makes it more clear what the code is doing, while the obfuscated code is more difficult to understand because the function and variable names are less descriptive.

Does this help clarify the concept of deobfuscation?

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading