首页
社区
课程
招聘
[求助]lldb断点无法命中
2016-7-26 12:05 7762

[求助]lldb断点无法命中

2016-7-26 12:05
7762
看了IOS应用逆向工程, 根据书上微信的例子进行实操,发现断点一直没有被命中。过程如下:

1、版本:6.1.4 (尝试过6.3的, 也无效, 所以更换了老版本,依旧无效, 具体原因不名)
2、操作日志如下:
(1)砸壳,找基地址等操作略过。
IDA中onLongTouch地址为:0x010E2564, onLongPressedWCSight的地址为:0x010E218C。
(2)debug附加尽进程日志:

root# debugserver *:1234 -a /var/mobile/Containers/Bundle/Application/C8E829A4-F5FE-4005-BE42-23164DAE9AC7/WeChat.app/WeChat
debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-320.2.89
for armv7.
Attaching to process /var/mobile/Containers/Bundle/Application/C8E829A4-F5FE-4005-BE42-23164DAE9AC7/WeChat.app/WeChat...
Listening to port 1234 for a connection from *...
Waiting for debugger instructions for process 0.
(3)lldb寻找WeChat偏移
//链接lldb的时候出现一些提示, 不知道会不会影响, 提示如下:

(lldb) process connect connect://localhost:1234
error: unable to find section for section 32
error: unable to find section for section 34
error: unable to find section for section 34
error: unable to find section for section 34
error: unable to find section for section 34
error: unable to find section for section 34
error: unable to find section for section 33
error: unable to find section for section 34
error: unable to find section for section 34
error: unable to find section for section 34
error: unable to find section for section 34
error: unable to find section for section 32
Process 1696 stopped
* thread #1: tid = 0x1f2c4, 0x3a7874f0 libsystem_kernel.dylib`mach_msg_trap + 20, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x3a7874f0 libsystem_kernel.dylib`mach_msg_trap + 20
libsystem_kernel.dylib`mach_msg_trap:
->  0x3a7874f0 <+20>: pop    {r4, r5, r6, r8}
    0x3a7874f4 <+24>: bx     lr

libsystem_kernel.dylib`mach_msg_overwrite_trap:
    0x3a7874f8 <+0>:  mov    r12, sp
    0x3a7874fc <+4>:  push   {r4, r5, r6, r8}
(lldb) image list -o -f
[  0] 0x000a9000 /private/var/mobile/Containers/Bundle/Application/C8E829A4-F5FE-4005-BE42-23164DAE9AC7/WeChat.app/WeChat(0x00000000000ad000)
偏移为0x000a9000 , 通过br下断点 :

(lldb) br s -a '0xa9000+0x10E2564'
Breakpoint 1: where = WeChat` + 1428732, address = 0x0118b564
(lldb) br s -a '0xa9000+0x10E218C'
Breakpoint 2: where = WeChat` + 1427748, address = 0x0118b18c

返回手机,找到朋友圈小视屏长按,并没有跟书上一样出现调用日志, 请问这是什么原因 ?
个人猜测有两个原因:1、断点没下对, 这个东西不知道怎么去定位。 2、lldb链接有问题。劳烦各位指点, 谢谢

(不知道谈WX会不会有什么影响, 如有影响, 请管理通知删帖 ~ )

[培训]内核驱动高级班,冲击BAT一流互联网大厂工 作,每周日13:00-18:00直播授课

收藏
点赞0
打赏
分享
最新回复 (1)
雪    币: 53
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
shaofeng 2016-7-27 17:20
2
0
微信有ptrace检测,你应该先把这关过了
游客
登录 | 注册 方可回帖
返回