在 64 位系统上使用 LC_ENCRYPTION_INFO 进行基本的破解检测?

Using LC_ENCRYPTION_INFO for basic crack detection on 64bit systems?

我正在使用 LC_ENCRYPTION_INFO 检查二进制文件是否为 encrypted/compressed。我是用这个来猜测该应用程序是否是盗版的可能性。

在 ARM64 设备上,我发现这不再有效,我开始收到误报。你有这方面的经验吗?在 ARM64 中可以改变什么? (它适用于 iPhone 5 iOs 9beta,但不适用于 iPhone 5s 和 6 8.4)

请参考这个回答:

This code won't work successfully on a 64-bit device like the iPhone 5s. The header has been changed from mach_header to mach_header_64 and the command ID is now LC_ENCRYPTION_INFO_64.

What I did was to read the header and then see what the magic number was. If it's MH_MAGIC_64 then you're on a 64-bit device and you need to use the mach_header_64 struct and look for LC_ENCRYPTION_INFO_64 (defined as 0x2C) instead of LC_ENCRYPTION_INFO.

检查您使用的是 32 位还是 64 位,您可以获得指针的大小。如果它是 4 你在 32 位设备上,否则它将是 8