Previous Thread
Next Thread
Print Thread
Rate Thread
#17205 04/30/04 10:31 PM
Joined: Apr 2004
Posts: 2
N
Junior Member
Junior Member
N Offline
Joined: Apr 2004
Posts: 2
Hey,
I'm not sure if this should go in this forum or somewhere else, but here goes. I need some help writing a buffer overflow for a setuid binary. It basically allocates 256 bytes for a buffer and calls scanf(%s,buffer). I know that this function is exploitable, but I can't figure out how to send my shellcode+ret into the program.
Someone want to help me out? How do I get the program to read my overflow code?

Thanks

Sponsored Links
▼ Sponsored Links ▼ ▲ Sponsored Links ▲
#17206 05/04/04 12:25 AM
Joined: Jun 2002
Posts: 62
Junior Member
Junior Member
Joined: Jun 2002
Posts: 62
understand assembly and how the code works the cpu. then you shall have your answer...


"Mrs. Jones, I'm sorry to inform you, but we've run the tests, and it appears that you have XP. Now don't cry - it's bad, but it's not a death sentence. Modern science has advanced in recent years, and it's now possible to live a reasonably happy life with XP. And there's a survivor's group that you'll want to meet as well."
#17207 05/13/04 01:03 AM
Joined: Apr 2004
Posts: 2
N
Junior Member
Junior Member
N Offline
Joined: Apr 2004
Posts: 2
Ummm...sorry, but that wasn't very helpful; I already know how everything about the overflows works. I already have the program that creates an environment variable containing the string that will spawn my shell. I can use it to spawn a shell from a program that uses strcpy() and receives the string from a parameter. I just don't know how to make a program that uses stdin instead of parameters. I've already tried sending my string into a file and dumping the file in. I've also tried echoing the variable and using | to send it into the program. Could the return address be different because of the scanf()?

Edit: spelling

#17208 05/18/04 02:17 PM
Joined: Mar 2002
Posts: 815
S
nobody
nobody
S Offline
Joined: Mar 2002
Posts: 815
You can use a debugger to find the return address


Link Copied to Clipboard
Member Spotlight
Gremelin
Gremelin
Portland, OR; USA
Posts: 7,204
Joined: February 2002
Forum Statistics
Forums41
Topics33,839
Posts68,797
Members2,177
Most Online73,244
Nov 9th, 2025
Latest Postings
Top Posters
UGN Security 41,392
Gremelin 7,204
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Likes Received
Ghost 2
Cyrez 1
Girlie 1
unreal 1
Crime 1
Powered by UBB.threads™ PHP Forum Software 8.0.0