Hackers around the world are using advanced tools to abuse your source code. They can extract sensitive information from your application and cause major financial damage. As a result, obfuscating your Delphi program can be critical. It will make it extremely difficult for hackers to analyze the code. As a result, they cannot abuse or add malicious functions to your application. In this post, you will learn how to obfuscate Delphi programs using Pythia, an open-source Delphi code obfuscator, called Pythia.
Delphi, an IDE software, is already more difficult to reverse engineer than C# and Java because Object Pascal compiles down to a native binary (like C++). When the binary is decompiled what is exposed is the assembly code. Most of the source code can be exposed when decompiling C# or Java if the C# or Java application was compiled with default settings. It takes additional expensive tools and steps to obfuscate C# code so you aren’t shipping the full source code with your app. You can read more about a decompiled comparison between C# and Delphi here.
Table of Contents
This a new Delphi code obfuscator tool for 2021
We have written about code obfuscators before on this blog, both for Delphi code obfuscation and to protect C++ apps from reverse-engineering too. Both of those options were slightly more mature commercial solutions which some commenters said they were not happy with since, although perfectly usable, they believed that they were a little out of date and for a paid product that was a problem.
Well, this article is about a code obfuscation tool which is Open Source so you can see exactly what and how it does in the work of obfuscation. Yes, the code is also from a few years back (if it works without bugs, why change it?) – however, because it’s Open Source you can also examine the code, fork the repository, and make improvements or change the way the obfuscation works to create your own unique custom obfuscation which would then further thwart reverse engineering.
What is an open-source Delphi Code Obfuscator?
Open-source Delphi code obfuscator is a free tool that makes your code complex by adding an extra layer of obfuscation. As a result, the hackers will have a very tough time comprehending your program. So, they can’t steal sensitive data from your application. Also, they can’t reverse engineer your code.
Why should you use an open-source Delphi Code Obfuscator?
- Helps you to save money
- Hides sensitive information by generating random values
- Protects intellectual property or trade secrets from the hackers
What is the best open-source Delphi Code Obfuscator in 2021?
The best open-source Delphi code obfuscator in 2021 is Pythia. It is available for free. The license used means you can use it with the code of your commercial Delphi applications without spending any money. Also, you can alter and redistribute Pythia freely within the guidelines of the original license.
How Pythia Protects Your Delphi Program
Pythia protects your program by modifying the Delphi Form (DFM) data and Virtual Method Tables (VMT) data of existing binary files in such a way that it’s rendered useless for hackers. However, it doesn’t change the functionality of your program. It keeps everything the same while obfuscating the key information. So, any person attempting to reverse engineer your program will face a very difficult time. Let’s take a look at an example.
Before Obfuscation:
Take a look at StringGrid1 of the DFM Data tree. It has a property, called Left. What will happen when it is obfuscated?
After Obfuscation:
As you can see, StringGrid1 has been changed to NzJaIGRG5Hb. Also, the Left property has been changed to BTtK. By obfuscating the data, Pythia is helping you to conceal important values. So, hackers can’t steal key information.
Should I use Pythia?
Pythia helps you to obfuscate binaries created with Delphi. As a result, your competitors and the lurking evil-doers can’t reverse-engineer your program easily. Why not give it a go and see how it can help you?
RAD Studio is the most powerful IDE for creating true native apps for PCs, tablets, and smartphones. Why not try it now for free?
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition
You recommend (13 years old!) Pythia, but I am not able to build the sources with RAD Studio.
Is there any place where I could download the Windows binaries?
Or could you give an instruction how to build the binaries using RAD Studio?
Hi Dirk, unfortunately it looks like the Pythia project is no longer maintained. This article itself is two years old too and there have been a few new versions of RAD Studio since it was written.
You could try one of the suggestions in the following article – they might be helpful: https://blogs.embarcadero.com/this-is-how-to-protect-your-source-code-from-hackers/
Hi Ian, Dirk’s wish is something recognizable by many Delphi developers I think. As I see it, obfuscation should be something the Delphi IDE can do without any third party tools. It isn’t just luxury. Besides, Pythia is something different than Codemorph that changes the sourcecode just by adding junk if I understand correctly.
My suggestions would be:
– The Pythia code is no longer maintained but perhaps something for Embarcadero to consider to maintain as it is Delphi related and there are very little possibilities left for Delphi customers. Even better, make it available in GetIt P.M.
– Integrating a sort of Codemorph like tool shouldn’t be too difficult for Embarcadero to implement as a compiler option (yeah I know for my POV it’s easy to say)