Google CTF 2018 - Shall We Play a Game?
Google CTF 2018 - क्या हम एक खेल खेलें?
यहां APK डाउनलोड करें:
मैं APK को https://appetize.io/ (मुफ्त खाता) पर अपलोड करने जा रहा हूँ ताकि देखा जा सके कि apk कैसे व्यवहार कर रहा है:
लगता है कि आपको झंझट जीतने के लिए 1000000 बार जीतना होगा।
pentesting Android से कदमों का पालन करते हुए आप एप्लिकेशन को डिकॉम्पाइल करके smali कोड प्राप्त कर सकते हैं और jadx का उपयोग करके जावा कोड पढ़ सकते हैं।
जावा कोड पढ़ना:
ऐसा लगता है कि वह फ़ंक्शन जो ध्वज प्रिंट करेगा m().
Smali परिवर्तन
पहली बार m() को कॉल करें
आइए ऐप्लिकेशन को m() को कॉल करने के लिए अगर चर this.o != 1000000 है तो उसे बदल दें, बस शर्त को बदलें:
Google CTF 2018: Shall we play a game?
Android Application Analysis
Task 1: Peruse the app
APK Analysis
Decompile the APK using JADX or APKTool.
Look for interesting strings, APIs, and classes.
Static Analysis
Analyze the source code for vulnerabilities.
Look for sensitive data handling, insecure storage, etc.
Dynamic Analysis
Run the app in an emulator or device.
Monitor network traffic, API calls, and behavior.
Task 2: Find the flag
Reverse Engineering
Use JADX, JEB, or Ghidra for disassembling.
Look for clues, hidden functionalities, or obfuscated code.
File System Analysis
Check for configuration files, databases, or shared preferences.
Look for hardcoded secrets or keys.
Network Traffic Analysis
Capture and analyze the app's network requests.
Look for any sensitive information being transmitted.
Task 3: Exploit the vulnerability
Code Injection
Look for places where user input is not sanitized.
Try injecting code to execute arbitrary commands.
Security Bypass
Identify authentication or authorization flaws.
Attempt to bypass login screens or access restricted functionalities.
Data Tampering
Modify requests/responses to manipulate app behavior.
Try changing parameters to escalate privileges or access unauthorized data.
By following these steps, you can effectively analyze and exploit Android applications for security testing purposes.
Android पेंटेस्टिंग के चरणों का पालन करें ताकि APK को पुनः कंपाइल और साइन किया जा सके। फिर, इसे https://appetize.io/ पर अपलोड करें और देखें कि क्या होता है:
लगता है कि फ्लैग बिना पूरी तरह से डिक्रिप्ट किए बिना लिखा गया है। संभावित है कि m() फ़ंक्शन को 1000000 बार कॉल किया जाना चाहिए।
इसके अलावा इसे करने का एक तरीका यह है कि निर्देश को बदलने की बजाय तुलना की गई निर्देशों को बदलें:
एक और तरीका यह है कि 1000000 के साथ तुलना करने की बजाय, मान को 1 पर सेट करें ताकि this.o को 1 के साथ तुलना किया जाए:
चौथा तरीका यह है कि v9(1000000) के मान को v0 (this.o) में ले जाने के लिए एक निर्देश जोड़ें:
समाधान
जब आप पहली बार जीतते हैं, तो ऐप्लिकेशन को लूप को 100000 बार चलाने के लिए बनाने की आवश्यकता है। इसे करने के लिए, आपको केवल :goto_6 लूप बनाना है और ऐप्लिकेशन वहाँ जाने के लिए जाना चाहिए अगर this.o
100000 का मूल्य नहीं है:
आपको इसे एक भौतिक उपकरण के अंदर करने की आवश्यकता है क्योंकि (मुझे नहीं पता क्यों) यह एक अनुकृत उपकरण में काम नहीं करता।
Last updated