Jump to content

4 posts in this topic

Recommended Posts

Posted

Hi Guys,

In IDA I have the following code:

__text:00000001002E4330                 MOV             X1, #0
__text:00000001002E4334                 BL              Inventory$$get_size
__text:00000001002E4338                 MOV             X1, X0
__text:00000001002E433C                 CBZ             X21, loc_1002E44B0

What I want is to add an extra instruction before the MOV X1,X0 with something like MOV X0,#50.

So it will look like this:

__text:00000001002E4330                 MOV             X1, #0
__text:00000001002E4334                 BL              Inventory$$get_size
__text:0000000XXXXXXXXX                 MOV             X0, #50
__text:00000001002E4338                 MOV             X1, X0
__text:00000001002E433C                 CBZ             X21, loc_1002E44B0

How can I do that with code injection without overwriting the rest of the instructions or losing instructions ?

Posted
6 minutes ago, QuasaR said:

Hi Guys,

In IDA I have the following code:


__text:00000001002E4330                 MOV             X1, #0
__text:00000001002E4334                 BL              Inventory$$get_size
__text:00000001002E4338                 MOV             X1, X0
__text:00000001002E433C                 CBZ             X21, loc_1002E44B0

What I want is to add an extra instruction before the MOV X1,X0 with something like MOV X0,#50.

So it will look like this:


__text:00000001002E4330                 MOV             X1, #0
__text:00000001002E4334                 BL              Inventory$$get_size
__text:0000000XXXXXXXXX                 MOV             X0, #50
__text:00000001002E4338                 MOV             X1, X0
__text:00000001002E433C                 CBZ             X21, loc_1002E44B0

How can I do that with code injection without overwriting the rest of the instructions or losing instructions ?

 

replace

1002E4334                 BL              Inventory$$get_size

to mov x0, #50 your own code.

  • Informative 2

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
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines