Monday, November 01, 2004

Group or World writeable Directories in root's PATH

Start by typing echo $PATH. The results will tell you where the shell will search for executable files. A null entry in your PATH equates to the same thing as a dot. Including the current working directory either with a "." or by "::" makes it possible for a hacker to gain superuser privileges by forcing an administrator operating as root to execute a Trojan horse program.

The shell variable PATH defines the path and the order of priority for executable files on the system. Alternative paths are separated by a colon (:). The current directory can be specified by two or more adjacent colons, or by a period in between two colons. Path will search each directory in the order specified within the $PATH variable for an executable file that matches the name of the file you are trying to execute.