一个多重伪装,限制手机访问的黄网

287 天前
 FlossStunning

起因是 QQ 群有片哥发黄网链接,但使用了腾讯云负载均衡域名(tencentclb.com)来逃避网址检测。尝试访问了一下,发现其经过多层跳转,电脑上会直接跳转到百度,而手机需要国内 IP 则可正常用浏览器访问。

最开始提供的链接指向腾讯云香港的负载均衡临时网址 <lb-kfs13hew-1s0ag78po9xtd36v.clb.ap-hongkong.tencentclb.com>

访问后返回 302 ,跳转地址为托管在腾讯云成都对象存储上的 Vue SPA http://zuolun-2a-1319846762.cos.ap-chengdu.myqcloud.com/index.html?code=MnU10e4xB1&q7W,此处的 code 在不同设备使用不同 ip 访问时并不会改变。

JS 经过 Vite 打包和混淆,其中主要逻辑部分如下:

setup(e) {
    function t(f) {
        for (var _location$search$substring = window.location.search.substring(1), _location$search$substring$split = _location$search$substring.split("&"), num_val = 0; num_val < _location$search$substring$split.length; num_val++) {
            var _location$search$substring$split$num_val$split = _location$search$substring$split[num_val].split("=");
            if (_location$search$substring$split$num_val$split[0] == f) {
                return _location$search$substring$split$num_val$split[1];
            }
        }
        return false;
    }
    var r = {
        win: false,
        mac: false,
        xll: false
    };
    var platform = navigator.platform;
    r.win = platform.indexOf("Win") == 0;
    r.mac = platform.indexOf("Mac") == 0;
    r.x11 = platform == "X11" || platform.indexOf("Linux") == 0;
    var s = t("rid");
    var i = t("t");
    if (s == false) {
        s = 0;
    }
    if (i == false) {
        i = 0;
    }
    var o = t("test");
    if (o != "xxx93" && (r.win || r.mac || r.xll)) {
        window.location.href = "https://www.baidu.com";
    } else {
        var l = t("code");
        if (l == false) {
            l = t("d");
        }
        l ? Pu.get("http://8.212.41.88/api/gettoken?code=" + l + "&rid=" + s + "&t=" + i).then(function (f) {
            console.log(f);
            window.location.href = f.data.url;
        }).catch(function (f) {
            console.log(f);
            window.location.href = "https://jd.com";
        }) : window.location.href = "https://www.baidu.com";
    }
    return (f, c) => (pi(), mi("h1", null, "安全检测中~"));
}

通过检测浏览器 Platform 和 UA 排除 Windows/MacOS/Linux 平台,重定向到百度首页;之后访问某个 API ,IP 地址属于阿里云香港。

经过试验,只有当code正确时,API 才会返回如下地址,否则会返回百度首页:

{"url":"http:\/\/zuol-pingsshi-1319822538.cos.ap-chengdu.myqcloud.com\/index.html#\/regtoken?ttname=*******************&code=MnU10e4xB1&rid=0&t=0"}

随后继续跳转到该地址,此处会进行第二次平台检测,若失败则返回 404/500 ,此时页面标题为“闲人博客”;若通过检测则继续往 API 请求更多信息:

图片和视频资源全都托管在shao.ukssozw.cn上,该域名使用了华为云 CDN ,并且有北岸

通过 whois 查询可知该域名注册人为陈嘉铭,注册商为阿里云。

至此该网站成功利用腾讯云免备案的负载均衡与对象存储的临时域名,规避了 QQ 的网址安全检测,从而实现在社交平台的传播。

1252 次点击
所在节点    分享发现
2 条回复
yedanten
286 天前
好思路
ccpj
286 天前
牛逼,看跪了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/963851

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX