# # Download, Install and Test libsafe # # # 28-Apr-01 amo Date-of-Birth # 16-Apr-05 amo Latest is libsafe-2.0.16.tgz # # # Original Files # -------------- # http://www.Linux-Sec.net/harden/libsafe.txt # http://www.Linux-Sec.net/harden/libsafe.uhowto.txt # # cd /usr/local/src # # # wget http://www.avayalabs.com/project/libsafe # wget http://www.research.avayalabs.com/project/libsafe/src/libsafe-2.0-16.tgz # # # tar zxvfp libsafe-2.0-16.tgz # cd libsafe-2.0-16 # # Compile and Install it # ------------------------ # make make install # # # Make the test programs # ---------------------- # cd exploits make # # # Watch for libsafe log messages # ------------------------------ # tail -100 /var/log/secure # # # An NON-root user...try to gain root access... # --------------------------------------------- # user# touch /Can_I_write_a_file.txt # ./int.sh t1 - hit carraige return and watch ./int.sh t3 - hit carraige return and watch ./int.sh t4 - hit carraige return and watch ./xlock -nolock ./canary-exploit ./exploit-non-exec-stack # # # Now enable libsafe # ================== # export LD_PRELOAD=/lib/libsafe.so.2 # # # - rerun the above exploit tests # # # Permanently install libsafe # --------------------------- # # vi /etc/profile .... # # Installing libsafe # export LD_PRELOAD=/lib/libsafe.so.2 # # unset LD_PRELOAD to unload it # # # end of file