当前位置:网站首页>Attack and defense world mobile--ph0en1x-100
Attack and defense world mobile--ph0en1x-100
2022-07-03 12:39:00 【Passers by. Hello】
1. First of all, will apk Drag in jdx in , Find the program entry point
2. Find the key function
3.getflag() and getSecret() by native function , Roughly speaking getFlag() The string returned by the function encrypts the string after encrpt() Function for encryption comparison
4. There are at least three ways ,fridaHook, Modify pop-up window ,jeb Dynamic debugging .
Method 1 :jeb Dynamic debugging
take apk Drag in jeb in , Additional processes , stay getSecret() Function breakpoint (ctrl+B), function apk
here V1 The supreme act of getflag() Return value , take int Change it to string, obtain flag.
The return value is {ek`[email protected]^x/t^fn0mF^6/^rb`qanqntfg^E`hq|}
Method 2 : Modify pop-up window
take apk Drag in Android Killer, Add the following code (makeText() Of smali Code )
invoke-static {p0, v1, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v1
invoke-virtual {v1}, Landroid/widget/Toast;->show()V
preservation , recompile .
Modification effect
Method 3 :fridaHook
import frida, sys
jscode = """
Java.perform(function(){
Interceptor.attach(Module.findExportByName("libphcm.so","Java_com_ph0en1x_android_1crackme_MainActivity_getFlag"),{
onEnter: function(args) {
},
onLeave: function(retval){
var String_java = Java.use('java.lang.String');
var args_4 = Java.cast(retval, String_java);
send("getFlag()==>"+args_4); }
});
});"""
def on_message(message, data):
if message['type'] == 'send':
print("[*] {0}".format(message['payload']))
else:
print(message)
process = frida.get_usb_device().attach('com.ph0en1x.android_crackme')
script = process.create_script(jscode)
script.on('message', on_message)
script.load()
sys.stdin.read()
Output :
Method four : The same is fridaHook, Method 3 HOOK native, Feeling java Layers can also Hook, Just try
import frida, sys
jscode = """
Java.perform(function(){
var utils = Java.use('com.ph0en1x.android_crackme.MainActivity');
utils.onGoClick.overload("android.view.View").implementation = function (a) { //"int" Indicates the type =" type " string type ="java.lang.string"
console.log("Hook Start...");
var ret = this.getFlag();
send(ret);
send("Success!");
}
});
"""
def on_message(message, data):
if message['type'] == 'send':
print("[*] {0}".format(message['payload']))
else:
print(message)
process = frida.get_usb_device().attach('com.ph0en1x.android_crackme')
script = process.create_script(jscode)
script.on('message', on_message)
script.load()
sys.stdin.read()
Output success :
5. The rest is the solution getSecret(getFlag()) 了
encrypt() The function is to put each of the input strings ASCII Code subtraction 1
To write
Flag = 'ek`[email protected]^x/t^fn0mF^6/^rb`qanqntfg^E`hq|'
result = ''
for i in Flag:
result +=chr(ord(i) + 1)
print(result)
get flag yes flag{Ar3_y0u_go1nG_70_scarborough_Fair}
边栏推荐
- 102. Sequence traversal of binary tree
- Take you to the installation and simple use tutorial of the deveco studio compiler of harmonyos to create and run Hello world?
- 2020-10_ Development experience set
- 239. Sliding window maximum
- 十条职场规则
- 使用BLoC 构建 Flutter的页面实例
- Swift5.7 extend some to generic parameters
- 1-2 project technology selection and structure
- alright alright alright
- 剑指Offer03. 数组中重复的数字【简单】
猜你喜欢
Summary of development issues
Eureka self protection
Sword finger offer03 Repeated numbers in the array [simple]
【附下载】密码获取工具LaZagne安装及使用
ES6 standard
Wechat applet pages always report errors when sending values to the background. It turned out to be this pit!
LeetCode 0556.下一个更大元素 III - 4步讲完
Flutter 退出登录二次确认怎么做才更优雅?
最新版盲盒商城thinkphp+uniapp
1-2 project technology selection and structure
随机推荐
Take you to the installation and simple use tutorial of the deveco studio compiler of harmonyos to create and run Hello world?
Use bloc to build a page instance of shutter
Define a list, store n integers, and calculate the length, maximum value, minimum value and average value of the list
Dix règles de travail
102. Sequence traversal of binary tree
网上炒股开户安不安全?谁给回答一下
239. Sliding window maximum
Wechat applet pages always report errors when sending values to the background. It turned out to be this pit!
How to convert a decimal number to binary in swift
Redis
TOGAF认证自学宝典V2.0
LeetCode 0556.下一个更大元素 III - 4步讲完
20. Valid brackets
Exploration of sqoop1.4.4 native incremental import feature
Self made pop-up input box, input text, and click to complete the event.
Eureka self protection
How to deploy web pages to Alibaba cloud
阿里 & 蚂蚁自研 IDE
雲計算未來 — 雲原生
Solve the problem of VI opening files with ^m at the end