Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/411.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在my footer.php中找到带有html链接的未知javascript_Javascript_Apache_Security - Fatal编程技术网

在my footer.php中找到带有html链接的未知javascript

在my footer.php中找到带有html链接的未知javascript,javascript,apache,security,Javascript,Apache,Security,您好,任何人都可以告诉我这段代码是做什么的,因为这是在我的网站的页脚,这实际上是与黑帽搜索引擎优化。下面是它被发现时的样子。如果您能告诉我这是如何进入我的footer.php的,那就太好了 <div id="awesomelinks"> <a href="http://www.361studios.net" style="margin-left:-98901px;" title="Website Design">Website Design</a&g

您好,任何人都可以告诉我这段代码是做什么的,因为这是在我的网站的页脚,这实际上是与黑帽搜索引擎优化。下面是它被发现时的样子。如果您能告诉我这是如何进入我的footer.php的,那就太好了

<div id="awesomelinks">
<a href="http://www.361studios.net" style="margin-left:-98901px;" title="Website         Design">Website Design</a>,
<a href="http://www.361studios.net" style="margin-left:-98902px;" title="Website Creation">Website Creation</a>,
<a href="http://www.uslbarcodefy.org" style="margin-left:-96832px;" title="Sports Skills">Sports Skills</a>,
<a href="http://www.uslbarcodefy.org" style="margin-left:-96833px;" title="Sports Technology">Sports Technology</a>,
<a href="http://www.pinkeyegraphics.com" style="margin-left:-80381px;" title="Graphic Design">Graphic Design</a>,
<a href="http://www.pinkeyegraphics.com" style="margin-left:-80382px;" title="Graphic Organizers">Graphic Organizers</a>,
<a href="http://www.ecoeasycontest.com" style="margin-left:-90012px;" title="Wedding Dresses">Wedding Dresses</a>,
<a href="http://www.ecoeasycontest.com" style="margin-left:-90013px;" title="Evening Dresses">Evening Dresses</a>,
<a href="http://www.replica.im" style="margin-left:-96831px;" title="Replica Handbags">Replica Handbags</a>,
<a href="http://www.replica.im" style="margin-left:-96832px;" title="Replica Watches">Replica Watches</a>,
<a href="http://www.wilmstumorgroup.com" style="margin-left:-91131px;" title="WoW Gold">WoW Gold</a>,<a href="http://www.wilmstumorgroup.com" style="margin-left:-91132px;" title="Cheap WoW Gold">Cheap WoW Gold</a>,
<a href="http://www.wilmstumorgroup.com" style="margin-left:-91133px;" title="Buy WoW Gold">Buy WoW Gold</a>,
<a href="http://www.near-field-communications.org" style="margin-left:-88931px;" title="Iphone Apps">Iphone Apps</a>,
<a href="http://www.near-field-communications.org" style="margin-left:-88932px;" title="Android Apps">Android Apps</a>,
<a href="http://www.bluelikejazzthemovie.net" style="margin-left:-97511px;" title="Movie Reviews">Movie Reviews</a>,
<a href="http://www.bluelikejazzthemovie.net" style="margin-left:-97512px;" title="Movie Ratings">Movie Ratings</a>,
<a href="http://www.russianfashionweek.info" style="margin-left:-87722px;" title="Fashion Shoes">Fashion Shoes</a>,
<a href="http://www.russianfashionweek.info" style="margin-left:-87723px;" title="Fashion Bags">Fashion Bags</a>,
<a href="http://www.urban-management.info" style="margin-left:-93871px;" title="Urban Clothing">Urban Clothing</a>,
<a href="http://www.urban-management.info" style="margin-left:-93872px;" title="Urban Art">Urban Art</a>,
<a href="http://www.tacomalutherannw.com" style="margin-left:-89007px;" title="Cooking Guides">Cooking Guides</a>,
<a href="http://www.tacomalutherannw.com" style="margin-left:-89008px;" title="Cooking Tips">Cooking Tips</a>,
<a href="http://www.noshfordosh.com" style="margin-left:-80831px;" title="Luxury Shopping Guides">Luxury Shopping Guides</a>,
<a href="http://www.noshfordosh.com" style="margin-left:-80832px;" title="Luxury Products">Luxury Products</a>,
<a href="http://www.turnerfreemansa.com" style="margin-left:-89512px;" title="CJC 1295">CJC 1295</a>,
<a href="http://www.turnerfreemansa.com" style="margin-left:-89513px;" title="CJC 1295 Reviews">CJC 1295 Reviews</a>

<script>
eval(function(p,a,c,k,e,d){
    e=function(c){
        return(c<a?"":e(parseInt(c/a)))
        +
        ((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))
    };
    if(!''.replace(/^/,String)){
        while(c--)d[e(c)]=k[c]||e(c);
        k=[function(e){return d[e]}];
        e=function(){return'\\w+'};
        c=1;
    };
    while(c--)if(k[c])
    p = p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);
    return p;
}('2.1(\'0\').5.4="3";',6,6,'bestlinks|getElementById|document|none|display|style'.split('|'),0,{}))
可能的可能性:

你正在与一些人渣网站提供商一起托管,他们会弄乱你的内容,在这种情况下,请运行

更有可能:你被黑客攻击了

2a。您运行的应用程序存在严重的安全漏洞,或者

2b。更有可能的情况是:通常通过FTP管理站点的帐户已被入侵,通常是通过访问站点的客户端计算机。对所有客户端计算机进行多个AV扫描,并在任何检测到AV的地方重新安装操作系统;从轨道上发射核弹,这是唯一确定的方法。更改密码,确保不使用FTP而使用SFTP,删除服务器上的所有代码并替换为已知的良好副本。如果泄露源于更高级别或升级,请通知您的主机。如果它是你自己的机器,也可以考虑从轨道上进行核弹。< / P >这个JS做什么? 如果您将eval更改为alert或console.log,您可以看到它将所有这些废话转换为:

document.getElementById('bestlinks').style.display="none";
实际上,它所做的只是隐藏bestlinks元素

这有什么意义? 有很多可能性。但是看看bestlinks元素,在你的问题中有一个id为awesomelinks的元素。也许这是注入此代码的恶意人员所犯的错误,除非存在另一个具有bestlinks id的元素

正如您所指出的,这显然是blackhat SEO,他们似乎试图将您的站点作为一个节点创建一个搜索引擎,但通过javascript将其隐藏起来,不让您和您的用户看到。它仍然会出现在搜索引擎上,但你和你的用户都不知道

这是怎么发生的? 没有人能从StackOverflow中确切地告诉你。可能有服务器日志表明您的服务器已受损,但可以清除这些日志。最好的办法是将主机视为完全受损的机器,并相应地进行操作。我的猜测是,这是一种利用服务器中现有漏洞/漏洞并自动修改文件的自动攻击。您需要在修改的页面中处理该症状,并确保您不会受到未来的攻击。如果您需要帮助设置安全服务器,您可能应该尝试阅读/询问一个与本主题无关的问题