본문 바로가기

Frida4

[iOS] Frida에서 Fat Binary File Offset 잡기 먼저 Fat Binary란 하나의 실행 파일이 여러 아키텍처에서 적용될 수 있도록 구성된 파일이며, 아래의 그림과 같이 Fat Binary는 Fat Header와 Fat Architecture로 구성되어 있습니다. 각각의 Architecture는 각각의 실행 코드를 가르키고 있으며, OS에서 로드 시 해당 Architecture에 맞는 Mach-O Format이 로딩됩니다. IDA에서 Fat Binary인 IPA를 실행할 경우 아래 그림과 같이 어떤 Architecture를 이용할 것인지 묻는 알림 창이 뜹니다. 현재 실행되고 있는 Architecture를 클릭한 뒤, 분석이 마무리될 때까지 기다립니다. (여기선 ARM64) 아이폰에서 Frida를 이용하여 Hooking을 하기 위해서는 Offset을 구.. 2022. 4. 24.
[iOS] frida-ios-dump for Windows dump.py code for Windows 1. Use 7z (must include 7z.exe and 7z.dll in directory) # zip_args = ('zip', '-qr', os.path.join(os.getcwd(), ipa_filename), target_dir) zip_args = (os.getcwd() + '\\7z.exe', 'a', '-r', os.path.join(os.getcwd(), ipa_filename), target_dir) 2. Change chmod command import stat chmod_dir = os.path.join(PAYLOAD_PATH, os.path.basename(dump_path)) # chmod_args = ('chmod', '655'.. 2022. 3. 17.
Frida Cheat Sheet 공통 Frida attach Code import frida, sys def on_message(message, data): if message['type'] == 'send': payload = message['payload'] print(payload) print("") else: print(message) jscode = """ """ try: target = "" process = frida.get_usb_device(timeout=5).attach(target) script = process.create_script(jscode) script.on("message", on_message) script.load() sys.stdin.read() except Exception as e: print(.. 2020. 9. 21.
Frida 설치 및 Error 해결 방법 설치 방법 Frida 설치 pip install frida 버전을 지정하여 설치 (ex : 12.2.27) pip install frida==12.2.27 frida 설치 후 frida-ps 와 같은 명령어가 실행되지 않는 경우 pip install frida-tools Error 해결 방법 Error 1 : Failed to spawn: unable to access zygote64 while preparing for app launch; try disabling Magisk Hide in case it is active frida를 이용하여 안드로이드 앱을 attach 할 땐 문제가 발생하진 않았지만 spawn을 할 땐 에러가 발생하였습니다. Magisk Hide를 비활성화 한 경우에도 똑같은 에러가.. 2020. 9. 21.