The only way to stop the program from dropping root priv's is to use a portion of the shellcode to insert assembly instructions which will forcfully pick up those privledges again.
Using exec() used in conjunction with a command-shell-script is the simplest of overflow methods, but it is not used to stop the program from dropping priv's, and similarly using execv() just creates an array which represents a linux environment and attaches this to the program, wherein the shell will be stashed, this is used when the buffer to overflow is to small (Erickson: the AOE).
Personally:
I loved the Art of exploitation, it is a brilliant book for hackers, but Cryptic_prime, dude, you said
The best book ever on shellcoding is "art of exploitation."
Dude, PM me if you wanna talk about aquiring a copy!!!

Leave a comment: