Wednesday, December 1, 2010

Unsafe Functions

The function execve() is safer to use than system(), because with the system() call, an attacker can change the PATH variable, causing an attacker program to run instead of the program passed in the system() call.

The last 'e' in execve() stands for environment. The 'v' means that the command line parameters are passed with a pointer to an array of ascii-zero strings with a zero in the last array element.

No comments:

Post a Comment