Obfuscation

Table of contents

Summarise with:

What is obfuscation?

The code obfuscation is a technique that consists of modifying the source code of a program to make it more difficult for humans to understand, while maintaining the original functionality of the program.

The obfuscation is done by various transformations in the code, such as rewriting variables and functions, removing unnecessary comments and spaces, and altering the control flow. The main purpose of code obfuscation is to protect the source code from possible reverse engineering attacks or attempts to copy or modify the software without authorisation.

What is code obfuscation for?

Code obfuscation has several main objectives:

Protection of source code: Obfuscation makes the source code more difficult to understand, making it less vulnerable to reverse engineering attacks or unauthorised modification attempts.

Concealment of sensitive information: Obfuscation can help hide sensitive information, such as passwords, API keys or critical algorithms, that might otherwise be visible in the source code.

Make it more difficult to detect plagiarism: By changing the appearance and structure of the code, obfuscation makes it more difficult to detect source code plagiarism.

How do you obfuscate code?

There are various techniques and tools used to obfuscate code, including:

  • Renaming of variables and functions: Variable and function names are replaced with less meaningful or misleading names to make the code harder to read.
  • Removal of comments and spaces: Unnecessary comments and spaces in the code are removed to complicate reading and understanding.
  • Control flow obfuscation: The control flow of the program is restructured by introducing redundant instructions or reorganising the code to make it more difficult to follow.
  • Obfuscation of chains: Strings and constants are encoded to prevent them from being easily identifiable.
  • Obfuscation of logic: It complicates the programme logic by introducing unnecessary or redundant operations to make it difficult to understand the functionality of the programme.

Code obfuscation in cybersecurity

In the context of cybersecurity, code obfuscation is often used to protect software and tools used to detect and prevent computer threats. By making code more difficult to understand, obfuscation hinders the ability of cybercriminals to detect and exploit vulnerabilities in security software.

Link obfuscation in SEO

Link obfuscation is a technique used in the field of SEO (Search Engine Optimisation) to protect a website's links from search robots that may crawl and analyse the site's links.

Deofuscation of code

The code deofuscation is the process of reversing obfuscation, which makes code more readable and understandable to humans. While de-obfuscation can be useful in some cases, such as understanding legacy code or optimising software, it can also be used with bad intentions, such as illegal copying or reverse engineering of protected software.

Code obfuscation tools

There are several code obfuscation tools available, both open source and commercial. Some of the most popular tools are:

  • ProGuardA popular code obfuscation tool for Java, often used in the optimisation and protection of Android applications.
  • DotfuscatorA commercial tool for .NET code obfuscation, which includes advanced features for software protection.
  • BabelA popular JavaScript transpiler that includes code obfuscation features to protect the source code of web projects.

Code obfuscation and software licensing

The code obfuscation may also have implications for the software licensing. Some licences, such as the GNU General Public License (GPL), require source code to be available and readable by users. Code obfuscation can conflict with these licence requirements, so it is important to understand the restrictions and obligations of software licences when using obfuscation.

In short, the obfuscation of code is a useful technique to protect software and avoid the reverse engineering. However, it also presents challenges and limitations that need to be taken into account when applying it in different contexts.

Are you looking for specialised online training Look at this!

Share in:

Related articles

Codec

A codec (from the words coder and decoder) is a programme or device used to compress and decompress digital data. Its main purpose is to optimise the storage and transmission of information, especially in audiovisual formats,

Regex

Regular expressions, commonly known as regex (short for «regular expressions»), are a sequence of characters that define a search pattern. These expressions are used in a variety of programming languages and tools to perform operations on text strings, such as

Kubernetes

Kubernetes, also known as K8s, is an open source platform designed for automating, deploying, scaling and operating containerised applications. Its primary function is to orchestrate and manage containers efficiently, providing a robust and flexible environment for deploying applications.

Cartesian robot

A Cartesian robot is a type of industrial robot that is characterised by its Cartesian coordinate system to control its motion. Instead of using rotating joints like anthropomorphic-type robots, Cartesian robots move along

Scroll to Top