전체 글
-
[Frida] Hooking ws2_32.dll (send)#1 - Security/Reversing 2020. 5. 27. 10:43
진단 중 TCP 통신을 하는 CS프로그램을 본다면 대부분 TCP 통신으로 되어있다. MSDN에 나와있는 ws2_32.dll 의 send 함수를 본다. 2번째 인자값으로 buf 데이터를 보내는 것으로 확인이 된다. Frida를 사용하여 buf 인자로 들어오는 값을 프린트하고 수정하는 스크립트 작성한다. var sendAddress = Module.findExportByName("ws2_32.dll", "send"); console.log('send address: ' + sendAddress.toString()); Interceptor.attach(sendAddress, { onEnter: function (args) { console.log("buf : " + Memory.readCString(args[..
-
iOS 설치 파일 추출(IPA)#1 - Security/iOS 2020. 5. 26. 08:29
가끔 진단을 하다보면 직접 앱을 설치해서 주는 경우가 있다. APK 같은 경우는 추출하는 방법 검색하면 많이 나와 찾기 쉽지만 iOS는 버전마다 다르고해서 찾는데 오래걸릴 수 있다. 여러 방법 해본 결과 아래의 방법이 가장 편한거 같다. ipainstaller 로 쉽고 빠르게 ipa 파일 추출이 가능하다 [환경] 아이폰6 IOS 12.4.1 CheckRa1n 탈옥 1. Cydia 에서 IPA Installer, IPA Installer Console 두개를 다운 받는다. 2. 아이폰에 SSH 연결한다. 3. 아래 명령어 입력하여 추출한다. ipainstaller -b 4. /private/var/mobile/Documents 가 기본 경로인 것 같다. 해당 경로가서 FTP 사용하여 IPA 파일 추출
-
iOS Anti-Reversing Defenses#1 - Security/iOS 2020. 5. 22. 14:16
출처 : https://mobile-security.gitbook.io/mobile-security-testing-guide/ios-testing-guide/0x06j-testing-resiliency-against-reverse-engineering#overview iOS Anti-Reversing Defenses mobile-security.gitbook.io Jailbreak Detection (MSTG-RESILIENCE-1) Overview Jailbreak detection mechanisms are added to reverse engineering defense to make running the app on a jailbroken device more difficult. This bloc..
-
ARM/ARM64 어셈블리#1 - Security/Reversing 2020. 5. 20. 08:05
1. MOV ARM 어셈블리 명령어는 MOV 명령어와 논리 및 사칙연산 명령어에 모두 쉬프트 연산이 가능한데, 이것을 나타내는 표지가 끝에 붙을 수 있다는 것에 유의한다. 쉬프트 연산에는 ASR(오른쪽 쉬프트, 빈자리는 부호가 따라옴), LSR(오른쪽으로 쉬프트, 빈자리는 0으로 채워짐), LSL(왼쪽으로 쉬프트, 빈자리는 0으로 채워짐), ROR(오른쪽으로 rotation ) 정도를 알아두면 유용하다. 예) MOV r0, [r2,r4] ; r2+r4 의 주소에 있는 값을 읽어서 r0에 저장한다. MOV r1, r2, ROR #1 ; r2를 오른쪽으로 한 비트만큼 rotation 해서 r1에 저장 2. ADD, SUB, AND, ORR 예) ADD r1, r2, #4 ; r2에 4를 더해서 r1에 저장 ..