Listing 2. Booby Trap (redirecting)

for exec "/sbin/ifconfig" {
        if (euid != 0) {
                redirect "/bin/date";
        }
[[email protected] /tmp]# ifconfig
lo        Link encap:Local Loopback

Output Messages

          ....
[[email protected] /tmp]# su - robo
[[email protected] robo]$ ifconfig
Mon Dec 27 23:17:06 CET 1999
[[email protected] robo]$ exit
[[email protected] /tmp]# ifconfig
lo        Link encap:Local Loopback
          ....