Insecurely Newbie cheater
Reputation: 0
Joined: 02 Dec 2014 Posts: 23
|
Posted: Sun Apr 03, 2016 9:58 am Post subject: How would I accomplish this? |EIP Register to allocated mem |
|
|
Hi, so I'm working on a code that points the EIP register to my allocated memory, after many tries I'm still unsure how I would do this, so far I've tried:
alloc(newmem,2048)
newmem:
push ebp
mov ebp,esp
bla bla
bla bla
bla bla
{$lua}
function debugger_onBreakpoint()
EIP=newmem
debug_continueFromBreakpoint(co_run)
return 1
end
debug_setBreakpoint(0x00456789)
{$asm}
My theory itself works, the script doesn't. I've tried doing it manually and it's all fine, just how it's supposed to be. But what I'm aiming for is a script what makes it all automatic! If you could fix my code or point out the issue I would very much appreciate it! Keep in mind, I am not fluent in Lua and assembly, so I might not understand what the problem is. Thanks, I will make sure to remember you if you're able to help as this is something I've been trying to do for hours already.
|
|
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sun Apr 03, 2016 11:32 am Post subject: |
|
|
Why would you even want to do this?
What's wrong with the standard injection that jumps to newmem?
Code: | alloc(newmem,2048)
newmem:
//whatever
00456789:
jmp newmem |
...if you insist
Code: | autoAssemble([[
alloc(whatever,2048)
whatever:
//whatever
registersymbol(whatever)
]])
whatever = getAddress("whatever")
function debugger_onBreakpoint()
EIP=whatever
debug_continueFromBreakpoint(co_run)
return 1
end
debug_setBreakpoint(0x00456789) |
|
|