Saturday, October 17, 2009

A sample user impersonation on unix using setuid

/* include required header files */

int main()
{
setuid( 32033 );
system( "/test/run.sh" );

/*
shell script is run with a different effective
user id than the executor if this binary is being
set uid
*/

return 0;
}

No comments:

Post a Comment