请教backboard启动调试,列出images失败问题

目前 启动应用后 lldb attach -p 再调试, 正常
现在希望尝试 以backboard启动时 attach , image list 失败, 跟其他帖子的教学不太一样
出现error: the target has no associated executable images

不知道是不是环境有什么问题,或者错了什么步骤

需求: 请教backboard启动调试的正确方法/技巧

操作步骤:

第一步: ios backboard 启动应用

iPhone:/Developer/usr/bin root# ./debugserver -x backboard *:1234 /var/containers/Bundle/Application/0600B6A2-AC5C-45E0-95AF-C071D70757EF/Translate.app/Translate
debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-360.0.26.1 for arm64.
Listening to port 1234 for a connection from *…

第二步: osx lldb

(lldb) process connect connect://192.168.1.37:1234
Process 969 stopped

  • thread #1, stop reason = signal SIGSTOP
    frame #0: 0x00000001022e9000
    → 0x1022e9000: mov x28, sp
    0x1022e9004: and sp, x28, #0xfffffffffffffff0
    0x1022e9008: mov x0, #0x0
    0x1022e900c: mov x1, #0x0
    (lldb) image list -o -f
    error: the target has no associated executable images

已尝试过:

  1. 正常启动应用, 启动后lldb attach, image list正常, 下断正常, 一切正常
  2. 用一个debugserver启动 , 另一个debugserver attach(失败) , 估计是进程只能被一个附加
  3. 以同样步骤 测试其他应用, image list情况一样失败, 因此估计不是反调试作怪
  4. 重启,重越狱

参考过的帖子:
一步一步用debugserver + lldb代替gdb进行动态调试 一步一步用debugserver + lldb代替gdb进行动态调试 - 干货分享 - 睿论坛

环境:
OSX lldb-370.0.42
debugserver-360.0.26.1
IOS 10.2

刚启动时,貌似还在dyld里,没有进到App里;你先b main,然后c,在main函数上断下来,再im li -o -f,应该就可以看到正确的images了

楼主这个情况跟我这一样。压根没有进入dyld,在这断b main是没用的,断什么都断不到,一c程序就跑起来了。
之前总结的情况:
1,自己编译的app都没事可以断到dyld_start里。strip/release都没事。
2,系统app如safari/cydia都没事。
3,appstore里下载的都不行。脱壳后也不行。

1 个赞

刚测试了一下
b main 无法下断
b ptrace 无法下断

(lldb) b main
Breakpoint 1: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) b ptrace
Breakpoint 2: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations

画面是卡在 Launch Screen
c可以跑起来
c后下断失败,list image 失败

(lldb) b main
Breakpoint 3: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) b ptrace
Breakpoint 4: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) image list
error: the target has no associated executable images

但情况也是一样

(lldb) process interrupt成功

-launch=TYPE (-x TYPE)
Valid values TYPE are:
auto Auto-detect the best launch method to use.
posix Launch the executable using posix_spawn.
fork Launch the executable using fork and exec. (启动失败,这即正常情况吗?)
backboard Launch the executable through BackBoard Services.
frontboard Launch the executable through FrontBoard Services.(这是一般的启动吗?)


iPhone:/Developer/usr/bin root# ./debugserver -x fork *:1234 /var/containers/Bundle/Application/0600B6A2-AC5C-45E0-95AF-C071D70757EF/Translate.app/Translate
debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-360.0.26.1 for arm64.
error: failed to launch process ./debugserver: unknown error.
Exiting.

测试了debugserver 不同的launch type
发现以debugserver args 启动的应用都会image list失败
error: the target has no associated executable images

如你所说,刚测试了safari,的确没有问题

更新一下进度。之前说的砸壳也没用已推翻,之前砸壳后忘记重新签名了。对砸壳后的二进制后改名放回原处重新ldid -S/chmod +x后backboard启动可以断到东西了,image list也不再是空。但不重启直接执行的话会崩溃,看http://iosre.com/t/–restrict—restrict/5770/8这个帖子说是_CodeSignatures里签名不对的问题,不知道怎么解决,目前只能重启才能用,可能重启会更新这个?

刚刚成功了一次
不砸壳
ldid -e ldid.xml Translate 导出
ldid -Sldid.xml Translate 原文件重签
不重启
image list成功

换其他应用测试是失败的(启动失败,闪退)
重装了Translate 再试一次又失败的(启动失败,闪退)

重现不了,很可惜

遇到同样的问题?有解决方案吗?

该问题有新的进展吗?

[quote=“revolutor, post:3, topic:9005”]
编译的app都没事可以断到dyld_start里。strip/re
[/quote]store app 是不是有保护 感觉 脱壳之后 用monkeydev 都可以直接调试 感觉应该有戏