Dailydave mailing list archives
RE: Shellcode
From: "Dave Korn" <dave.korn () artimi com>
Date: Tue, 29 Nov 2005 18:58:23 -0000
Pedro E wrote:
Hi All!
I'm looking from some orientation to write a specific shellcode,
I think that is a simple problem but I can find a solution.
I have to execute a simple shellcode using hard coded addresses with a
msgbox:
LibraryReturn:
pop ecx ;get the library string
mov [ecx + 10], dl ;MY PROBLEM is this line I don't
have the right permissions to modify the NULL value and finish the string
mov ebx, 0x79470221 ;LoadLibraryA(libraryname);
push ecx ;beginning of user32.dll
call ebx ;eax will hold the module handle
jmp short FunctionName
xxx
..
..
GetLibrary:
call LibraryReturn
db 'user32.dllN'
There is other way to set the null value? I can't modify the memory when i
execute the shellcode.
The .text section of a program is protected read-only when the executable
file image is loaded into memory.
In the case of real buffer overflows, this is OK, because the shellcode is
on the stack, which is writeable.
You need to place your shellcode into either the .data section, the heap (by
mallocing and copying it there), or the stack.
cheers,
DaveK
--
Can't think of a witty .sigline today....
Current thread:
- Shellcode Pedro E (Nov 29)
- RE: Shellcode Dave Korn (Nov 29)
- RE: Shellcode Dave Korn (Nov 29)
- Re: Shellcode Alexander Sotirov (Nov 29)
- Re: Shellcode Isaac Dawson (Nov 29)
- Re: Shellcode Dave Aitel (Nov 29)
- Re: Shellcode H D Moore (Nov 29)
- Re: Shellcode halvar (Nov 30)
- RE: Shellcode Dafydd Stuttard (Nov 30)
- Re: Shellcode halvar (Nov 30)
- Re: HOLY GOD WE ARE SO OLD Matt Hargett (Nov 30)
- Re: Shellcode Isaac Dawson (Nov 29)
- Re: Shellcode halvar (Nov 30)
- RE: Shellcode Dave Korn (Nov 29)
