nowsecure / r2frida

Radare2 and Frida better together.
MIT License
1.18k stars 121 forks source link

hi, what's this problems? #370

Closed wangzhou25 closed 10 months ago

wangzhou25 commented 2 years ago
r2frida
trufae commented 2 years ago

cant reproduce. can you provide some more details like, the version of frida, the version of ios/android you are testing this? also, i assume you are using the last version of r2 and the last version of r2frida.

to reduce the test coverage, can you verify if reading works when seeking to an aligned address? for example by typing: s..0;x

Another thing you can test is to set the export R2FRIDA_SAFE_IO=1 environment var before launching r2 frida://.. this env var workarounds a bug in frida on android for 32bit.

wangzhou25 commented 2 years ago

Thinks for reply, my device type is android 8.1,

I tryed set export R2FRIDA_SAFE_IO=1, it still doesn't work

the vesion info:

wangzhou@Mac:~$ radare2 -v radare2 5.6.5 2 @ darwin-x86-64 git. commit: 619d9cb8ccc5bb182e4174b7ad96f2f4bded0a7f build: 2022-03-10__23:43:10

[0x00000000]> :?V {"version":"15.1.17.17.g7e4d9df"} [0x00000000]> ?V 5.6.5 aka commit 2

I install it by sudo r2pm -ci r2frida, install log like this:

Cleaning r2frida... clean Done For r2frida /Users/wangzhou/.local/share/radare2/r2pm/db/r2frida TGZ= Cleaning up /Users/wangzhou/.local/share/radare2/r2pm/git/r2frida... HEAD 现在位于 f74849c Add rl78 plugin 更新 f74849c..0ce4b31 Fast-forward README.md | 6 ++---- db/hexagon | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 db/hexagon [r2pm] Updating package database /Users/wangzhou/.local/share/radare2/r2pm/db ... 已经是最新的。 error: 路径规格 'r2-5.6.5' 未匹配任何 git 已知文件 已经是最新的。 Install Done For r2frida checking build system type... x86_64-unknown-darwin checking host system type... x86_64-unknown-darwin checking target system type... x86_64-unknown-darwin checking for working directories... current using prefix '/usr/local' checking for pkg-config... /opt/local/bin/pkg-config checking for c compiler... gcc checking exec r2 -v... ok Using PKGCONFIG: /opt/local/bin/pkg-config checking pkg-config flags for r_core... yes checking for curl... /usr/bin/curl checking for wget... /usr/local/bin/wget checking for git... /usr/local/bin/git checking for xz... /opt/local/bin/xz creating ./config.mk creating ./config.h cleaning temporally files... done

Final report:

src/_agent.js 100%[=====================================================================================================================>] 167.00K 156KB/s 用时 1.1s

2022-03-25 19:53:06 (156 KB/s) - 已保存 “src/_agent.js” [171004/171004])

r2 -nfqcpc src/_agent.js | grep 0x > src/_agent.h cc -c -DFRIDA_VERSION_STRING=\"15.1.17\" -fPIC -g -I/usr/local/include/libr -I/opt/local/libexec/openssl3/include -I/usr/local/include/libr -I/usr/local/include/libr/sdb -Iext/frida src/io_frida.c -o src/io_frida.o pkg-config --cflags r_core -I/usr/local/include/libr -I/opt/local/libexec/openssl3/include -I/usr/local/include/libr -I/usr/local/include/libr/sdb c++ src/io_frida.o -o io_frida.dylib -shared -fPIC -g -L/usr/local/lib -L/opt/local/libexec/openssl3/lib -L/usr/local/lib -lr_core -lssl -lcrypto -lr_config -lr_debug -lr_bin -lr_anal -lr_bp -lr_egg -lr_asm -lr_lang -lr_parse -lr_flag -lr_reg -lr_search -lr_syscall -lr_fs -lr_magic -lr_io -lr_socket -lr_cons -lr_crypto -lr_hash -lr_util -ldl -Wl,-exported_symbol,_radare_plugin -Wl,-no_compact_unwind ext/frida/libfrida-core.a -lresolv -framework Foundation -lbsm -framework AppKit ld: warning: text-based stub file /System/Library/Frameworks//Foundation.framework/Foundation.tbd and library file /System/Library/Frameworks//Foundation.framework/Foundation are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks//AppKit.framework/AppKit.tbd and library file /System/Library/Frameworks//AppKit.framework/AppKit are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation.tbd and library file /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks//ApplicationServices.framework/Versions/A/ApplicationServices.tbd and library file /System/Library/Frameworks//ApplicationServices.framework/Versions/A/ApplicationServices are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/Versions/A/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/Versions/A/CoreFoundation are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks//CoreGraphics.framework/Versions/A/CoreGraphics.tbd and library file /System/Library/Frameworks//CoreGraphics.framework/Versions/A/CoreGraphics are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks//CoreText.framework/Versions/A/CoreText.tbd and library file /System/Library/Frameworks//CoreText.framework/Versions/A/CoreText are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks//ImageIO.framework/Versions/A/ImageIO.tbd and library file /System/Library/Frameworks//ImageIO.framework/Versions/A/ImageIO are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks//CoreServices.framework/Versions/A/CoreServices.tbd and library file /System/Library/Frameworks//CoreServices.framework/Versions/A/CoreServices are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks//CFNetwork.framework/Versions/A/CFNetwork.tbd and library file /System/Library/Frameworks//CFNetwork.framework/Versions/A/CFNetwork are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices are out of sync. Falling back to library file for linking. ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList are out of sync. Falling back to library file for linking. mkdir -p /"/Users/wangzhou/.local/share/radare2/plugins" cp -f io_frida.dylib* /"/Users/wangzhou/.local/share/radare2/plugins"

trufae commented 10 months ago

Please try again with latest r2 and r2frida, i fixed a related issue that was happening on some circunstancies that could be the reason why this was happening.

thanks for reporting! ill close the ticket because this was a well known issue that was partly depending on a bug in Frida and r2frida is now handling it properly