서버해킹 index.html 이 다르다?

zerock75의 이미지

아는 업체에서 문의가 들어왔습니다.

로그분석을 하는데 로그가 제대로 잡히질 않는다는군요.

해서 이것저것 해보니 이상한 점이 발견되었습니다.

리눅스에서 wget http://www.xxx.com 을 실행하면 index.html 파일을 받아옵니다.

해당 index.html 파일을 열어보면 실제 xxx.com 의 index.html 파일과 다릅니다.

wget 을 통해 받아온 index.html 파일에는 다음의 스크립이 작성되어 있습니다.

============================================
<body><script>function decoder(){var fan=new Array(247,64,4,23,87,117,244,51,55,145,162,42,2,66,245,116,194,106,170,122,23,175,51,72);var pssb=21;do{fan[pssb]=((fan[pssb]<<6)&0xff)|(fan[pssb]>>2);fan[pssb]=()&0xff;}while(—pssb>=2);var pssb=20;while(pssb>=3){fan[pssb]=((((((-fan[pssb])&0xff)-3)&0xff)<<2)&0xff)|(((((-fan[pssb])&0xff)-3)&0xff)>>6);pssb—;}var pssb=20;do{if(pssb<2)break;fan[pssb]=((fan[pssb]^fan[0])9)&0xff;fan[pssb]=((fan[pssb]<<3)&0xff)|(fan[pssb]>>5);pssb—;}while(true);return String.fromCharCode(fan2,fan3,fan4,fan5,fan6,fan8,fan10,fan11,fan14,fan15,fan16,fan18,fan20,fan22);}window.location="/?"+decoder();</script><br><br><center><h3>Need to enable JavaScript to access the page</h3></center></body>
============================================

실제 서버에 올라가 있는 index.html 파일에는 위의 소스가 삽입되어 있지 않습니다.

이런 종류의 해킹방법을 무엇이라 하며 이에 대한 해결방법과 예방책으로는 어떤 것이 있을까요?

추가.
1. 위의 스크립트를 실행하면 내컴퓨터의 C:\가 열립니다.
2. 서버에서 index.html, index.php 파일등을 모두 제거해도 wget은 위의 스크립트를 받아옵니다.

ydhoney의 이미지

돌고 있는 웹서버가 다르겠죠. MS창문서버인지 리눅스서버인지는 모르겠으나(C:가 통째로 열린다니 창문서버?) 그냥 계정 통째로 뚫리신 듯. 계정 PW 전부 다 바꾸시거나 새로 까세요. 물론 패스워드는 다르게..

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.