当前位置:网站首页>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()Vpreservation , 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}

边栏推荐
- 242. Effective letter heteronyms
- Everything comes to him who waits
- LeetCode 0556. Next bigger element III - end of step 4
- 2.9 overview of databinding knowledge points
- Cloud Computing future - native Cloud
- Exploration of sqoop1.4.4 native incremental import feature
- 2.6 preliminary cognition of synergetic couroutines
- elastic_ L04_ introduction. md
- 双链笔记·思源笔记综合评测:优点、缺点、评价
- Implement verification code verification
猜你喜欢

ES6 standard

initial、inherit、unset、revert和all的区别

剑指Offer05. 替换空格

使用BLoC 构建 Flutter的页面实例

记录自己vulnhub闯关记录

Swift bit operation exercise

剑指Offer10- I. 斐波那契数列

Sword finger offer10- I. Fibonacci sequence

idea将web项目打包成war包并部署到服务器上运行

Public and private account sending prompt information (user microservice -- message microservice)
随机推荐
Alibaba is bigger than sending SMS (user microservice - message microservice)
I'm too lazy to write more than one character
(最新版) Wifi分销多开版+安装框架
在网上炒股开户可以吗?资金安全吗?
Tensorflow binary installation & Failure
Swift return type is a function of function
Sword finger offer10- I. Fibonacci sequence
启用MemCached的SASL认证
Integer int compare size
2020-11_ Technical experience set
Adult adult adult
Define a list, store n integers, and calculate the length, maximum value, minimum value and average value of the list
[download attached] password acquisition tool lazagne installation and use
Nodejs+express+mysql realizes login function (including verification code)
2.9 overview of databinding knowledge points
Pytext training times error: typeerror:__ init__ () got an unexpected keyword argument 'serialized_ options'
01_ Using the concurrent tool class library, is thread safety safe
T430 toss and install OS majave 10.14
Introduction to concurrent programming (I)
elastic_ L01_ summary