Posted October 19, 20213 yr Hello, I'm writing a code cave in the .text section I want to use a counter / variable and am using a location at the end of the .data section (which is writable) However when the code re-runs, while all the addresses in .text section are updating to take account of ASLR. The instruction that references the location in the .data section doesn't update the address location. Here is an example mov eax,dword ptr ds:[1E7EFF0] While the underlying relative address is unchanged, I need the absolute address to update each time the program is loaded. Is there a way that I can do this or do I need to use something like VirtualProtect and allocate my own working space? Thanks
October 19, 20213 yr Hi do something like this : call next instruction (E8 00000000) pop eax (getting current address) add eax, 0x12345678 (distance from here to destination address) BR, h4sh3m
Create an account or sign in to comment