Thread: security apache
View Single Post
  #5   (View Single Post)  
Old 18th January 2009
Nk2Network Nk2Network is offline
Port Guard
 
Join Date: Jan 2009
Posts: 43
Exclamation Chrooter

hello

I admit to being difficult to understand and possible to have an explanation so I can understand

Examples of use "ldd", orders "strings" et "truss" are below


PHP Code:
localhost# ldd /usr/local/apache/bin/httpd
/usr/local/apache/bin/httpd:
libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x280bd000)
libc.so.4 => /usr/lib/libc.so.4 (0x280d6000)

localhost# strings /usr/local/apache/bin/httpd | grep lib
/usr/libexec/ld-elf.so.1
libcrypt.so.2
libc.so.4

localhost# truss /usr/local/apache/bin/httpd | grep open
(...)
open("/var/run/ld-elf.so.hints",0,00) = 3 (0x3)
open("/usr/lib/libcrypt.so.2",0,027757775370) = 3 (0x3)
open("/usr/lib/libc.so.4",0,027757775370) = 3 (0x3)
open("/etc/spwd.db",0,00) = 3 (0x3)
open("/etc/group",0,0666) = 3 (0x3)
open("/usr/local/apache/conf/httpd.conf",0,0666) = 3 (0x3)
(...)

The above should not be applied only httpd program, but all libraries and binary files required

some command does not work


PHP Code:
cp /usr/local/apache/bin/httpd /chroot/httpd/usr/local/apache/bin/ No such

file or directory
PHP Code:
cp /var/run/ld-elf.so.hints /chroot/httpd/var/run/

command works
PHP Code:
cp /usr/lib/libcrypt.so.2 /chroot/httpd/usr/lib/

No such file or directory
PHP Code:
cp /usr/lib/libc.so.4 /chroot/httpd/usr/lib/

No such file or directory

PHP Code:
cp /usr/libexec/ld-elf.so.1 /chroot/httpd/usr/libexec/

command works
Reply With Quote