[Frida] fridump3 사용법 (Andriod, ios)

.·2022년 7월 15일
0

모바일 해킹

목록 보기
8/10

Android 진단

1. 프리다 서버 올리기

1) 프리다 서버 파일다운로드(URL: https://github.com/frida/frida/releases)

2) 단말기 연결해서 서버 파일 넣기 (NOX 켜기)

nox_adb push [서버파일] /data/local/tmp

3) 서버파일 실행

adb shell
cd /data/local/tmp
chmod 777 [서버파일]
./[서버파일] &

2. 프리다 다운로드(사전에 python3 버전으로 설치완료)

pip install frida == [서버파일버전]
pip install frida-tools

3. 프리덤프 다운로드 (URL : https://github.com/rootbsd/fridump3)

4. 메모리 덤프 할 앱 실행 시키고 앱 점검 시작

: 중요정보 입력해보기 등등

5. 메모리 덤프할 앱의 PID확인

frida-ps -Uai

6. 프리덤프 파일 다운로드 한 곳에서 다음 명령어를 수행하여 메모리덤프 시작

python fridump3.py -u -r [PID] -s

7. 데이터 확인

: python 실행시킨 폴더에 있는 string.txt파일 열어서 입력했던 개인정보 혹은 정보들 검색해서 메모리에 남아있는지 확인해보기!


* device not found 에러 발생시

: fridump3.py 파일을 열어서 다음과 같이 수정!
frida.get_usb_device() => frida.get_usb_device(1)

IOS 진단

1. iPhone에 frida 서버 설치

step1. Cydia > 소스 > 편집 > 추가 > https://build.frida.re 소스 추가
step2. Frida (64bits 임)또는 Frida for 32bits device 설치

(설치 시, /usr/sbin/frida-server 자동구동)

설치 후 cmd 에서 frida-ls-devices 로 기기 확인 ( 루팅된 기기연결 필요 )

C:\FRIDASTUDY>frida-ls-devices
Id                                        Type    Name
----------------------------------------  ------  ------------
local                                     local   Local System
cd211ee450f8d1b23cb308d03cf1751e389aab2e  usb     iOS Device
socket

2. fridump3 다운로드 및 소스 수정

# Start a new Session
    if USB:
        session = frida.get_usb_device().attach(APP_NAME)
    
# Start a new Session
    if USB:
        session = frida.get_usb_device().attach(int(APP_NAME)) # 수정

3. 앱의 PID 확인

frida-ps -U

 907  tipsd
 923  transparencyd
 994  triald
 532  trustd
 550  useractivityd
 970  videosubscriptionsd
 597  vmd
 549  voiced
1041  voicememod
 472  watchdogd
 474  wcd
 910  webbookmarksd
 543  wifianalyticsd

4. DUMP 시작

python fridump3.py -u -r [PID] -s

     ______    _     _
        |  ___|  (_)   | |
        | |_ _ __ _  __| |_   _ _ __ ___  _ __
        |  _| '__| |/ _` | | | | '_ ` _ \| '_ \
        | | | |  | | (_| | |_| | | | | | | |_) |
        \_| |_|  |_|\__,_|\__,_|_| |_| |_| .__/
                                         | |
                                         |_|

Current Directory: C:\FRIDASTUDY
Output directory is set to: C:\FRIDASTUDY\dump
Starting Memory dump...
Progress: [########------------------------------------------] 15.2% Completee

ERROR

Failed to enumerate processes: this feature requires an iOS Developer Disk Image to be mounted; run Xcode briefly or use ideviceimagemounter to mount one manually
: 해당 에러 발생 시 Jailbreak 다시해주면 됨. 아니면 프리다 서버를 다시 설치하거나.. 프리다 서버 문제임

0개의 댓글