LD PRELOAD FUNCTION

Experienced Elementalist
Joined
Jul 30, 2020
Messages
224
Reaction score
51
So I have this in my cabal_server1.conf file

Code:
directory=/etc/cabal_etc/core/
command=/bin/bash -c 'LD_PRELOAD="/usr/lib/cabal/WorldSvr.so" exec /usr/bin/WorldSvr_01_01 -c'
user=root
autostart=false
autorestart=unexpected
startsecs=15

But when I check if it's really hooked, it does not show the file, only this

Code:
00400000-00e11000 r-xp 00000000 08:02 9700163                            /etc/cabal_bin/WorldSvr
01011000-01014000 r--p 00a11000 08:02 9700163                            /etc/cabal_bin/WorldSvr
01014000-0101b000 rw-p 00a14000 08:02 9700163                            /etc/cabal_bin/WorldSvr

Can anybody help with what makes it not run/inject properly?
 
htop
get the channel pid
F10

enter
tr '\0' '\n' </proc/<Chanel pid>/environ | grep LD_PRELOAD
 
Upvote 0
htop
get the channel pid
F10

enter
tr '\0' '\n' </proc/<Chanel pid>/environ | grep LD_PRELOAD

Code:
# tr '\0' '\n' </proc/33353/environ | grep LD_PRELOAD
LD_PRELOAD=/usr/lib/cabal/WorldSvr.so
# cat /proc/$(pidof WorldSvr_01_01)/maps | grep cabal
00400000-00e11000 r-xp 00000000 08:02 9700163                            /etc/cabal_bin/WorldSvr
01011000-01014000 r--p 00a11000 08:02 9700163                            /etc/cabal_bin/WorldSvr
01014000-0101b000 rw-p 00a14000 08:02 9700163                            /etc/cabal_bin/WorldSvr

is it suppose to put it here? because if it, then it's not working maybe something is wrong after all :O
 
Upvote 0
Back