Closed andrewfamn closed 10 years ago
Confuser.Core.dll
in your project and inherits class Protection
or Packer
.Thank you, yck1509. It's very helpful information.
Please @yck1509 , I need help with these:
Constant.cs
file):var n = (uint)Mutation.KeyI1;
for (int i = 0; i < 0x10; i++)
{
n ^= n >> 12;
n ^= n << 25;
n ^= n >> 27;
k[i] = n;
}
As far as I remember Symmetric-Key cryptography, you are right that you should choose numbers carefully. That is confirmed by Wikipedia on xorshift, that explains that bad numbers could achieve short periods on your random numbers. And the longest the period of your random number key, the longer it would take for a brute-force attack to break your encryption.
I just noticed that Wikipedia xorshift example uses the exact same numbers as ConfuserEx. You can find here and here some more numbers that provide good random generators, although I guess they are using a different order for the left/right shifting.
Having said that, I guess that even if you choose some "bad numbers" for the shifting operations, I believe you'll still be safe against script kiddies, who probably won't use anything more than ready-made unpackers/deobfuscators. I mean: even if you choose a bad encryption key, what are the chances of someone brute-forcing your custom-obfuscator just to decrypt your constants? I haven't yet seen a deobfuscator doing brute-force. Probably it would take so long (even if you choose bad numbers) that it wouldn't worth it
PS: Please note that you should change those numbers on both EncodePhase.cs and Constant.cs.
This is more like a Q&A than an issue report but I don't know where to ask so I post it here. Therefore, I'm sorry about that. In your FAQ, you mention "a generic deobfuscator for different custom version of ConfuserEx would be virtually impossible to be created."