[fatb@baoz ~]$ nmap -P0 ac9e2da9.ipt.aol.com -O |
[root@victim root]# ifconfig -a | grep -i -e "00-05-69" -e "00-0C-29" -e "00-50-56" ; dmesg | grep -i vmware |
[root@victim root]# cat /proc/cpuinfo | grep name ;cat /proc/meminfo | grep MemTotal model name : Intel(R) Xeon(TM) CPU 2.80GHz model name : Intel(R) Xeon(TM) CPU 2.80GHz model name : Intel(R) Xeon(TM) CPU 2.80GHz model name : Intel(R) Xeon(TM) CPU 2.80GHz MemTotal: 1030228 kB |
[root@victim root]# ls -alh ls: invalid option -- h Try `ls --help' for more information. |
[root@victim root]# netstat -anp Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1702/httpd tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1516/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1540/ tcp 0 300 123.123.123.123:22 10.20.30.40:2245 ESTABLISHED 6097/sshd: tcp 0 0 123.123.123.123:22 10.20.30.40:2247 ESTABLISHED 6815/sshd: Active UNIX domain sockets (servers and established) Proto RefCnt Flags Type State I-Node PID/Program name Path unix 2 [ ACC ] STREAM LISTENING 121430 6815/sshd: /tmp/ssh-vfJj6815/agent.6815 unix 2 [ ACC ] STREAM LISTENING 116904 6097/sshd: /tmp/ssh-weHq6097/agent.6097 unix 6 [ ] DGRAM 1560 1476/syslogd /dev/log unix 2 [ ] DGRAM 1771 1570/crond unix 2 [ ] DGRAM 1728 1549/ unix 2 [ ] DGRAM 1714 1540/ unix 2 [ ] DGRAM 1568 1480/klogd |
[root@victim chkrootkit-0.47]# ./chkrootkit Checking `ifconfig'... INFECTED Checking `pstree'... INFECTED Searching for t0rn's v8 defaults... Possible t0rn v8 \(or variation\) rootkit installed Searching for Showtee... Warning: Possible Showtee Rootkit installed Searching for Romanian rootkit... /usr/include/file.h /usr/include/proc.h Checking `bindshell'... not infected Checking `lkm'... You have 2 process hidden for ps command chkproc: Warning: Possible LKM Trojan installed |
我们再找rkhunter爽一下:
rkhunter的输出信息比较人性化也比较多,--quite选项输出又有点问题,我就rip比较有用的信息出来,日志在/var/log/rkhunter.log。
[root@victim chkrootkit-0.47]# /usr/local/bin/rkhunter -c --createlogfile Rootkit 'SHV4'... [ Warning! ] Rootkit 'SHV5'... [ Warning! ] Rootkit 'Suckit Rootkit'... [ Warning! ] -->还有这个高级货啊,偷偷的汗了一下。 * Filesystem checks Checking /dev for suspicious files... [ Warning! (unusual files found) ] Unusual files: /dev/srd0: ASCII text --> /dev下有ascii文件…… ---------------------------- Scan results ---------------------------- MD5 MD5 compared: 51 Incorrect MD5 checksums: 6 File scan Scanned files: 342 Possible infected files: 3 Possible rootkits: SHV4 SHV5 Suckit Rootkit Application scan Vulnerable applications: 4 Scanning took 751 seconds Scan results written to logfile (/var/log/rkhunter.log) ----------------------------------------------------------------------- |
[root@victim root]# export PATH=/root/.../static/:$PATH |
[root@victim /]# ls -alh /tmp/mc-root/ total 8.0K drwx------ 2 root root 4.0K Nov 8 19:36 . drwxrwxrwt 9 root root 4.0K Nov 18 10:47 .. |
[11:20:53] *** Start scan SHV4 *** [11:20:53] - File /lib/lidps1.so... WARNING! Exists. [11:21:12] *** Start scan SHV5 *** [11:21:12] - File /etc/sh.conf... WARNING! Exists. [11:21:12] - File /dev/srd0... WARNING! Exists. [11:21:12] - Directory /usr/lib/libsh... WARNING! Exists. [11:21:15] *** Start scan Suckit Rootkit *** [11:21:15] - File /usr/share/locale/sk/.sk12/sk... WARNING! Exists. [11:21:15] - Directory /usr/share/locale/sk/.sk12... WARNING! Exists. |
[root@victim root]# file /lib/lidps1.so /lib/lidps1.so: ASCII text [root@victim root]# cat /lib/lidps1.so ttyload shsniff shp shsb hide ttymon scanner |
root 1584 0.0 0.0 1852 68 ? S Nov17 0:00 /sbin/ttyload -q root 1586 0.0 0.0 1500 168 ? S Nov17 0:26 ttymon tymon [root@victim root]# netstat -anp Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:31338 0.0.0.0:* LISTEN 1584/ttyload tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1702/httpd tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1516/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1540/ raw 0 0 0.0.0.0:1 0.0.0.0:* 7 1586/ttymon raw 1312 0 0.0.0.0:1 0.0.0.0:* 7 1586/ttymon |
我们注意一下pid为1584和1586的两个进程,它们一个开了31338端口,一个起了raw socket,估计两个都是后门,一个bindport的,一个是sniffer的后门,接着我们lsof看看,呵呵,都现形了吧。
[root@victim root]# lsof -n -p 1584 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME 3 1584 root cwd DIR 8,3 4096 2 / 3 1584 root rtd DIR 8,3 4096 2 / 3 1584 root txt REG 8,3 652620 212994 /tmp/sh-DJYK3MJABRP (deleted) -->这个是upx压缩后的特征之一。 3 1584 root mem REG 8,3 103044 12828674 /lib/ld-2.3.2.so 3 1584 root mem REG 8,3 91604 12828689 /lib/libnsl-2.3.2.so 3 1584 root mem REG 8,3 23668 12828683 /lib/libcrypt-2.3.2.so 3 1584 root mem REG 8,3 12696 12828711 /lib/libutil-2.3.2.so 3 1584 root mem REG 8,3 1531064 13991938 /lib/tls/libc-2.3.2.so 3 1584 root 0u CHR 1,3 67051 /dev/null 3 1584 root 1u CHR 1,3 67051 /dev/null 3 1584 root 2u CHR 1,3 67051 /dev/null 3 1584 root 3u IPv4 1798 TCP *:31338 (LISTEN) [root@victim root]# lsof -n -p 1586 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME ttymon 1586 root cwd DIR 8,3 4096 2 / ttymon 1586 root rtd DIR 8,3 4096 2 / ttymon 1586 root txt REG 8,3 93476 43663399 /sbin/ttymon ttymon 1586 root mem REG 8,3 103044 12828674 /lib/ld-2.3.2.so ttymon 1586 root mem REG 8,3 52472 12828695 /lib/libnss_files-2.3.2.so ttymon 1586 root mem REG 8,3 1531064 13991938 /lib/tls/libc-2.3.2.so ttymon 1586 root 3u raw 1799 00000000:0001->00000000:0000 st=07 |
[root@victim root]# /sbin/ttymon [root@victim root]# /sbin/ttymon --help [root@victim root]# /sbin/ttymon -h |
[root@victim root]# strings /sbin/ttymon Usage: %s <dst> <src> <size> <number> Ports are set to send and receive on port 179 dst: Destination Address src: Source Address size: Size of packet which should be no larger than 1024 should allow for xtra header info thru routes num: packets Could not resolve %s fucknut ICMP jess tc: unknown host 3.3.3.3 mservers lamersucks skillz ttymon ./0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ |
[fatb@baoz ~]$ ./a Daemonic - BGP Killer [Theories in DoS] www.AntiOffline.com/TID/ Usage: ./a <radd> <sradd> <bgsize> <number> Ports are set to send and receive on port 179 radd: Address of router running BGP [victim] sradd: Source address of neighbor router running BGP [attacker] bgsize: Size of packet which should be no larger than 1024 should allow for xtra header info thru routes num: pulverizations per second |
对比两个地方,一个是直接执行程序返回的信息,前者是不显示任何信息,后者显示帮助,第二个就是strings的输出,明显前者输出内容多,我猜测后面部分包含控制密码。还有更重要的是,这个ttymon起了raw socket听包,这个raw socket必定是用来接收控制者指令,并执行相应的ddos操作的一个通道,后面的事情大家自己想象吧,呵呵。
[root@victim root]# file /etc/sh.conf /etc/sh.conf: ASCII text [root@victim root]# cat /etc/sh.conf 6465d1b20c0c4cd408e34e68e630bc7a - |
[root@victim root]# file /dev/srd0 SuxCWu5vgapmla+YFx6Kw9fmiWgMTnPV7ZmNC2ww |
[root@victim root]# ls -alh /usr/lib/libsh total 104K drwxr-xr-x 6 root root 4.0K Nov 17 16:45 . drwxr-xr-x 133 root root 68K Nov 18 10:13 .. drwxr-xr-x 2 root root 4.0K Nov 8 19:33 .backup -rwxr-xr-x 1 122 114 2.4K Jan 30 2006 .bashrc -rwxr-xr-x 1 122 114 1.8K Feb 19 2003 hide drwxr-xr-x 2 root root 4.0K Nov 8 19:33 .owned -rwxr-xr-x 1 122 114 1.3K Feb 19 2003 shsb drwxr-xr-x 2 root root 4.0K Nov 8 19:33 .sniff drwxr-xr-x 2 root root 4.0K Feb 19 2003 utils [root@victim root]# ls /usr/lib/libsh/.backup/ dir find ifconfig ls lsof md5sum netstat ps pstree slocate top |
[root@victim root]# ls -alh /usr/share/locale/sk/ total 40K drwxr-xr-x 5 root root 4.0K Sep 7 02:02 . drwxr-xr-x 110 root root 4.0K Nov 8 2005 .. -rw-r--r-- 1 root root 6 May 9 2000 charset -rw-r--r-- 1 root root 1.3K Nov 18 2002 entry.desktop drwxr-xr-x 2 root root 16K Nov 8 2005 LC_MESSAGES drwxr-xr-x 2 root root 4.0K Nov 8 2005 LC_TIME drwxr-xr-x 2 root root 4.0K Sep 7 02:02 .sk12 |
sk没启动,因为.sk12都显示出来了,.sniffer文件里也没记录到什么密码,但我对这个sk12还是充满好奇心,sftp托到我本地机器玩玩。
[fatb@baoz ~]$ strings sk | grep -i fuck [fatb@baoz ~]$ file sk sk: ELF invalid class invalid byte order (SYSV) [fatb@baoz ~]$ ./sk Password: Go away with that, poor boy! [fatb@baoz ~]$ ls -al sk sk2rc2/sk -rwxr-xr-x 1 fatb perlish 30799 Nov 11 18:04 sk -rwxr--r-- 1 fatb perlish 30279 Nov 17 06:06 sk2rc2/sk |
[root@victim root]# grep ttyload /etc/inittab #0:2345nce:/usr/sbin/ttyload [root@victim root]# cat /usr/sbin/ttyload /sbin/ttyload -q >/dev/null 2>&1 /sbin/ttymon >/dev/null 2>&1 |
[root@victim root]# ls /usr/lib/libsh/.backup/ dir ifconfig lsof netstat pstree top find ls md5sum ps slocate |
上一页 [1] [2] [3] [4] [5]