网站被黑客攻击始末by ADMIN on 十一月 07,2017

前几天突然心血来潮向登陆后台写点什么,当时一切正常,WordPress后台可以登录。
然后去吃了个饭回来,网站就打不开了。
当时还以为是恒创主机又抽筋了,刷新了几次终于可以打开,主页却变成了下面这样:

当时就懵逼了,几秒钟后才反应过来不会是黑客攻击了我的网站吧,不会把网站的数据全删了就留了一个这样的页面吧?
马上想到登陆WordPress后台看看到底是怎么回事,可是打开 https://www.aoiai.com/admin 也变成了这个页面。
这下就只能登陆到主机去看个究竟了,登陆主机一看所有的数据都在。
只是把根目录、wp-admin目录、wp-content目录、wp-content/plugins目录、wp-content/themes目录以及单个主题文件夹的index.php内容改成了下面这个:



</html>

<HTML>
<head>
<center>
<title>Hacked by Attacker Gaza</title>

<link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700' rel='stylesheet' type='text/css'>
<meta name="description" content="Hacked by Attacker Gaza"/>
<meta name="googlebot" content="index,follow"/>
<meta name="robots" content="all"/>
<meta name="robots schedule" content="auto"/>
<meta name="distribution" content="global"/>
<base target='_blank'/>
<header>
	<pre> <font color="green">
 
<img border="0" src="https://static.tumblr.com/d2e1cf2f441243e0a5a9b24be7afabcb/jf7lpsn/gSPny5ppz/tumblr_static_tumblr_static__640.gif" width="500" height="279"></p>

</font>	</pre>
</header>
<body onLoad="writetext()" style="background:#090909;">
<font size="10" style="color:#4C9CAF;font-family:Ubuntu Mono;">Hacked By Attacker Gaza</font><br><br><font face="Ubuntu Mono" size="3" color="#4C9CAF">[</font><font face="Ubuntu Mono" size="3" color="white">Palestine Hacker</font><font face="Ubuntu Mono" size="3" color="#4C9CAF">]</font>
</center>
</head>
</body>
</HTML>
<center>
<br><font size="5" style="color:#4C9CAF;font-family:Ubuntu Mono;">Zone-H : GAZA </font><br><br><font face="Ubuntu Mono" size="3" color="#4C9CAF">
<h2>
<script language="JavaScript1.2">
var message=" F0r : Shade - Sxtz - AnonymousFox - Dr.SiLnt HilL - Holako - All My Frinds"
var neonbasecolor="1"
var neontextcolor="#4C9CAF"
var flashspeed=100  //in milliseconds

///No need to edit below this line/////

var n=0
if (document.all||document.getElementById){
document.write('<font color="'+neonbasecolor+'">')
for (m=0;m<message.length;m++)
document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>')
document.write('</font>')
}
else
document.write(message)

function crossref(number){
var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number)
return crossobj
}

function neon(){

//Change all letters to base color
if (n==0){
for (m=0;m<message.length;m++)
//eval("document.all.neonlight"+m).style.color=neonbasecolor
crossref(m).style.color=neonbasecolor
}

//cycle through and change individual letters to neon color
crossref(n).style.color=neontextcolor

if (n<message.length-1)
n++
else{
n=0
clearInterval(flashing)
setTimeout("beginneon()",1500)
return
}
}

function beginneon(){
if (document.all||document.getElementById)
flashing=setInterval("neon()",flashspeed)
}
beginneon()


</script>
</h2>
</font></p>

<center><br><br><font color=green><b></b></font><br></center>

我的解决方法是:首先到https://cn.wordpress.org/下载最新的wordpress压缩包,然后替换掉根目录、插件目录和主题目录下的index.php文件并把权限设置为400,现在就可以登陆后台,下载新的主题,然后把旧的主题全部删除,然后在删除wp-content/cache目录下的所有文件。
从如上种种迹象,在加上我这是一个没什么访问量的小站,可以得出:攻击者应该是用某种软件利用WordPress的漏洞,大批量的随机的进行攻击

There are 2 comments in this article:

  1. FROYO说道:

    太专业了,看来要加强防御,不要太出名,^_^

    1. ADMIN说道:

      @FROYO  过奖了过奖了,我也就是业余水平。