Obfuscation in Unity — Tutorial

Obfuscation provides ways to secure and harden your game, not just by renaming variables at build time, as shown in the image below.

Learn more about How to Protect Your Games and Apps in My Tutorial.

2 Likes

Practical question: when would it be useful?

Theoretical question: if I know that someone used Obfuscator Pro to obfuscate their project would it be possible to Unobfuscate said project knowing how Obfuscator Pro works?

With the advent of AI chatbots, most obfuscation is pointless. I can give an executable to AI and it will reconstruct 90% of the original intent in a lot of cases.

3 Likes

Sensitive Parts to Protect:

Custom Algorithms, Game and Monetization Logic, Licensing, IAPs, Authentication, API Access, Premium Features, Anti-Cheat Functionality, DRM, Network Communication, Content Protection.

1 Like

Only way to actually protect it is to put it on your server and keep it on your server, make API calls to “do things” with the protected data and send it back.

Everything else is “kid sister encryption.”

Bruce Schneier coined the term “kid sister cryptography”, writing in the Preface to Applied Cryptography that:

“There are two kinds of cryptography in this world: cryptography that will stop your kid sister from reading your files, and cryptography that will stop major governments from reading your files. This book is about the latter.”

I strongly recommend reading the Applied Cryptography book.

2 Likes

@Kurt-Dekker @bl1s If you are so powerful with AI, we created a challenge for you, guys — try to hack the obfuscated test app.

1 Like

Just your mere suggestion of a challenge shows that you need to read something like Applied Cryptography.

Your opinions are actually “half-pinions” until you recognize more of the problem space, which includes the economic considerations.

It is Important Not to Treat Obfuscation as a Magic Solution. A Determined Attacker Can Potentially Analyze Any Software that Runs on a Device They Control.

A Useful Way to Think About Software Protection is Effort Versus Reward. A Potential Attacker will often Weigh the Effort Required to Break a Protection Mechanism Against the Value of the Target. If Analyzing or Modifying a Game Takes Hours, Days, or Weeks Instead of Minutes, Some Attackers May Simply Move On to Another Target.

If you put it on github and not a random .zip file after 3 links on LinkedIn I might give it a go. However, I don’t consider myself an adept user of AI :slight_smile:

Well, you can see how “obfuscation” works before you face with it. That’s exactly the thing I said above :slightly_smiling_face: If it requires too many steps from the attacker, they’ll just move on to an easier target.

Okkkk, have a good one. :))

Hey, I am the author of Obfuscator Pro.

In general the most known technique belonging to obfuscation is renaming. Renaming is one way, like hashing. You can not reverse it. Sure you can with much time, find out what code does what, and interpret own names. For example that was done in Minecraft Java Edition back then to allow modding.

But, “renaming” is just one security level of many. Combine that with IL2CPP, your code and structure is save.

Obfuscation can be useful for example if you want to harden your game against cheating. Or in general against reverse engineering, so if somebody wants to clone/steal parts of your code.

Also it is useful in commercial environment. For example 55% of all games are now mobile games while, 85% of those gain revenue through in app purchases. If someone easily skips the official purchase step and cheat, you loose revenue.

But it really depends on the personal goal. Many do not want obfuscation in singleplayer games because they want to allow unofficial cheating or modding. There are games living from that.

2 Likes

True, that would be the gold standard! But not everybody has the experience like us. And 90% of games do not have a server in the background.

Very interesting book, can recommend it too. But it is 30+ years old, the world has changed a little bit since then. But much of it is still true.

Simple “renaming”, yes. Check out the post from Richard Jones, about deobfuscating malware.

But there can be many more layers. That is what my cybersecurity solutions like my Obfuscator do.

You do not have to secure your game code, but if you want to, I give you great solutions.

I understand that :slight_smile: Put it here: GitHub - Guardingpearsoftware/gups-public-obfuscator-break-me: Try to break me. · GitHub

1 Like

This is called security through obscurity—not exactly a great form of security, and many people would argue that it isn’t security at all. Personally, I think it’s a little better than nothing. If it’s easy to implement and you can’t realistically implement proper security, then why not? At the very least, it can discourage inexperienced hackers who aren’t actually committed to hacking the game.

3 Likes

Hey, I appreciate the answer and the link. I will try to “hack” it this week and report back. :slight_smile:

1 Like

That is the exact goal. You “just” want to keep a cheater / hacker busy until they loose the fun and move on.

I tried to read the linked tutorial but the heavy use of Title Capitalization made it simply unreadable for me. Ortography is not there for fun.

1 Like

Title Case is a matter of capitalization and typography, not orthography. It’s my stylistic choice. :slightly_smiling_face: I understand that it may not be to everyone’s taste.