|
|||||||||||
|
Re: exploiting a binary if %edi can be overwritten?
From: <andrewg(at)d2.net.au>
Date: Tue Jun 24 2003 - 20:02:16 EDT >> Possibly, but doubtful given what i shown. Depending on the assembly
The above command iirc at&t syntax correctly, will destroy %edi. > 0x2813ed03 <vfprintf+3999>: jmp 0x2813f0e6 <vfprintf+4994>
How about info registers edi and eax? [ snip ] > open("/dev/mem", O_RDWR) = 4
[ snip ] >
Hmm, since edi is killed above, it doesn't look that exploitable. Since you can modify edi though, it kindof suggests you have overwritten other information. What does a backtrace (bt) under gdb look like? Possibly though given the ltrace, you may need to match the sscanf() call, so that the 4rd arg is written to. (That could be the reason for the EOF's). A x/s 0x0804f928 should suffice. I also notice that libvga is used, and that /dev/mem is open; this itself leads to an exploitable condition, because you can now modify kernel memory with what you want. libvga will also attempt to drop privs for you, iirc. (From memory, under linux for the kernel, you get the virtual address of the kernel (maybe via /proc/ksyms), and 0x00ffffff the address to get the physical address.) Some distros don't set CLOSE ON EXEC when they open /dev/mem, which makes it easier to exploit b/c you can start programs targetting that open fd, rather than shellcoding it. >
No problems. > regards
Hope this helps,
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:40 EDT |
||||||||||
|
|||||||||||