Jump to content
Dark-Yox

Decrypt values

Recommended Posts

Hi,

I just wonder if it's possible to know the algorithm used for encryption/decryption if we know the real value of some encrypted numbers like in my case I know that 

1.545.691.265 = 0 Coins

1.545.691.300 = 37 Coins

1.545.691.494 = 487 Coins

etc..

Share this post


Link to post
Share on other sites

Maybe with gdb. Set write watchpoint on the value. Then you'll get an offset related to the encryption. Assuming game is lib file and not dll.

Share this post


Link to post
Share on other sites
15 minutes ago, NoFear said:

Maybe with gdb. Set write watchpoint on the value. Then you'll get an offset related to the encryption. Assuming game is lib file and not dll.

Thanks for the quick answer but can you tell me how to do that or give me some useful link(s) ?

Share this post


Link to post
Share on other sites

It's xor-encryption with the key "1 545 691 265" (equal to value with 0 coins).

1 545 691 265 xor 37 = 1 545 691 300

1 545 691 265 xor 487 = 1 545 691 494

Therefore, to get encrypted value Y that corresponds to real value X, you need to use the following formula:

Y = 1 545 691 265 xor X

This will work, if the key is constant. If it is not, you will first need to find it out to be able to calculate encrypted values.

Share this post


Link to post
Share on other sites

1.545.691.265 xor 0 = 1545691265

1.545.691.300 xor 37 = 1545691265

1.545.691.494 xor 487 = 1545691265

so it is simple xor with key = 1545691265

Share this post


Link to post
Share on other sites

I think iosgods has lldb debugging guide for ios.

It's not too different than Android. Lldb only supports x64 on Android. So you may want to do the equivalent with gdb.

3 minutes ago, CmP said:

It's xor-encryption with the key "1 545 691 265" (equal to value with 0 coins).

1 545 691 265 xor 37 = 1 545 691 300

1 545 691 265 xor 487 = 1 545 691 494

Therefore, to get encrypted value Y that corresponds to real value X, you need to use the following formula:

Y = 1 545 691 265 xor X

This will work, if the key is constant. If it is not, you will first need to find it out to be able to calculate encrypted values.

Heh, didn't even think to try that first 😛

 

Edit: 

For more complex Encryption, debugging could help.

Share this post


Link to post
Share on other sites
4 hours ago, NoFear said:

Maybe with gdb. Set write watchpoint on the value. Then you'll get an offset related to the encryption. Assuming game is lib file and not dll.

gdb needs root?

Share this post


Link to post
Share on other sites
15 minutes ago, nalcwap said:

gdb needs root?

Yes.

Share this post


Link to post
Share on other sites
Just now, NoFear said:

Yes.

that bad but thanks

Share this post


Link to post
Share on other sites
1 hour ago, NoFear said:

Yes.

you know any ap android for debug without root?

Share this post


Link to post
Share on other sites
56 minutes ago, nalcwap said:

you know any ap android for debug without root?

I think if you use ida on pc. You can debug without root that way.

I just prefer gdb, for I don't need pc to do it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By YoloBro666
      Hello everyone! I searched on google, youtube, this forum. The results I got were NOT very promising. All I found was unluac, something about ss tool?, hooking script, loader script, source dumper, encrypter.. I am so sad about the fact there is not a single thread about introduction to decryption so I thought I *NEEDED* to make this thread so others can learn too.
      First of all I have some questions:
      1)How to determine the type of encryption used?
      2)How to decrypt HEX, XOR encryption?
      3)How to FULLY DECRYPT a script?
      I'd be thankful if someone writes introduction on decryption of scripts, some people like @TopGEOYT can magically decrypt scripts. New people like me must be given some idea. @Enyby @NoFear @Backlift @Anonymous1000 @bukandewa [Don't bother replying if you are not gonna help]
      This would also be very helpful to other new members, so a kind guy please help.
      I MUST REMIND: I am NOT a copy-paster. I haven't released a single script in my entire life. All I do is modify some scripts a little bit in order to make them work better or make them work anyway I want. I DO NOT have any bad intentions, so help would be much appreciated.
      Thank you so much, have a nice day.
    • By riesixy
      hello guys I need your help... I'm newbie of these thing. so can you help me to decrypt this script please.. som1 pls halp!
      Hackmapguinevere.lua
    • By Yang103
      Please help me, thank you.

×
×
  • Create New...