본문 바로가기
반응형

모바일7

[iOS] 탈옥폰에서 분석환경 세팅 (clutch, class-dump) 1. iOS ssh 접속 루팅 된 iOS폰을 이용 (버전에 따라 다름, 진행은 iPhone5_9.2.1) 1. Home Depot 실행 2. enable jailbrake 활성화 3. specific 실행 4. 메모에 저장된 메모리값 전체 복붙 5. 진행되면서 자동 재부팅 6. Cydia 통해 Open SSH 재설치 7. ip확인 후 동일 네트워크에서 접속 8. 필요한 앱 : Open SSH, nano, Filza file manager 등 ssh 접속 ( 기본적으로 아이폰은 root / alpine 계정 사용) mac_pc#ssh root@192.168.0.16 root@192.168.0.16's password: *** chaem-iPhone:~ root# cydia impactor로 ipa 주입 h.. 2019. 10. 7.
[iOS] objection 툴 사용 objection : https://github.com/sensepost/objection objection 툴 실행 : objection -g PID explore 구성 디렉토리 확인 : env sslpinning 기능 차단 : ios sslpinning disable 현재 실행 목록 : jobs list C:\Users\chaem λ objection -g 9652 explore Using USB device `Apple iPhone` Agent injected and responds ok! _ _ _ _ ___| |_|_|___ ___| |_|_|___ ___ | . | . | | -_| _| _| | . | | |___|___| |___|___|_| |_|___|_|_| |___|(object)i.. 2019. 10. 7.
[iOS] Frida 사용자함수 hooking (바이너리의 코드 섹션 오프셋) + (수정하고자 하는 명령의 절대 주소 – 코드섹션의 시작 주소) 절대주소 = ida 주소 나머지 2개는 otool 이용 : otool -l ./Multi Section sectname __text segname __TEXT addr 0x00009680 #text segment start size 0x00574664 offset 22144 #offset align 2^4 (16) reloff 0 nreloc 0 flags 0x80000400 5904(Decimal) + (0x100001B7E(HEX) – 0x100001710(HEX)) = 0x1B7E // 사용자 함수 hooking 코드 //Example usage: //# frida -U -f 패키지명 -l user_f.. 2019. 10. 7.
[iOS] Frida server 설치 에러 frida server를 설치하는 도중 다음과 같은 에러 발생 시, Failed to spawn: the connection is closed Failed to spawn: unable to connect to remote frida-server: Unable to connect (connection refused) 유사한 에러 링크 https://github.com/frida/frida-core/issues/99 https://github.com/frida/frida/issues/278 https://github.com/frida/frida/issues/375 다음과 같은 명령어 수행 mkdir -p /private/var/usr/lib mv /usr/lib/dic /private/var/usr/lib.. 2019. 10. 7.
[iOS] Objective-C objective-c 스몰톡 언어의 객체지향적인 부분 + C언어 월등한 유연성 클래스 객체, 인스턴스 객체 (스몰톡에서는 클래스도 객체이기 때문에 클래스도 객체로 볼수 있음) @마크를 붙인 예약어를 사용하여 언어를 확장시킴 C++과는 다르게 단일 상속만 허용함, 클래스 이름은 유일해야하며, 내포클래스를 만들 수 없음 @interface : 클래스를 선언한 부분 @implementation : 미리 선언된 클래스를 정의한 부분 @end : 선언과 정의가 끝났음을 의미 @interface Sample : Object @interface 바로 뒤에는 선언할 클래스의 이름이 오게 되고 ":" 다음에 수퍼클래스가 명시됨 { ... } 사이에 있는 변수들이 인스턴스 변수가 됨 (C++의 멤버변수와 같음) 멤버변수들.. 2019. 10. 7.
[iOS] frida hooking class 추출 frida -U -l classes.js PID classes.js for (var className in ObjC.classes) { if (ObjC.classes.hasOwnProperty(className)) { console.log(className); } } method 추출 frida -U -l methodofclass.js PID methodofclass.js console.log("[*] Started: Find All Methods of a Specific Class"); if (ObjC.available) { try { var className = "JailbreakDetectionVC"; var methods = eval('ObjC.classes.' + classNam.. 2019. 10. 7.
반응형