news 2026/6/2 13:51:57

web 美团 mtgsig

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
web 美团 mtgsig

声明

本文章中所有内容仅供学习交流使用,不用于其他任何目的,抓包内容、敏感网址、数据接口等均已做脱敏处理,严禁用于商业用途和非法用途,否则由此产生的一切后果均与作者无关!

分析图

启动流程在这里,发起xml进去加密地方。根据true/false生成在url后面还是请求头里面。

加密文件

大部分关键代码

!(() => { "use strict"; const $toString = Function.toString; const myFunction_toString_symbol = Symbol('('.concat('', ')_', (Math.random() + '').toString(36))); const myToString = function () { return typeof this == 'function' && this[myFunction_toString_symbol] || $toString.call(this); }; function set_native(func, key, value) { Object.defineProperty(func, key, { "enumerable": false, "configurable": true, "writable": true, "value": value }) }; delete Function.prototype['toString']; //删除原型链上的toString set_native(Function.prototype, "toString", myToString); //自己定义个getter方法 set_native(Function.prototype.toString, myFunction_toString_symbol, "function toString() { [native code] }"); //套个娃 保护一下我们定义的toString 否则就暴露了 this.func_set_natvie = (func) => { set_native(func, myFunction_toString_symbol, `function ${myFunction_toString_symbol, func.name || ''}() { [native code] }`); }; //导出函数到globalThis }).call(this); const XMLHttpRequest = require('xhr2'); Window = function Window() { throw new TypeError('Illegal constructor') }; this.func_set_natvie(Window); Window.prototype.PERSISTENT = 1 Window.prototype.TEMPORARY = 0 Navigator = function Navigator() { throw new TypeError('Illegal constructor') }; this.func_set_natvie(Navigator); window = global Object.defineProperties(Window.prototype, { [Symbol.toStringTag]: { value: 'Window', configurable: true } }) Object.defineProperties(Navigator.prototype, { [Symbol.toStringTag]: { value: 'Navigator', configurable: true } }) window.__proto__ = Window.prototype window.DataView = function DataView() { console.log('window.DataView', arguments) }; this.func_set_natvie(DataView); window.Notification = function Notification() { console.log('window.Notification', arguments) }; this.func_set_natvie(Notification); location ={ } screen = {} screen.width = 0 screen.height = 0 screen.availHeight = 0 screen.availWidth = 0 screen.orientation = { } screen.pixelDepth = 24 screen.colorDepth = 24 window.XMLHttpRequest = function XMLHttpRequest() { console.log('window.XMLHttpRequest'.arguments) return { open: function open() { }, send: function send() { } } } window.MouseEvent = function MouseEvent() { console.log('window.MouseEvent'.arguments) } window.scroll = function scroll() { console.log('window.scroll'.arguments) } window.scrollBy = function scrollBy() { console.log('window.scrollBy'.arguments) } window.scrollBy = function scrollBy() { console.log('window.scrollBy'.arguments) } window.WebGLRenderingContext = function WebGLRenderingContext() { console.log('window.WebGLRenderingContext'.arguments) } window.H5guardCount = 1 window.wPaths = [] window.xhrHook = true window.fetchHook = true window.xhrHooked = true window.xhrHook = true window.xhrHooked = true window.onbeforeinstallprompt = null window.onhashchange = null window.ondevicemotion = null window.ondeviceorientation = null window.ondeviceorientationabsolute = null setInterval = function () { } setTimeout = function () { } Navigator.toString = function toString() { return 'function Navigator() { [native code] }' }; this.func_set_natvie(Navigator.toString); navigator = {} navigator.__proto__ = Navigator.prototype window.self = window window.top = window window.localStorage ={} window.document = {} document.createEvent = function createEvent(type) { console.log('document.createEvent', arguments) } document.cookie = {} document.documentElement = { appendChild: function appendChild() { console.log('appendChild') }, removeChild: function removeChild() { console.log('removeChild') }, clientHeight: 760, clientWidth: 150, scrollTop: function scrollTop() { } } window.sessionStorage = {} window.localStorage.clear = function clear() { var temp = Object.keys(this) for (var i = 0; i < temp.length; i++) { delete this[temp[i]]; } }; window.sessionStorage.clear = function clear() { var temp = Object.keys(this) for (var i = 0; i < temp.length; i++) { delete this[temp[i]]; } }; window.localStorage.getItem = function getItem(key) { return this[key] }; window.sessionStorage.getItem = function getItem(key) { return this[key] }; window.localStorage.key = function key(index) { return Object.keys(this)[index] }; window.sessionStorage.key = function key(index) { return Object.keys(this)[index] }; window.localStorage.removeItem = function removeItem(key) { delete this[key] }; window.sessionStorage.removeItem = function removeItem(key) { delete this[key] }; window.localStorage.setItem = function setItem(key, value) { this[key] = value }; window.sessionStorage.setItem = function setItem(key, value) { this[key] = value }; window.fetchHooked = true window.wDomains =[ ] window.name = '' window.indexedDB = {} window._phantom = undefined window.phantom = undefined window.callPhantom = undefined navigator.plugins = [{name: "PDF Viewer"}, {name: "Chrome PDF Viewer"}, {name: "Chromium PDF Viewer"}, {name: "Microsoft Edge PDF Viewer"}, {name: "WebKit built-in PDF"}] oph = Object.prototype.hasOwnProperty Object.prototype.hasOwnProperty = function hasOwnProperty(val) { if (val === 'webdriver') { return false } return oph.apply(this, arguments) document.body = { appendChild: function appendChild() { }, removeChild: function removeChild() { }, scrollTop: 0 } window.AudioContext = function AudioContext() { console.log('window.AudioContext', arguments) } window.status = '' window.frameElement = null window.onsearch = null window.external = {} window.styleMedia = {type: "screen"} window.isSecureContext = true window.getSelection = function getSelection() { return { anchorOffset: 0, baseOffset: 0, extentOffset: 0, focusOffset: 0, isCollapsed: true, rangeCount: 0, type: "None", } } window.find = function find() { console.log("window.find", arguments) } window.dispatchEvent = function dispatchEvent() { console.log("window.dispatchEvent ", arguments) } window.postMessage = function postMessage() { console.log("window.postMessage", arguments) } window.removeEventListener = function removeEventListener() { console.log("window.removeEventListener", arguments) } document.removeEventListener = function removeEventListener(val1, val2) { console.log("document.removeEventListener", arguments) } window.addEventListener = function addEventListener(val1, val2, val3) { console.log("window.addEventListener", arguments) // val2() } window.PointerEvent = function PointerEvent() { console.log('windo.wPointerEvent', arguments) } document.addEventListener = function addEventListener(val1, val2, val3) { } window.createImageBitmap = function createImageBitmap() { console.log("window.createImageBitmap", arguments) } navigator.sendBeacon = function sendBeacon() { console.log('navigator.sendBeacon', arguments) } navigator.javaEnabled = function javaEnabled() { console.log('navigator.javaEnabled', arguments) } navigator.vibrate = function vibrate() { console.log('navigator.vibrate', arguments) } navigator.userActivation = { hasBeenActive: true, isActive: false } navigator.mediaSession = { playbackState: "none" } navigator.clipboard = {} navigator.credentials = {} navigator.keyboard = {} navigator.locks = {} navigator.mediaCapabilities = {} navigator.onLine = true navigator.serviceWorker = {} navigator.storage = {} navigator.presentation = {} navigator.bluetooth = {} navigator.usb = {}

结果

总结

1.出于安全考虑,本章未提供完整流程,调试环节省略较多,只提供大致思路,具体细节要你自己还原,相信你也能调试出来。

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/6/2 13:48:02

基于W5100S与CircuitPython的Pico网络时钟实现

1. 项目概述&#xff1a;为你的Pico装上“网络时钟”在物联网和嵌入式开发里&#xff0c;时间是个既基础又关键的东西。想想看&#xff0c;一个环境监测节点记录的数据&#xff0c;如果时间戳是乱的&#xff0c;你根本没法分析温度变化的趋势&#xff1b;一个智能家居的联动场景…

作者头像 李华
网站建设 2026/6/2 13:45:57

电路设计入门:从欧姆定律到光控夜灯实践

1. 项目概述&#xff1a;从零开始的电路设计之旅如果你对电子世界充满好奇&#xff0c;看着手机、电脑或者身边各种智能设备&#xff0c;总想拆开看看里面那些密密麻麻的线路和元件到底是如何工作的&#xff0c;那么恭喜你&#xff0c;你已经站在了电路设计这个奇妙世界的大门口…

作者头像 李华
网站建设 2026/6/2 13:38:57

Turnigy 9X遥控器升级FrSky XJT模块实战:从500米到2公里的蜕变

1. 项目概述与核心价值如果你手头有一台Turnigy 9X遥控器&#xff0c;大概率会对它又爱又恨。爱的是它极高的性价比和扎实的硬件底子&#xff0c;恨的是那原厂射频模块孱弱的、标称只有500米左右的遥控距离。在FPV穿越机或者固定翼航模的飞行中&#xff0c;这个距离限制就像一根…

作者头像 李华
网站建设 2026/6/2 13:38:57

AI语音合成无障碍应用实战手册(工信部认证级部署流程全公开)

更多请点击&#xff1a; https://intelliparadigm.com 第一章&#xff1a;AI语音合成无障碍应用的战略价值与政策合规全景 AI语音合成技术正从内容生成工具跃升为数字包容性基础设施的核心组件。在老龄化加速与残障人口数字化需求激增的双重背景下&#xff0c;高质量、低延迟、…

作者头像 李华