如何处理在尝试反混淆奇怪代码时出现的名称冲突?

huangapple go评论73阅读模式
英文:

How to deal with name collision when you try to deobfuscate weird code?

问题

我现在正在进行一个应用程序的逆向工程,并且希望能够对其进行修补(提取源代码,重新编译并重新构建)。我开始使用JD-GUI,但发现了一个非常有趣的混淆方法。

所有的类名都是同一个单词(lolkekcheburek),只是大小写不同:

如何处理在尝试反混淆奇怪代码时出现的名称冲突?

因此,对于JVM来说,所有的类名都没问题,但当你尝试提取它时,Windows会提示名称冲突:

如何处理在尝试反混淆奇怪代码时出现的名称冲突?

你会如何处理这个问题?

英文:

i am reverse engineering one application now and i want an ability to patch it (extract sources, recompile and build it again). I started with JD-GUI but found very interesting obfuscation method.

All class names are the same word (lolkekcheburek) but in various case variations:

如何处理在尝试反混淆奇怪代码时出现的名称冲突?

So, for JVM all classes names are fine, but when you try to extract it, Windows notifies about name collision:

如何处理在尝试反混淆奇怪代码时出现的名称冲突?

How would you deal with this?

答案1

得分: 4

默认情况下,Windows 对文件名不区分大小写。如果您真的想在 Windows 上进行操作,您需要在 Windows 10 上启用对特定文件夹的大小写敏感性:
fsutil.exe file setCaseSensitiveInfo C:\folder enable

英文:

By default windows is not case sensitive for the filename. If you really want to work on windows, you have to be on Windows 10 and enable case sensitivity for your specific folder with :
fsutil.exe file setCaseSensitiveInfo C:\folder enable

答案2

得分: 0

最简单的方法可能是使用类似 proguard 的混淆工具来“混淆”类和方法名称,但实际上它会将它们命名为 Class1、Class2 等等。但要注意,这可能会破坏一些依赖于堆栈跟踪的混淆技术。

英文:

The easiest way would probably to use an obfuscator like proguard to "Obfuscate" the class and method names again, but it will actually name then Class1, Class2 and so on. But be aware that this might break some obfuscation techniques that rely on the stacktrace.

huangapple
  • 本文由 发表于 2020年10月3日 05:29:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/64178453.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定