我想禁用Lua混淆

问题描述 投票:0回答:1

这是某个游戏中的Lua。 我想修改并使用它。 但它很混乱。

这是我想到的结构:

例如,进入聊天会调用以下Lua文件。

return function (self,type,message)  _G["\u{5F}\u{49}\u{06B}\u{49}\u{6B}\u{6B}\u{6C}\u{06B}\u{49}\u{069}\u{6B}\u{69}\u{006C}\u{6C}\u{049}\u{0069}\u{06C}\u{6C}\u{006B}\u{69}\u{6C}\u{06B}\u{06C}\u{49}\u{6B}\u{0069}\u{06C}\u{0069}\u{49}\u{006B}\u{0069}\u{6C}\u{69}"]["\u{049}\u{0069}\u{6B}\u{69}\u{049}\u{6B}\u{049}\u{006C}\u{69}\u{6B}\u{006C}\u{69}\u{06C}\u{6B}\u{6B}\u{69}\u{6C}\u{6C}\u{0069}\u{06B}\u{6B}\u{6B}\u{006C}\u{69}\u{6C}\u{06C}\u{49}\u{006C}\u{049}\u{49}\u{49}\u{6C}"][(530247052)-(442715560)+(417474590)](self,type,message) end

代码调用了一个未知的全局变量。 我还发现一个文件定义了许多不可读的全局变量。

首先,我进行了以下计算(530247052)-(442715560)+(417474590)。 结果是505006082

定义全局变量的“chunk.lua”文件中也有类似的模式。 以下是其中一些:

[(1437643653)+(1949875078)-(2882512649)]=function(__a0,__a1,__a2)local ikiikkiKKk=223266510;ikiikkiKKk+=1811079080;(function(_iI0l1liIioIl,_o01ilio0oI00,_io0l1lioiIo1)local _1o0iIi1o1lo1=_iI0l1liIioIl[_G["\u{5F}\u{6C}\u{6B}\u{6B}\u{049}\u{006C}\u{49}\u{06B}\u{6B}\u{049}\u{06B}\u{49}\u{69}\u{0069}\u{006B}\u{6B}\u{049}\u{0049}\u{6C}\u{6B}\u{49}\u{49}\u{6C}\u{6C}\u{69}\u{69}\u{049}\u{0049}\u{049}\u{06C}\u{0069}\u{069}\u{6C}"]["\u{69}\u{06C}\u{6C}\u{6C}\u{069}\u{006C}\u{49}\u{69}\u{6B}\u{0049}\u{69}\u{06B}\u{0049}\u{6C}\u{6C}\u{69}\u{69}\u{49}\u{006B}\u{006B}\u{06C}\u{006B}\u{69}\u{069}\u{0049}\u{06B}\u{069}\u{049}\u{06B}\u{0049}\u{69}\u{049}"][(1155173479)+(1577632519)-(1688057523)]][_G[_G["\u{05F}\u{0049}\u{6C}\u{69}\u{06B}\u{49}\u{49}\u{6C}\u{006C}\u{69}\u{6B}\u{49}\u{6B}\u{6C}\u{006B}\u{0049}\u{69}\u{69}\u{49}\u{6C}\u{0069}\u{69}\u{06C}\u{6C}\u{06B}\u{049}\u{69}\u{006C}\u{6C}\u{0049}\u{49}\u{006C}\u{0069}"]["\u{06C}\u{006C}\u{6C}\u{6C}\u{006B}\u{0069}\u{49}\u{49}\u{6C}\u{69}\u{6C}\u{0049}\u{49}\u{6C}\u{6C}\u{6C}\u{6C}\u{69}\u{0069}\u{49}\u{0069}\u{6C}\u{6B}\u{6C}\u{6C}\u{49}\u{0049}\u{6C}\u{6C}\u{6B}\u{06B}\u{69}"][(1334598761)+(865866175)-(2122149422)]][_G["\u{005F}\u{006C}\u{006B}\u{06B}\u{49}\u{6C}\u{49}\u{006B}\u{6B}\u{49}\u{6B}\u{49}\u{069}\u{0069}\u{6B}\u{6B}\u{49}\u{0049}\u{6C}\u{6B}\u{0049}\u{49}\u{06C}\u{006C}\u{0069}\u{0069}\u{049}\u{49}\u{49}\u{6C}\u{69}\u{69}\u{06C}"]["\u{69}\u{6C}\u{006C}\u{06C}\u{0069}\u{6C}\u{49}\u{0069}\u{6B}\u{49}\u{69}\u{06B}\u{49}\u{6C}\u{6C}\u{69}\u{69}\u{49}\u{06B}\u{006B}\u{006C}\u{06B}\u{69}\u{69}\u{49}\u{6B}\u{0069}\u{49}\u{6B}\u{0049}\u{069}\u{49}"][(475540248)+(1474562382)-(1625698704)]]]local _1oiI0I1o1l0i={}for _1l0IoI1l1ioi=1,10000 do _1oiI0I1o1l0i[_1l0IoI1l1ioi]=_G["\u{5F}\u{06C}\u{06B}\u{006B}\u{049}\u{6C}\u{49}\u{006B}\u{6B}\u{049}\u{06B}\u{0049}\u{069}\u{069}\u{06B}\u{006B}\u{49}\u{49}\u{6C}\u{6B}\u{049}\u{49}\u{6C}\u{6C}\u{69}\u{0069}\u{49}\u{49}\u{0049}\u{006C}\u{0069}\u{69}\u{6C}"]["\u{69}\u{6C}\u{06C}\u{6C}\u{69}\u{6C}\u{49}\u{0069}\u{06B}\u{49}\u{069}\u{006B}\u{0049}\u{006C}\u{06C}\u{0069}\u{0069}\u{049}\u{6B}\u{6B}\u{6C}\u{006B}\u{69}\u{0069}\u{49}\u{6B}\u{069}\u{49}\u{06B}\u{49}\u{069}\u{49}"][(460084513)+(758444488)-(-873305452)]end

(1437643653)+(1949875078)-(2882512649) 在全局变量中定义了一个函数。 我导入这部分的原因是因为(1437643653)+(1949875078)-(2882512649)的结果与上面文件中计算的结果“505006082”相同。 并且它具有相同的三个参数。

但我不知道如何从这里开始。

接下来我应该尝试什么? 我目前正在尝试的是否更接近答案?

一切都在上面描述了。 我需要一个工具或知道如何解决这个问题的人。

lua obfuscation deobfuscation
1个回答
0
投票

这些

\u{xxx}
是UTF-8编码的字符,你可以使用lua打印它们来获取其原始值,例如

print("\u{5F}\u{49}\u{06B}\u{49}\u{6B}\u{6B}\u{6C}\u{06B}\u{49}\u{069}\u{6B}\u{69}\u{006C}\u{6C}\u{049}\u{0069}\u{06C}\u{6C}\u{006B}\u{69}\u{6C}\u{06B}\u{06C}\u{49}\u{6B}\u{0069}\u{06C}\u{0069}\u{49}\u{006B}\u{0069}\u{6C}\u{69}")

您将得到

_IkIkklkIikillIillkilklIkiliIkili
。继续转换所有这些相似的字符串,例如第一个函数可以被反混淆为:

return function (self,type,message)
    _G["_IkIkklkIikillIillkilklIkiliIkili"]["IikiIkIliklilkkillikkklillIlIIIl"][505006082](self,type,message)
end

显然这些键和变量名也被混淆了。您可以进一步将它们替换为短名称,应该更容易在代码中搜索相关信息。

© www.soinside.com 2019 - 2024. All rights reserved.