Reveal简介
Reveal能查看iOS App的视图布局,而且能在App运行时进行视图调试。
破解过程
下载下来打开后,出现一个Welcome窗口挡在上面
想看看这个Welcome窗口属于哪个类,考虑用Xcode的
View UI Hierarchy
:打开
Xcode
,File -> New -> Project...
,选择 macOS -> Cocoa Framework
工程创建好后,
Debug -> Attach to Process
,选择Reveal
Could not attach
Attach失败,应该是开启了反调试。
hopper
打开Reveal.app/Contents/MacOS/Reveal
,搜索ptrace
,找到调用的地方:
0000000100340632 call imp___stubs__ptrace
Modify -> Assemble Instruction...
,输入jmp 100340637
:
0000000100340632 jmp EntryPoint+28
修改后重新打开Reveal,报损坏:
(此时Xcode Debug -> Attach to Process
已经能连接上了)
它验证签名了,
hopper
打开Reveal.app/Contents/MacOS/Reveal
,搜索字符串 sign
,找到 Code Signing Verification Failed
,x
查看引用
00000001001ff970 je loc_1001ff97a
00000001001ff972 mov r12, rbx
00000001001ff975 jmp loc_1001ffa22
loc_1001ff97a:
00000001001ff97a inc qword [0x100522520] ; CODE XREF=sub_1001ff950+32
00000001001ff981 mov rdi, qword [objc_cls_ref_IBAAnalytics]
00000001001ff988 call imp___stubs__swift_getInitializedObjCClass
00000001001ff98d mov rsi, qword [0x1004fb7f0] ; @selector(sharedInstance), argument "selector" for method imp___stubs__objc_msgSend
00000001001ff994 mov rdi, rax ; argument "instance" for method imp___stubs__objc_msgSend
00000001001ff997 call imp___stubs__objc_msgSend
00000001001ff99c mov rdi, rax ; argument "instance" for method imp___stubs__objc_retainAutoreleasedReturnValue
00000001001ff99f call imp___stubs__objc_retainAutoreleasedReturnValue
00000001001ff9a4 mov r14, rax
00000001001ff9a7 lea rax, qword [0x1003fb920] ; "Code Signing Verification Failed"
loc_1001ff97a
就是验证签名失败的逻辑,所以把下面的指令
00000001001ff970 je loc_1001ff97a
修改为jmp 1001ff972
00000001001ff970 jmp sub_1001ff950+34
重现打开reveal,又能看到Welcome界面了
DMActivationController
看到类名DMActivationController
,在Reveal.app/Contents/Frameworks/DevMateKit.framework/Versions/A/DevMateKit
里面找到它的定义。
GitHub搜索DevMateKit
,发现是一个第三方库:
https://github.com/DevMate/DevMateKit。
(以后看到这种Welcome界面,第一时间要想到是这个第三方库了。)
hopper
打开DevMateKit
找到下面的函数,直接ret完事:
-[DMActivationController runActivationWindowInMode:initialActivationInfo:withCompletionHandler:]:
000000000002564d ret
重新打开,破解成功了!
网友评论