V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
FlossStunning
V2EX  ›  分享发现

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

  •  
  •   FlossStunning · 266 天前 · 1211 次点击
    这是一个创建于 266 天前的主题,其中的信息可能已经有所发展或是发生改变。

    起因是 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 请求更多信息:

    • POST /index/list返回视频相关信息,包括标题、id 、缩略图等
    • POST /index/index 返回更多信息,包括网页标题、付费信息等

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

    • ICP 许可证号:辽 ICP 备 2023005697 号
    • 审核通过日期:2023-06-25
    • 主办单位名称:铁岭县云逸软件技术工作室
    • 主办单位性质:企业

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

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

    2 条回复    2023-08-10 16:12:00 +08:00
    yedanten
        1
    yedanten  
       265 天前 via Android
    好思路
    ccpj
        2
    ccpj  
       265 天前
    牛逼,看跪了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1750 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 00:28 · PVG 08:28 · LAX 17:28 · JFK 20:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.