✅ 기본 명령 형식
frida [options] target
- target: 프로세스 이름 (com.example.app) 또는 PID 숫자
✅ 핵심 옵션 정리
| -U | USB로 연결된 Android 디바이스에 attach | frida -U -n com.foo.app |
| -n <name> | 이름으로 실행 중 프로세스에 attach | frida -n com.example.app |
| -p <pid> | PID로 attach (숫자값) | frida -p 1234 |
| -f <name> | 앱을 직접 실행(fork) 후 attach | frida -f com.example.app |
| -l <script.js> | JavaScript 스크립트 로드 | frida -l bypass.js |
| --runtime=v8 | JS 엔진을 V8로 설정 (기본은 QJS) | frida -U -n com.app --runtime=v8 |
| --debug | 디버그 정보 출력 | frida -U -f com.app --debug |
| --version | 버전 출력 | frida --version |
| --help | 도움말 출력 | frida --help |
🎯 실무에서 자주 쓰는 조합
1. 실행 중인 앱에 attach + 스크립트 실행
frida -U -n com.example.app -l hook.js
2. 앱을 직접 실행 + 스크립트
frida -U -f com.example.app -l hook.js
3. PID로 attach
frida -U -p 2345 -l trace.js
| 현재 프로세스 목록 보기 | frida-ps -U |
| 앱 패키지 목록 보기 | frida-ps -Uai |
| 연결된 디바이스 보기 | frida-ls-devices |
| 앱 실행 후 특정 함수 추적 | frida-trace -U -n <앱> -i <함수> |