linux IptabLex 攻击
生活随笔
收集整理的這篇文章主要介紹了
linux IptabLex 攻击
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
以下摘自某位老兄的文章,遇到問題一樣,不知道是否是新出的病毒IptabLex大家都知道,互聯(lián)網(wǎng)每時每刻都會存在攻擊的可能性,(系統(tǒng)頻繁發(fā)包,SYN攻擊,等等)安全問題是系統(tǒng)管理員不可忽視的一個問題。當系統(tǒng)出現(xiàn)了問題,我們該如何下手,如何去排查系統(tǒng)問題呢?
正巧,今天公司一臺線上的Linux系統(tǒng)出現(xiàn)了入侵的問題。(其實這已經(jīng)困擾了我快一個月的問題了)(DDOS 系統(tǒng)頻繁發(fā)包)我把我的處理思路分享給大家,如有哪一點說的不到位,請大家指出,并提出寶貴的意見,謝謝。勿噴。
由于是系統(tǒng)在內網(wǎng)發(fā)包,把我們的網(wǎng)絡都堵塞了,以至于我不能遠程登錄到linux系統(tǒng)上,查看cacti流量圖都查看不了。ping也全部丟包。這時去機房也不可能,所以,我只好等待發(fā)包不頻繁的時機,趁此登錄系統(tǒng)。功夫不負有心人,終于遠程登錄上系統(tǒng)了。
由于經(jīng)歷這樣的問題不只一次,所以登錄系統(tǒng)后,直接奔系統(tǒng)進程查看。查看結果如下:
# ps -ef (只顯示可疑進程)
root ? ? ?2013 ? ? 1 ?0 10:01 ? ? ? ? ?00:00:00 /boot/.IptabLex
root ? ? ?5953 ? ? 1 ?0 10:01 ? ? ? ? ?00:00:00 /boot/.IptabLex
root ? ? ?6035 ? ? 1 ?0 10:01 ? ? ? ? ?00:00:00 /boot/.IptabLes
root ? ? 24852 ? ? 1 ?2 14:31 ? ? ? ? ?00:04:29 /boot/.IptabLes
root ? ? 27322 ? ? 1 ?3 15:08 ? ? ? ? ?00:03:50 /boot/.IptabLes
由于程序還在發(fā)作,所以只保留唯一一個進程,剩下的進程全部kill掉,以便排查系統(tǒng)的根源在哪里
# kill -9 5953 6035 24852
查看打開的文件,及系統(tǒng)關聯(lián)的文件都有哪些
# lsof -p 27322 ; lsof -p 2013
COMMAND ? ? PID USER ? FD ? TYPE DEVICE SIZE/OFF ? ?NODE NAME
.IptabLes 27322 root ?cwd ? ?DIR ?253,0 ? ? 4096 ? ? ? 2 /
.IptabLes 27322 root ?rtd ? ?DIR ?253,0 ? ? 4096 ? ? ? 2 /
.IptabLes 27322 root ?txt ? ?REG ?104,1 ?1103243 ? ?5905 /boot/.IptabLes
.IptabLes 27322 root ? ?0u ? REG ?253,0 ? ? ? ?5 ? 98310 /.mylisthbS.pid
.IptabLes 27322 root ? ?1u ? REG ?253,0 ? ? ? ?5 ? 98313 /.mylisthb.pid
.IptabLes 27322 root ? ?2u ?sock ? ?0,5 ? ? ?0t0 3442424 can't identify protocol
.IptabLes 27322 root ? ?3u ? raw ? ? ? ? ? ? 0t0 3445564 00000000:00FF->00000000:0000 st=07
.IptabLes 27322 root ? ?4u ? raw ? ? ? ? ? ? 0t0 3445565 00000000:00FF->00000000:0000 st=07
.IptabLes 27322 root ? ?5u ? raw ? ? ? ? ? ? 0t0 3445566 00000000:00FF->00000000:0000 st=07
COMMAND ? ?PID USER ? FD ? TYPE ?DEVICE SIZE/OFF ?NODE NAME
.IptabLex 2013 root ?cwd ? ?DIR ? 253,0 ? ? 4096 ? ? 2 /
.IptabLex 2013 root ?rtd ? ?DIR ? 253,0 ? ? 4096 ? ? 2 /
.IptabLex 2013 root ?txt ? ?REG ? 104,1 ? 722580 ?5906 /boot/.IptabLex
.IptabLex 2013 root ? ?0u ? REG ? 253,0 ? ? ? ?5 98309 /.mylisthbSx.pid
.IptabLex 2013 root ? ?1uW ?REG ? 253,0 ? ? ? ?5 98311 /.mylisthbx.pid
.IptabLex 2013 root ? ?2u ?IPv4 3479690 ? ? ?0t0 ? TCP 192.168.116.11:10038->59.63.167.168:1001 (ESTABLISHED)
經(jīng)百度查看59.63.167.168的IP為江西省南昌市 電信
查看Cacti流量圖。很遺憾,論壇現(xiàn)在上傳圖片上傳不了。
顯示的結果是 Output ?300M 跑滿了。
查看產(chǎn)生的可疑所有的文件。
# ll -a / ? (只顯示可疑的文件)
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 17:15 .mylisthb.pid
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 10:01 .mylisthbS.pid
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 10:01 .mylisthbSx.pid
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 16:57 .mylisthbx.pid
查看/boot/分區(qū)下
# ll -a /boot/
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 10:01 .IptabLes?
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 10:01 .IptabLex?
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 10:01 IptabLes -> /etc/rc.d/init.d/IptabLes
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 10:01 IptabLex -> /etc/rc.d/init.d/IptabLex
查看/etc/rc.d/init.d/IptabLex和/etc/rc.d/init.d/IptabLes文件內容
# cat /etc/rc.d/init.d/IptabLex?
#!/bin/sh
/boot/.IptabLex
exit 0
# cat /etc/rc.d/init.d/IptabLes
#!/bin/sh
/boot/.IptabLes
exit 0
查看兩個文件的文件類型,可知是32位的可執(zhí)行文件
# file /boot/.IptabLex
.IptabLex: sticky ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, statically linked, not stripped
# file /boot/.IptabLes
.IptabLes: sticky ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, statically linked, not stripped
查看message信息
# cat /var/log/message
Jan 12 11:36:24 localhost kernel: .IptabLes[12688]: segfault at 0000000000000000 rip 000000000804e837 rsp 00000000ffeb1fb0 error 4
Jan 12 11:36:39 localhost kernel: .IptabLes[12706]: segfault at 0000000000000000 rip 000000000804e837 rsp 00000000ffeb1fb0 error 4
Jan 12 11:36:54 localhost kernel: .IptabLes[12723]: segfault at 0000000000000000 rip 000000000804e837 rsp 00000000ffeb1fb0 error 4
Jan 12 11:37:10 localhost kernel: .IptabLes[12739]: segfault at 0000000000000000 rip 000000000804e837 rsp 00000000ffeb1fb0 error 4
Jan 12 11:37:46 localhost kernel: .IptabLes[12756]: segfault at 0000000000000000 rip 000000000804e837 rsp 00000000ffeb1fb0 error 4
處理方法,刪除關聯(lián)的文件
# rm -f /.mylisthb* ? 產(chǎn)生的pid文件
# rm -f /boot/.IptabLex
# rm -f /boot/..IptabLes ? ? ? ? ? ? ?編譯后的二進制文件
# rm -f /etc/rc.d/init.d/IptabLex
# rm -f /etc/rc.d/init.d/IptabLes
正巧,今天公司一臺線上的Linux系統(tǒng)出現(xiàn)了入侵的問題。(其實這已經(jīng)困擾了我快一個月的問題了)(DDOS 系統(tǒng)頻繁發(fā)包)我把我的處理思路分享給大家,如有哪一點說的不到位,請大家指出,并提出寶貴的意見,謝謝。勿噴。
由于是系統(tǒng)在內網(wǎng)發(fā)包,把我們的網(wǎng)絡都堵塞了,以至于我不能遠程登錄到linux系統(tǒng)上,查看cacti流量圖都查看不了。ping也全部丟包。這時去機房也不可能,所以,我只好等待發(fā)包不頻繁的時機,趁此登錄系統(tǒng)。功夫不負有心人,終于遠程登錄上系統(tǒng)了。
由于經(jīng)歷這樣的問題不只一次,所以登錄系統(tǒng)后,直接奔系統(tǒng)進程查看。查看結果如下:
# ps -ef (只顯示可疑進程)
root ? ? ?2013 ? ? 1 ?0 10:01 ? ? ? ? ?00:00:00 /boot/.IptabLex
root ? ? ?5953 ? ? 1 ?0 10:01 ? ? ? ? ?00:00:00 /boot/.IptabLex
root ? ? ?6035 ? ? 1 ?0 10:01 ? ? ? ? ?00:00:00 /boot/.IptabLes
root ? ? 24852 ? ? 1 ?2 14:31 ? ? ? ? ?00:04:29 /boot/.IptabLes
root ? ? 27322 ? ? 1 ?3 15:08 ? ? ? ? ?00:03:50 /boot/.IptabLes
由于程序還在發(fā)作,所以只保留唯一一個進程,剩下的進程全部kill掉,以便排查系統(tǒng)的根源在哪里
# kill -9 5953 6035 24852
查看打開的文件,及系統(tǒng)關聯(lián)的文件都有哪些
# lsof -p 27322 ; lsof -p 2013
COMMAND ? ? PID USER ? FD ? TYPE DEVICE SIZE/OFF ? ?NODE NAME
.IptabLes 27322 root ?cwd ? ?DIR ?253,0 ? ? 4096 ? ? ? 2 /
.IptabLes 27322 root ?rtd ? ?DIR ?253,0 ? ? 4096 ? ? ? 2 /
.IptabLes 27322 root ?txt ? ?REG ?104,1 ?1103243 ? ?5905 /boot/.IptabLes
.IptabLes 27322 root ? ?0u ? REG ?253,0 ? ? ? ?5 ? 98310 /.mylisthbS.pid
.IptabLes 27322 root ? ?1u ? REG ?253,0 ? ? ? ?5 ? 98313 /.mylisthb.pid
.IptabLes 27322 root ? ?2u ?sock ? ?0,5 ? ? ?0t0 3442424 can't identify protocol
.IptabLes 27322 root ? ?3u ? raw ? ? ? ? ? ? 0t0 3445564 00000000:00FF->00000000:0000 st=07
.IptabLes 27322 root ? ?4u ? raw ? ? ? ? ? ? 0t0 3445565 00000000:00FF->00000000:0000 st=07
.IptabLes 27322 root ? ?5u ? raw ? ? ? ? ? ? 0t0 3445566 00000000:00FF->00000000:0000 st=07
COMMAND ? ?PID USER ? FD ? TYPE ?DEVICE SIZE/OFF ?NODE NAME
.IptabLex 2013 root ?cwd ? ?DIR ? 253,0 ? ? 4096 ? ? 2 /
.IptabLex 2013 root ?rtd ? ?DIR ? 253,0 ? ? 4096 ? ? 2 /
.IptabLex 2013 root ?txt ? ?REG ? 104,1 ? 722580 ?5906 /boot/.IptabLex
.IptabLex 2013 root ? ?0u ? REG ? 253,0 ? ? ? ?5 98309 /.mylisthbSx.pid
.IptabLex 2013 root ? ?1uW ?REG ? 253,0 ? ? ? ?5 98311 /.mylisthbx.pid
.IptabLex 2013 root ? ?2u ?IPv4 3479690 ? ? ?0t0 ? TCP 192.168.116.11:10038->59.63.167.168:1001 (ESTABLISHED)
經(jīng)百度查看59.63.167.168的IP為江西省南昌市 電信
查看Cacti流量圖。很遺憾,論壇現(xiàn)在上傳圖片上傳不了。
顯示的結果是 Output ?300M 跑滿了。
查看產(chǎn)生的可疑所有的文件。
# ll -a / ? (只顯示可疑的文件)
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 17:15 .mylisthb.pid
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 10:01 .mylisthbS.pid
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 10:01 .mylisthbSx.pid
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 16:57 .mylisthbx.pid
查看/boot/分區(qū)下
# ll -a /boot/
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 10:01 .IptabLes?
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 10:01 .IptabLex?
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 10:01 IptabLes -> /etc/rc.d/init.d/IptabLes
-rw-r--r-- ? 1 root ?root ? ? ?5 Jan 12 10:01 IptabLex -> /etc/rc.d/init.d/IptabLex
查看/etc/rc.d/init.d/IptabLex和/etc/rc.d/init.d/IptabLes文件內容
# cat /etc/rc.d/init.d/IptabLex?
#!/bin/sh
/boot/.IptabLex
exit 0
# cat /etc/rc.d/init.d/IptabLes
#!/bin/sh
/boot/.IptabLes
exit 0
查看兩個文件的文件類型,可知是32位的可執(zhí)行文件
# file /boot/.IptabLex
.IptabLex: sticky ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, statically linked, not stripped
# file /boot/.IptabLes
.IptabLes: sticky ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, statically linked, not stripped
查看message信息
# cat /var/log/message
Jan 12 11:36:24 localhost kernel: .IptabLes[12688]: segfault at 0000000000000000 rip 000000000804e837 rsp 00000000ffeb1fb0 error 4
Jan 12 11:36:39 localhost kernel: .IptabLes[12706]: segfault at 0000000000000000 rip 000000000804e837 rsp 00000000ffeb1fb0 error 4
Jan 12 11:36:54 localhost kernel: .IptabLes[12723]: segfault at 0000000000000000 rip 000000000804e837 rsp 00000000ffeb1fb0 error 4
Jan 12 11:37:10 localhost kernel: .IptabLes[12739]: segfault at 0000000000000000 rip 000000000804e837 rsp 00000000ffeb1fb0 error 4
Jan 12 11:37:46 localhost kernel: .IptabLes[12756]: segfault at 0000000000000000 rip 000000000804e837 rsp 00000000ffeb1fb0 error 4
處理方法,刪除關聯(lián)的文件
# rm -f /.mylisthb* ? 產(chǎn)生的pid文件
# rm -f /boot/.IptabLex
# rm -f /boot/..IptabLes ? ? ? ? ? ? ?編譯后的二進制文件
# rm -f /etc/rc.d/init.d/IptabLex
# rm -f /etc/rc.d/init.d/IptabLes
因為這個文件發(fā)包基于什么協(xié)議,或者基于什么系統(tǒng)命令發(fā)包尚未清楚,所以在iptables這無法斷定基于什么協(xié)議或者基于什么端口進行限制。待大家給一些寶貴的意見。
以上文件刪除之后還是會再出現(xiàn),最后把wget軟件刪除才沒再出現(xiàn)
總結
以上是生活随笔為你收集整理的linux IptabLex 攻击的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 某释放驱动的样本分析及手杀报告
- 下一篇: showModalDialog页面