GDB: changing build code of a running program

I successfully changed the instruction to NOP , as it is quite simple:

 set *0x08048e3a = 0x90 

But I'm trying to change this address 0x08048e3a which has je 0x8048e52 . I would like to change it to je 0x8048ea8 .

But when I do set *0x08048e3a = 0x74168048ea8 , it does not work. ( 0x7416 = je )

thanks

+4
source share
1 answer

0x74168048ea8 longer than a word. You should try setting the bytes one by one, for example.

  set *(char*)0x08048e3a = 0x74 set *(char*)0x08048e3b = 0x16 

etc.

+8
source

Source: https://habr.com/ru/post/1385630/


All Articles