简体   繁体   English

反编译Luac文件-处理加密

[英]Decompile Luac files - dealing with encryption

I've read from other questions on this site that luac files can be decompiled if you know the lua version. 我从该网站上的其他问题中了解到,如果您知道lua版本,可以对luac文件进行反编译。 I've also read that the lua version is stored in the 5th byte of the luac file (the header). 我还读到lua版本存储在luac文件(标头)的第5个字节中。 However here's the first few bytes of a luac file I have: 但是,这是我拥有的luac文件的前几个字节:

1b 4c 4a 01 02 d1 01 00

To my eye the 5th byte is 02. Which suggests I'm dealing with a lua 0.2 file - I don't believe there is such a version! 在我看来,第5个字节是02。这表明我正在处理lua 0.2文件-我不相信会有这样的版本!

The above issue has made me thing the file is possibly encrypted - I know nothing of lua encryption... literally nothing. 上面的问题使我感到文件可能已加密-我对lua加密一无所知...实际上什么也不知道。 Is it reasonably possible to decrypt and decompile the lua file in question? 是否有可能解密和反编译所涉及的lua文件? How might I start this process? 我应该如何开始这个过程?

If it would be encrypted there would be some kind of key in the Lua interpreter; 如果将其加密,则在Lua解释器中会存在某种密钥。 otherwise it would not be possible to execute the byte code. 否则将无法执行字节码。 And if there is such a key it would have to be in each interpreter; 如果有这样的密钥,则必须在每个解释器中使用。 ie it would be well known. 即,这将是众所周知的。

Generally if anything happened to the file it is more logical to be compressed, but even then you would normally have a readable header. 通常,如果文件发生任何事情,则进行压缩更合乎逻辑,但是即使那样,您通常也具有可读的标头。

Of course, since this starts with a magic consisting of the characters ESC LJ Egor has already indicated the file format. 当然,由于这始于由字符ESC LJ Egor组成的魔术,因此已经表明了文件格式。 Usually the Posix file utility (also present in cygwin or the new Linux layer for Windows) would help you out here. 通常,Posix file实用程序(也存在于cygwin或Windows的新Linux层中)会在这里为您提供帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM