Question about linux shellcode

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

Question about linux shellcode

Postby _cih_ » Fri Jan 05, 2007 1:36 am

Hello everybody,

I am trying to write a simple shellcode, but I am having some difficulties.
i.e

I have following codes ( with following hex represenation respectively ) :

..
jmp 0x8048243<main+91> (e9 3a 00 00 00)
..
mov $0x9ed, %ecx (b9 ed 09 00 00)
..
js 0x804824f<main+103> (78 00)
..


As you can see the problem I have are the 00-s in the shellcode.If i want to overflow a character buffer, such null bytes will be considered as end of string. Can anybody hint me on any workaround on one of the samples above ?

Thanks.
_cih_
 
Posts: 10
Joined: Wed Sep 13, 2006 4:50 pm

Re: Question about linux shellcode

Postby Steogede » Tue Jan 16, 2007 10:13 am

_cih_ wrote:Hello everybody,

I am trying to write a simple shellcode, but I am having some difficulties.
i.e

I have following codes ( with following hex represenation respectively ) :

..
jmp 0x8048243<main+91> (e9 3a 00 00 00)
..
mov $0x9ed, %ecx (b9 ed 09 00 00)
..
js 0x804824f<main+103> (78 00)
..


As you can see the problem I have are the 00-s in the shellcode.If i want to overflow a character buffer, such null bytes will be considered as end of string. Can anybody hint me on any workaround on one of the samples above ?

Thanks.


You have a shell that understands Assembly? Perhaps it would help if you mentioned which shell you are using, it certainly isn't BASH.
Steogede
LXF regular
 
Posts: 146
Joined: Thu May 04, 2006 5:39 pm

RE: Re: Question about linux shellcode

Postby jjmac » Tue Jan 16, 2007 10:26 am

>>
If i want to overflow a character buffer
>>

Why would you want to do that ?


jm
http://counter.li.org
#313537

The FVWM wm -=- www.fvwm.org -=-

Somebody stole my air guitar, It happened just the other day,
But it's ok, 'cause i've got a spare ...
jjmac
LXF regular
 
Posts: 1996
Joined: Fri Apr 08, 2005 1:32 am
Location: Sydney, Australia


Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests