모바일 앱에서 frida timeout error 해결 방법
최근에는 주로 모바일 앱 후킹시 frida 를 이용하고 있는데, 안드로이드 느린 앱을 후킹하려고 하다 보면 가끔 아래처럼
타임아웃 메시지가 나오며 죽어버리는 경우가 있다.
이 경우 해결방법.
hyunmini:02.dbi $ python dbi.py Traceback (most recent call last): File "dbi.py", line 73, in <module> main(target_process) File "dbi.py", line 54, in main pid = frida.get_usb_device().spawn([target_process]) File "/Library/Python/2.7/site-packages/frida/core.py", line 85, in spawn return self._impl.spawn(argv) frida.TimedOutError: unexpectedly timed out while waiting for app to launch |
...
pid = frida.get_usb_device().spawn([target_process])
...
앱 실행하는 위 코드에 timeout 인자값을 주면 됨(;;)
...
pid = frida.get_usb_device(timeout=10).spawn([target_process])
...
이제 잘 된다.
hyunmini:02.dbi $ python dbi.py >>>> Start Native Hooking <<<< [+] find open() address: 0xf6fda1af [+] find fopen() address: 0xf6ff658d [+] find access() address: 0xf6fd7d65 [+] find stat() address: 0xf6fdb125 [+] find strcasecmp() address: 0xf6ffd39d [+] find strcmp() address: 0xf6fd66dc [!!] Starting Java Hooking... Runtime.loadLibrary: soundpool Runtime.loadLibrary: authmanager Runtime.loadLibrary: webviewchromium Runtime.loadLibrary: webviewchromium_plat_support Runtime.loadLibrary: NS***** Runtime.loadLibrary: ap1.7.8 Runtime.loadLibrary: a**** [+] Hooking /data/app/com.*****-1/lib/arm/lib****.so!****1 [*] bypass rooting check : called - *****() |