Obfuscated TikTok VM का Reverse Engineering
(github.com/LukasOgunfeitimi)- TikTok सुरक्षा और obfuscation लेयर को मजबूत करने के लिए virtual machine (VM) का उपयोग करता है
- यह प्रोजेक्ट इस web-based virtual machine (VM) का reverse engineering करके security bypass और request signing generation के तरीकों का विश्लेषण करता है
- मुख्य लक्ष्य
webmssdk.jsहै, जिसमें X-Bogus और _signature generation से जुड़ा VM code शामिल है - प्रोजेक्ट JavaScript obfuscation को हटाकर, TikTok VM के bytecode का विश्लेषण और decompile करके उसे अर्थपूर्ण function level तक restore करता है
- इसके जरिए authentication की ज़रूरत वाले requests (जैसे comment लिखना) के लिए आवश्यक
_signatureभी generate किया जा सकता है - VM को बहुत परिष्कृत तरीके से डिज़ाइन किया गया है, और इसमें loops, exception handling, scope management जैसी advanced bytecode structures हैं
TikTok VM reverse engineering प्रोजेक्ट का अवलोकन
- TikTok JavaScript-आधारित obfuscated virtual machine (VM) का उपयोग client request signing generation, data protection, और security bypass prevention के लिए करता है
- यह प्रोजेक्ट
webmssdk.jsफ़ाइल को deobfuscate और decompile करके signing algorithms (X-Bogus, _signature) को restore करने का लक्ष्य रखता है
मुख्य फीचर्स और संरचना का विश्लेषण
Deobfuscation
-
TikTok strings को array और bracket notation से index करके obfuscate करता है
r[Gb[301]](Gb[57], e) -
Gbarray का decryption एक fixed string table का उपयोग करके substitution के रूप में किया जाता है -
इस pattern को पूरी तरह decode करने के बाद, इसे पढ़ने में आसान dot notation में बदला जाता है
Function call obfuscation हटाना
-
functions को
Abarray में store किया जाता है और index के जरिए call किया जाता हैAb[31](args) → Ab31(args) -
AST parser का उपयोग करके इन्हें अलग-अलग functions में विभाजित किया जाता है, नाम दिए जाते हैं, और call pattern भी बदला जाता है
Bytecode decryption
-
bytecode base64 + gzip + leb128 + XOR encryption से जटिल रूप में बना है
r = XOR key calculation 압축 해제 및 leb128 디코딩으로 명령어 세트 재구성 -
हर function bytecode-आधारित है, और decompile प्रक्रिया के जरिए function structure को restore किया जाता है
TikTok VM की विशेषताएँ
- nested functions, scope management, exception handling, conditional branching आदि के कारण यह सामान्य VM की तुलना में अधिक उन्नत है
- हर instruction को
switchकी जगहif-elsestructure के रूप में छिपाया गया है → इसे switch case रूप में restore किया जाता है
Decompilation और debugging
- हर bytecode function को सामान्य JS function स्तर तक decompile करके VMxxx.js के रूप में store किया जाता है
- उदाहरण: VM223 एक random character generator है
- debugging, Chrome के Tampermonkey + CSP bypass extension का उपयोग करके की जाती है, जहाँ original JS को decompiled files से replace किया जाता है
Signing विश्लेषण
Request header संरचना
- server request के समय 3 अतिरिक्त headers शामिल होते हैं
msToken: server से जारी होता है, और हर request पर दोबारा generate होता हैX-Bogus:webmssdk.jsमें request के आधार पर generate होता है_signature: authentication आवश्यक requests में उपयोग होता है,webmssdk.jsद्वारा generate किया जाता है
- सामान्य user lookup requests के लिए केवल
X-Bogusकी आवश्यकता होती है - comment posting जैसे authenticated requests के लिए
_signatureभी ज़रूरी होता है
VM function flow
- VM86: पूरे signing generation का entry point
- VM113:
X-Bogusgeneration - VM189:
_signaturegeneration - signer.js के जरिए इस flow को reproduce करके URL signing संभव है
अतिरिक्त protection mechanisms
- mouse tracking: VM120
- environment checks: VM265
- लेकिन ये सभी client-side protections हैं और server communication नहीं करते → signing generation के लिए इन्हें नज़रअंदाज़ किया जा सकता है
सावधानियाँ और maintenance
- TikTok VM को लगातार update किया जाता है → structure बदलने पर नया decompile आवश्यक होगा
- यह प्रोजेक्ट मुख्य रूप से security analysis, bot prevention technology research, और educational purposes के लिए उपयुक्त है
1 टिप्पणियां
Hacker News की राय
मैं एक ऐसी streaming website का इस्तेमाल करता हूँ जो अक्सर रुक जाती है और error message दिखाती है। मैं JavaScript code का विश्लेषण करके समाधान खोज रहा हूँ, और obfuscated code को समझने में AI assistant ने बहुत मदद की
वेब पर चल रही JavaScript file को deobfuscated file से बदलकर TikTok को सामान्य रूप से इस्तेमाल किया जा सकता है
ऐसा लगता है कि code छिपाने के लिए बहुत ज़्यादा मेहनत की जा रही है। इससे program optimization में रुकावट आ सकती है, complexity बढ़ सकती है, और ज़्यादा errors पैदा हो सकते हैं
TikTok VM की reverse engineering का एक उदाहरण bookmarks में मिला
मुझे reverse engineering के प्रयासों पर लिखी गई बातें पढ़ना हमेशा पसंद आता है, और इस बार का लेख follow करना आसान था
social media platform द्वारा इस स्तर की obfuscation इस्तेमाल करने का कोई जायज़ कारण नहीं है
VM क्या है, इस पर एक सवाल
क्या यह Lynx से जुड़ा VM है, इस पर सवाल
iOS app में भी VM है या नहीं, इस पर सवाल
मैंने कुछ समय के लिए TikTok bot पर काम किया था, और वह बहुत कठिन था