Morever, the execve man says:
execve() does not return on success, and the text, data, bss, and stack of the calling process are overwritten by that of the program
loaded. The program invoked inherits the calling process's PID
But in my case, if I debug the program and try to execute the...
Hey guys... I've figured out the reason why the shell is not getting spawned but still don't know beneath the surface i.e. how to get it solved; so I need to give you guys an SOS call ... :)
Actually, shell is generated as a Zombie process for a couple of seconds and then it gets destroyed...
:P sorry for the typo I meant '/usr/local/bin/bash'.
Let me clear my point please.
1- I'm using FreeBSD 4.8.
2- I've successfully smashed the stack and executed the code to run the commands like 'who', 'hostname' and 'pwd'.
3- I'm unable to execute 'sh', 'bash' and 'ls'.
Please advise!!!
But I have tried executing some other commands like '/usr/bin/who' , '/bin/hostname' but a set of commands like '/bin/sh', '/bin/bash', '/bin/ls' don't work... I wonder there is any special difference between these commands....!!!
Thanks for your worth it comments though, I'm trying the way out...
I have written a program "master.c" that is using gets and is vulnerable to buffer overflow:
//----- master.c -- MASTER PROGRAM ------------------------------
#include <stdio.h>
int main(int argc, char** argv)
{
char buf[100];
printf("Please enter your name: ");
fflush(stdout)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.