Unity3D 把代码混淆过的代码返混淆回来

一个混淆代码和返混淆代码的工具de4dot ,不查不知道一查吓一跳。这玩意可以把别人混淆过的代码反混淆回来。

这个工程是开源的 https://github.com/0xd4d/de4dot  找一台Windows电脑,下载后在VS上面打开它,另外它不能直接编译,需要在引入一个库文件。为了方便大家我把能正常编译的工程提供出来。

下载地址: http://pan.baidu.com/s/1ntjw3mL

如下图所示,打开工程后在VS里面快捷键F6,编译完成后会生成出来de4dot.exe 。那么我们返混淆就是通过这个exe来将unity生成的dll返混淆回来。

Unity3D研究院之在把代码混淆过的游戏返混淆回来(七十七) - 雨松MOMO程序研究院 - 1

 

经过混淆的代码反编译后。

Unity3D研究院之在把代码混淆过的游戏返混淆回来(七十七) - 雨松MOMO程序研究院 - 2

 

返混淆以后,如下图所示,属性名子就出来了。但是方法名就回不来了,都是按数字一次加上去,不过这些总比方括号好看多了。而且我看了一下内容,有些方法内容奇葩的地方也都解的至少能看。

Unity3D研究院之在把代码混淆过的游戏返混淆回来(七十七) - 雨松MOMO程序研究院 - 3

在Windows里面的cmd里面输入

de4dot.exe test.dll -p un

Unity3D研究院之在把代码混淆过的游戏返混淆回来(七十七) - 雨松MOMO程序研究院 - 4

 

另外你随便下载一个用Unity做的安卓游戏,然后把apk解开把里面的Assembly-CSharp.dll找出来,它的代码都在里面。如果它的代码没有做混淆工作,那么可以直接反编译出来。 如下图所示,返混淆会在原始dll的目录下生成一个后缀-cleaned.dll的文件。然后用反编译工具打开它即可。

Unity3D研究院之在把代码混淆过的游戏返混淆回来(七十七) - 雨松MOMO程序研究院 - 5

 

de4dot 看起来应该是非常强大,他支持返混淆这么多工具。。我就不一个一个试了,希望阅读本文的你帮我做一下测试,看看是不是所有混效果的Unity游戏都可以解开。

  • Agile.NET (aka CliSecure)
  • Babel.NET
  • CodeFort
  • CodeVeil
  • CodeWall
  • CryptoObfuscator
  • DeepSea Obfuscator
  • Dotfuscator
  • .NET Reactor
  • Eazfuscator.NET
  • Goliath.NET
  • ILProtector
  • MaxtoCode
  • MPRESS
  • Rummage
  • Skater.NET
  • SmartAssembly
  • Spices.Net
  • Xenocode

de4dot不仅仅可以返混淆,它也可以自身去混淆。大家可以看看它的gitHub上的介绍,哎 又是一个必须在Windwos上完成的操作。

淘宝花钱买的最新版!需要的拿去! This asset obfuscates your code to make it harder for bad guys to reverse engineer your projects. Specifically designed for Unity, it seamlessly links in with its build process. The top priority of this package is to work straight out of the box with no extra steps required. While other obfuscators can stop a game from working, Beebyte's obfuscator looks for specific Unity related code that must be protected. The contents of your source files are unchanged, the obfuscation targets the compiled assembly. Features: - Supports IL2CPP - Supports Assembly Definition Files (Unity 2017.3+) - Removes Namespaces without any conflicts - Recognises Unity related code that must not be changed - Renames Classes (including MonoBehaviours) - Renames Methods - Renames Parameters - Renames Fields - Renames Properties - Renames Events - String literal obfuscation - Adds fake methods - Easy and extensive customisation using the Unity inspector window - Consistent name translations are possible across multiple builds and developers - Semantically secure cryptographic naming convention for renamed members The asset works for both Unity Free and Unity Pro version 4.2.0 onwards (including Unity 5 & 2017 & 2018). Build targets include Standalone, Android, iOS, WebGL, UWP. Other platforms are not guaranteed or supported but may become supported at a future date. IL2CPP builds are much harder to reverse engineer but strings and member information (class, method names etc) are visible in the global-metadata.dat file. Obfuscation will apply to this file adding further security. Why not complement your security with the Anti-Cheat Toolkit - a great third party asset. For more information about the Obfuscator, please see the FAQ
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值