大网数据广告活动
网站运营与故障问答

How to trace origin of script injected in my webpage

· 52CE 我爱测

I was looking through a static site I created on my local server, in my web browser, and found a curious call to an external script <script src="https://engowe.com/ad.php?u=e38324c56607a8891ad6496ae98e66a1&c=gpupdater&p=1"></scri…

问题原文

原帖链接 · Stumbler · CC BY-SA 3.0

I was looking through a static site I created on my local server, in my web browser, and found a curious call to an external script

<script src="https://engowe.com/ad.php?u=e38324c56607a8891ad6496ae98e66a1&c=gpupdater&p=1"></script>

Placed just before the closing of </head> which leads to this code

My attention was drawn to it by the unescaped ampersands, and I had no memory of putting it there. Checking the source code I found no existence of this script.

I have found this script in other pages of mine, but am not sure what it does, or where it comes from, nor how to go about doing so. The only external javascript libraries I am using are JQuery and modernizer, neither of which I would expect to do this.

More alarming, looking at the sources of my sites resources show a sleuth of material I have no knowledge of. This is particularly perplexing on a static site which, is not live, and has no plugins or external media! At the very least it is putting a significant drag on loading the site (particularly due to a lack of response from a "linkr.us" server), but more to the point I am concerned about security vulnerabilities on my other sites.

How do I go about tracing the origin of what I can only assume is malicious code?

已采纳解答

原帖链接 · Daniel Griscom · CC BY-SA 3.0

This is almost certainly injected into pages on your own machine. Various malware, once installed, adds itself to loaded pages in order to affect the functioning of the page (generally by replacing ads with its own ads so the authors can collect the click revenue). See this question for more info.

To test, check the actual server files, or use cURL or a similar tool to directly retrieve the files. If the server files are fine, try from a completely different machine and see if the code is also injected there.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2015-07-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。