|
|||||||||||
|
RE: Shellcoding ... again.
From: Patrick Strawderman <boogenhagn(at)comcast.net>
Date: Thu Jul 24 2003 - 16:21:24 EDT
unsigned char shellcode[] =
"\xfd\x98\xe7\x77" is the address of ExitProcess on xp sp1, in reverse
-----Original Message-----
Here I am again with shellcoding questions ... bear with me, its hard to find info on this subject other than txts with 2 pages of assembly codes that constitutes a remote, http-trojan downloading, all portable, optimized shellcodes that I can't even begin to assimilate. I'm just trying a simple ExitProcess shellcode, hardcoded address. (By the way, this is on win32.) kernel32.dll
imagebase= 0x77E80000
Got these from DUMPPE, added them together to get 0x77E8F32D for ExitProcess
address. Pretty
To test it out, I wrote a program that used inline assembly with that address. #include <windows.h>
int main()
h = LoadLibrary("kernel32.dll");
__asm("
FreeLibrary(h);
The program runs fine. No errors, no problems at all, so i'm assuming it worked just fine. When disassembled in Gdb(win32 port), I followed from xor edi, edi with x/bx
to get the
0x31, 0xFF, 0x57 for the xor and push; which doesn't seem right.
0xE8 for call, and and then 0xF9, 0xE0, 0xA8 and 0x77. I assume it loaded
into memory
I put the codes into a char array shellcode, and put my original address in
after the 0xE8
I've tried rearranging the address all possible combinations, so I don't
think thats the
#include <windows.h>
char shellcode[] =
int main(void)
HINSTANCE h; h = LoadLibrary("kernel32.dll"); ((void (*)(void)) &shellcode)();
FreeLibrary(h);
I'm getting lost now ... this was so much easier on unix. if anyone would like to help me out, i'd appreciate it. deepcode The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail Received on Thu Jul 24 17:11:34 2003 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:40 EDT |
||||||||||
|
|||||||||||