先說個抱歉,這我第一次當出題者,出的不是很好 不知道為什麼這麼少人解w
First of all, I would like to apologize. This is my first time as a question maker, and my results are not very good. I don’t know why so few people solved
(Sorry, my english…I ues google translater)
Kid game
講在前面 Tell it in front
會出這題是因為學校課程在教用Appinventor設計APP,我發現它有個有趣的function,就去簡單逆一下,發現蠻容易反混淆的,於是就有了這題Reverse
This question came up because the school course taught how to use Appinventor to design APPs. I found that it had an interesting function, so I simply reversed it and found that it was quite easy to reverse obfuscation, so I came up with this question Reverse.
Writeup
在安卓手機或模擬器開
Open on Android phone or emulator
將apk反編譯,這邊是用www.decompiler.com
Decompile apk, here we usewww.decompiler.com
因為遊戲畫面中有提到flag,直接搜尋keyword flag,看附近關鍵程式碼,得知關鍵應該是被混淆的東西
Because flag is mentioned in the game screen, I directly search for keyword flag and look at the nearby key code to know that the key should be something that has been confused.
去分析反混淆function
Go analyze the anti-obfuscation function
寫腳本反混淆Screen1.java的\u0016\u0005\u0018\u0000\u0018\f\u0005\t\u001b\t.\u0010\t;\u0018\u0000\u000f\u001b\u000f\u0002\u0000\u000f\u0015\u0019\r\f
KEY jpapuipn
怎麼寫 問就是chatGPT
Write a script to deobfuscate with chatGPT
1 | def text_deobfuscate(text, key): |
FLAG:flag{patch_or_deobfuscate}
其實也可以patchIn fact, you can also patch
Screen1.java
1 | if (runtime.callYailPrimitive(moduleMethod, LList.list2(runtime.getProperty$1(simpleSymbol, simpleSymbol2), runtime.callYailPrimitive(runtime.text$Mndeobfuscate, LList.list2("\u0010\f\u0004\u0004", "rcgbiqei"), Lit33, "deobfuscate text")), Lit34, "=") == Boolean.FALSE) { |
==
patch to !=