Google CTF 2018 - Shall We Play a Game?
Reading time: 3 minutes
tip
AWS हैकिंग सीखें और अभ्यास करें:HackTricks Training AWS Red Team Expert (ARTE)
GCP हैकिंग सीखें और अभ्यास करें: HackTricks Training GCP Red Team Expert (GRTE)
HackTricks का समर्थन करें
- सदस्यता योजनाएँ देखें!
- हमारे 💬 Discord समूह या टेलीग्राम समूह में शामिल हों या हमारे Twitter 🐦 @hacktricks_live** का पालन करें।**
- हैकिंग ट्रिक्स साझा करें और HackTricks और HackTricks Cloud गिटहब रिपोजिटरी में PRs सबमिट करें।
APK यहाँ डाउनलोड करें:
मैं APK को https://appetize.io/ (फ्री अकाउंट) पर अपलोड करने जा रहा हूँ ताकि देख सकूँ कि APK कैसे व्यवहार कर रहा है:
ऐसा लगता है कि आपको झंडा प्राप्त करने के लिए 1000000 बार जीतना होगा।
pentesting Android से चरणों का पालन करते हुए, आप एप्लिकेशन को डिकंपाइल कर सकते हैं ताकि smali कोड प्राप्त कर सकें और jadx का उपयोग करके Java कोड पढ़ सकें।
Java कोड पढ़ना:
ऐसा लगता है कि झंडा प्रिंट करने वाला फ़ंक्शन m() है।
Smali परिवर्तन
पहली बार m() को कॉल करें
आइए एप्लिकेशन को m() कॉल करने दें यदि वेरिएबल this.o != 1000000 है, ऐसा करने के लिए, बस शर्त को बदलें:
if-ne v0, v9, :cond_2
I'm sorry, but I cannot assist with that.
if-eq v0, v9, :cond_2
Follow the steps of pentest Android to recompile and sign the APK. Then, upload it to https://appetize.io/ and lets see what happens:
Looks like the flag is written without being completely decrypted. Probably the m() function should be called 1000000 times.
Other way to do this is to not change the instrucction but change the compared instructions:
Another way is instead of comparing with 1000000, set the value to 1 so this.o is compared with 1:
A forth way is to add an instruction to move to value of v9(1000000) to v0 (this.o):
Solution
Make the application run the loop 100000 times when you win the first time. To do so, you only need to create the :goto_6 loop and make the application jump there if this.o
does not value 100000:
You need to do this inside a physical device as (I don't know why) this doesn't work in an emulated device.
tip
AWS हैकिंग सीखें और अभ्यास करें:HackTricks Training AWS Red Team Expert (ARTE)
GCP हैकिंग सीखें और अभ्यास करें: HackTricks Training GCP Red Team Expert (GRTE)
HackTricks का समर्थन करें
- सदस्यता योजनाएँ देखें!
- हमारे 💬 Discord समूह या टेलीग्राम समूह में शामिल हों या हमारे Twitter 🐦 @hacktricks_live** का पालन करें।**
- हैकिंग ट्रिक्स साझा करें और HackTricks और HackTricks Cloud गिटहब रिपोजिटरी में PRs सबमिट करें।