본문 바로가기
  • 프로게이머 출신 모의해커의 일상
Hacking/Mobile

[mobile] ios memory dump with gdb

by kargan 2018. 12. 4.

[mobile] ios memory dump with gdb

 

 

 

1. 환경 

 

iphone 5 / ios 8.4.1 / EtasonJB-RC5 탈옥

(https://etasonjb.tihmstar.net/)

 

 

2. gdb 이용하여 메모리 덤프

 

 

 


실행 중인 앱의 PID 확인 후, gdb 실행하여 attach [PID] 명령어를 이용하여 process를 attach 시킨다. mach_msg_trap() 뜨면 성공

 

Break Point 설정을 통한 malloc 함수의 리턴값을 이용하여 heap 영역의 위치 확인 후 덤프를 진행 해준다.

 

 

 명령어 설명
 malloc  malloc에 breakpoint를 걸고 주소 확인
 c  continue 명령으로 멈춘 process 계속 실행(실행 중인 앱 터치)
 finish  process 끝까지 실행
 i r r0   info regisrer 로 레지스터 현재 상태 확인 및 r0 return address 확인
 mach-region r0리턴주소  memory dump 구역 확인 (시작과 끝주소 확인)
dump memory 저장파일명 heap영역주소  덤프된 메모리 파일로 생성

 

 

** 덤프된 메모리 파일을 확인하여 중요 정보 확인 가

 

 

 

 

'Hacking > Mobile' 카테고리의 다른 글

[mobile] ios memory dump with fridump  (0) 2019.07.19

댓글