Your browser does not seem to support CSS. If images appear below, please disregard them.
toggle
February
S M T W T F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29
Sponsored Links
Latest Postings
Topic Options
Rate This Topic
#7672 - 11/27/02 09:31 PM help?
Joined: Nov 2002
Posts: 1
sleepigrl Offline
Junior Member
sleepigrl Offline
Junior Member

Joined: Nov 2002
Posts: 1
As part of a class project I need to write an exploit for the read below:

Code:
unsigned char data[200];
int i,j,n;
 
n=open(filename, O_RDONLY);
 
i=-1;
do{
i++;
j=read(n,data+i,1);
}while(j>0);
I have the binary code for NOP/open a shell/etc, but I can't figure out how to store it correctly in data since I have to read from a file - It ends up stored as ascii characters, having different values from what I need.

Any help would be appreciated.

Top
Sponsored Links
#7673 - 11/28/02 01:34 AM Re: help?
Joined: May 2002
Posts: 189
CyberNerd Offline
Member
CyberNerd Offline
Member

Joined: May 2002
Posts: 189
Here
isnt this what they would call cheating...
(i couldnt help you anyway)


Just because I dont care doesn't mean that I don't understand.
-Homer Simpson
Top
#7674 - 11/28/02 03:22 PM Re: help?
Joined: Mar 2002
Posts: 1,273
SilentRage Offline
DollarDNS Owner
SilentRage Offline
DollarDNS Owner

Joined: Mar 2002
Posts: 1,273
OH, USA
Are you trying to get a buffer overflow with that? seems you're reading characters from a file one at a time into the data buffer. If you read over 200 bytes, then possibly the data in the file after 200 bytes could be shell code and somehow get it executed. But anyway, that seems awefully vague.


Domain Registration, Hosting, Management
http://www.dollardns.net
Top

Member Spotlight
Gremelin

Gremelin
Portland, OR; USA
Posts: 7,194
Joined: February 2002
Show All Member Profiles 
Forum Statistics
Forums46
Topics43,832
Posts79,006
Members2,157
Most Online1,567
Apr 25th, 2010
Top Posters(All Time)
UGN Security 36,995
Gremelin 7,194
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Newest Members
Herbert_Sherbert, codemauve, Lillysdragon1984, Brewwit, boa
2157 Registered Users
Who's Online Now
0 registered members (), 1 guest and 0 spiders.
Latest News