Listing 2. Booby Trap (redirecting)

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

Output Messages

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