
Originally Posted by
thecowmilk
Yess!! But "in wrapped execve" doesn't get executed when the other bin runs
Possibly because exec() is a whole family of funcitons:
Code:
int execl(const char *pathname, const char *arg, ...
/* (char *) NULL */);
int execlp(const char *file, const char *arg, ...
/* (char *) NULL */);
int execle(const char *pathname, const char *arg, ...
/*, (char *) NULL, char *const envp[] */);
int execv(const char *pathname, char *const argv[]);
int execvp(const char *file, char *const argv[]);
int execvpe(const char *file, char *const argv[],
char *const envp[]);
You don't really know in advance which one a program will use, so just like Pokemon - you got to catch them all!
Actually you can use the 'nm' utility to find what external symbols a program uses....
Code:
$ nm a | grep " U "
U __libc_start_main@@GLIBC_2.2.5
U free@@GLIBC_2.2.5
U malloc@@GLIBC_2.2.5
U puts@@GLIBC_2.2.5