Communitygithub.com

모바일 리버스 엔지니어링

Android 또는 iOS 애플리케이션의 리버스 엔지니어링 및 보안 테스트(APK/IPA 분석, 런타임 인스트루먼테이션, SSL Pinning 우회, 플랫폼 보호 기능 점검)를 위한 기술 스킬입니다.

모바일 리버스 엔지니어링란 무엇인가요?

이 스킬은 Android와 iOS 애플리케이션의 보안 테스트를 위한 통합 리버스 엔지니어링 방법론을 제공합니다. APK/IPA 정보 수집, 정적/동적 분석, 네트워크 분석 등 4단계 워크플로우를 통해 앱의 취약점을 체계적으로 발견할 수 있습니다. Frida와 Objection을 활용한 런타임 인스트루먼테이션으로 SSL Pinning, Root/탈옥 탐지, 안티디버깅 우회를 지원하며, 실제 환경에서 사용되는 암호화 키(AES/RSA/HMAC) 추출도 가능합니다. 또한 JADX-GUI, Ghidra, apktool, Burp Suite 등 다양한 도구 체인을 포함하고 있어 Android와 iOS 모두에서 효과적인 보안 테스트를 수행할 수 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/zhaoxuya520/reverse-skill/tree/main/skills/mobile-reverse

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

모바일 리버스 엔지니어링은(는) 무엇을 하나요?

ACTION REQUIRED(읽은 후 즉시 실행)

  1. 지금: ../field-journal/precedent-reverse.md 읽기 — 이 스킬의 작업이 승인된 일상적인 작업인지 확인
  2. 지금: 현재 작업이 이 스킬의 적용 범위에 해당하는지 확인
  3. 다음: ../tool-index.md 읽기, 도구 사용 가능 여부 및 실제 경로 확인
  4. 다음: 도구가 없으면 bootstrap 호출, 경로를 추측하지 말 것
  5. 실행: "워크플로우" 첫 단계로 진입하여 실행, 확인 상태에 머무르지 말 것

Android + iOS 통일 리버스 엔지니어링 방법론 Frida / Objection / OWASP MSTG / SSL Pinning Bypass

적용 시나리오

  • Android APK 리버스 엔지니어링 및 보안 테스트
  • iOS IPA 리버스 엔지니어링 및 보안 테스트
  • 모바일 애플리케이션 런타임 동적 인스트루먼테이션
  • SSL Pinning / Root 탐지 / 탈옥 탐지 우회
  • 모바일 암호화 알고리즘 추출 (AES/RSA/HMAC 키)
  • 모바일 애플리케이션 침투 테스트 (OWASP MASTG)
  • 비 Root/탈옥 환경에서의 애플리케이션 테스트

4단계 워크플로우

Phase 1: 정보 수집

Android:
□ APK 획득 (Google Play / APKMirror / adb pull)
□ Manifest 분석: 권한, 내보낸 컴포넌트, Intent Filter, backup 플래그
□ androguard: androguard analyze APK → 컴포넌트/권한/서명
□ APKLeaks: 하드코딩된 API Key / Token / Secret 스캔
□ 보호 탐지: 패킹 여부 확인 (360/텐센트/방방/아이자마)

iOS:
□ IPA 획득 (App Store / ipatool / Apple Configurator)
□ App Store 바이너리 복호화: frida-ios-dump / Clutch
□ Info.plist 분석: ATS 설정, URL Scheme, Queries Schemes
□ class-dump: ObjC 클래스 구조 내보내기
□ 보호 탐지: Swift/ObjC 난독화 사용 여부

Phase 2: 정적 분석

플랫폼 공통:
□ JADX-GUI: APK → Java 소스 코드 (Android)
□ Ghidra / Hopper: .so / Mach-O 디컴파일
□ radare2 / Cutter: CLI 빠른 정찰

Android 전용:
□ apktool d app.apk → smali 코드 + 리소스
□ dex2jar: DEX → JAR → JD-GUI
□ smali/baksmali: Dalvik 바이트코드 수정

iOS 전용:
□ class-dump: ObjC 헤더 파일 내보내기
□ Swift 심볼 복원: swift-demangle
□ dsymutil: 디버깅 심볼 추출
□ otool -L: 동적 라이브러리 의존성 확인
□ jtool2: Mach-O 분석

Phase 3: 동적 분석

Frida — 범용 동적 인스트루먼테이션:
□ frida-ps -U: 기기 프로세스 나열
□ frida-trace -U -i "open*" com.app: 함수 호출 추적
□ 사용자 정의 Hook 스크립트: 매개변수/반환값 수정, 비공개 메서드 호출

Objection — Frida 강화 레이어 (스크립트 불필요):
□ objection -g "com.app" explore
□ android root disable / ios jailbreak disable
□ android sslpinning disable / ios sslpinning disable
□ android keystore list / ios keychain dump
□ env / ls / sqlite connect

Frida Gadget (Root/탈옥 불필요):
□ frida-gadget.so / FridaGadget.dylib를 APK/IPA에 주입
□ 재서명 → 설치 → 기기 권한 없이 Hook 가능
□ objection patchapk --source app.apk (전자동)

Phase 4: 네트워크 분석

□ Burp Suite: HTTP/HTTPS 차단, 요청/응답 수정
□ mitmproxy: 스크립팅 가능한 프록시 (Python API)
□ Wireshark: PCAP 패킷 캡처 분석
□ 인증서 설치: Android 사용자 인증서 → 시스템 인증서 (Magisk + MoveCert)
□ SSL Pinning 우회: Frida/Objection/Xposed/SSL Kill Switch 2
□ WebSocket / gRPC 트래픽 분석

일반적인 우회 빠른 참조

SSL Pinning

# Objection (가장 간단)
objection -g "com.app" explore
android sslpinning disable

# Frida 범용 스크립트
frida -U -l ssl_pinning_bypass.js -f com.app

# Xposed (Android)
TrustMeAlready 모듈 → 전체 인증서 검증 비활성화

Root / 탈옥 탐지

# Objection
android root disable
ios jailbreak disable

# Frida 사용자 정의 (다중 레이어 탐지)
Java.perform(function() {
    var RootBeer = Java.use("com.scottyab.rootbeer.RootBeer");
    RootBeer.isRooted.implementation = function() { return false; };
    // 추가 우회: Magisk su 탐지, frida-server 탐지, /proc/self/maps 탐지
});

안티디버깅

# Android
frida -U -l anti_debug_bypass.js -f com.app
# 우회: ptrace(TracerPid), /proc/self/status, isDebuggerConnected()

# iOS
# 우회: PT_DENY_ATTACH, sysctl CTL_KERN/KERN_PROC/KERN_PROC_PID
frida -U -l ios_anti_debug.js -f com.app

모바일 암호화 추출

// Android — Cipher.getInstance 후킹하여 키+알고리즘 획득
Java.perform(function() {
    var Cipher = Java.use("javax.crypto.Cipher");
    Cipher.getInstance.overload('java.lang.String').implementation = function(algo) {
        console.log("[Cipher] Algorithm: " + algo);
        return this.getInstance(algo);
    };
    Cipher.init.overload('int', 'java.security.Key').implementation = function(mode, key) {
        console.log("[Cipher] Key: " + bytesToHex(key.getEncoded()));
        return this.init(mode, key);
    };
});

// iOS — CCCrypt 후킹
Interceptor.attach(Module.findExportByName("libcommonCrypto.dylib", "CCCrypt"), {
    onEnter: function(args) {
        console.log("CCCrypt op: " + args[0] + " alg: " + args[1]);
        console.log("Key: " + hexdump(args[3], { length: args[4].toInt32() }));
    }
});

도구 체인

도구플랫폼용도
JADX-GUIAJava 디컴파일
apktoolAAPK 언패킹/재패킹
GhidraA+I멀티 아키텍처 디컴파일
HopperIiOS 전용 디스어셈블리
FridaA+I동적 인스트루먼테이션
ObjectionA+IFrida REPL 강화
MobSFA+I자동화 SAST+DAST
class-dumpIObjC 클래스 내보내기
frida-ios-dumpIIPA 복호화
jtool2IMach-O 분석
Burp SuiteA+IHTTP 차단
mitmproxyA+I스크립팅 가능한 프록시

A=Android, I=iOS

참고

  • references/frida-objection-deep.md — Frida + Objection 심층 사용법
  • references/ios-reverse-guide.md — iOS 리버스 엔지니어링 전용
  • references/anti-detection-bypass.md — Root/탈옥/안티디버깅/SSL Pinning 우회

작업 완료 자가 점검 (완료 선언 전 MUST 통과)

  • 워크플로우의 각 단계를 실행했는가 (단순히 읽기만 하지 않았는가)?
  • tool-index를 기반으로 실제 도구 경로를 사용했는가?
  • 재현 가능한 증거(명령어/스크립트/스크린샷/보고서)를 산출했는가?
  • RULES가 요구하는 체크리스트 항목을 완료하고 기록했는가?

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

api-security

Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication, authorization, rate-limit, and CI/CD testing.

apk-reverse

在 CLI 环境下做 Android APK 逆向时使用。适用于 APK 解包、Java 反编译、smali 修改、重打包、Frida 动态 Hook,以及按需切换到 so/native 分析。优先使用本机已安装的 jadx、apktool、frida、adb、ida-reverse、radare2。

attack-chain

Use for authorized multi-stage attack-path planning and orchestration when a task spans reconnaissance, initial access, privilege escalation, lateral movement, or impact assessment. Route single-stage tasks directly to their specialist skill.

binary-diff

|

binary-ninja-reverse

Use for authorized binary analysis in Binary Ninja, including HLIL/MLIL/LLIL inspection, strings/imports/exports, cross-references, types, patch review, Python API automation, and optional Binary Ninja MCP or localhost HTTP integration.

browser-automation

|

browser-extension-reverse

Use for authorized reverse engineering of browser extensions (Chrome/Firefox) including manifest analysis, background workers, and extension-based credential or traffic logic recovery.

case-review

Reviews a reverse-skill case package for scope readiness, Evidence to Finding to Path traceability, work item coverage, timeline references, and optional artifact hash integrity before report handoff.

cloud-k8s

Use for authorized cloud, container, and Kubernetes security assessment including metadata SSRF, IAM misconfig, container escape paths, and cluster RBAC review.

code-audit

Use for authorized source-code security review and SAST workflows including Semgrep, CodeQL patterns, dangerous API hunting, and fix verification.

ctf-sandbox

Thin PRIMARY for CTF / AWD / 靶场 multi-type orchestration. Hands off to the sidecar CTF-Sandbox-Orchestrator. Use when the user says CTF, AWD, 靶场, or 比赛题 and no more specific pwn/APK/IDA route already won.

database-security

Use for authorized database security assessment covering PostgreSQL/MySQL/MSSQL/Mongo/Redis exposure, authz, UDF/command paths, and misconfiguration review.

diagram-generator

generate, refine, validate, and render diagrams from natural language, notes, code snippets, schemas, tables, or existing diagram source. use for flowcharts, swimlanes, sequence diagrams, state diagrams, er diagrams, class diagrams, architecture/c4-style diagrams, dependency graphs, gantt charts, mind maps, user journeys, sankey-style flows, org charts, network graphs, and other visual models. supports mermaid by default, graphviz dot for complex graph layout, plantuml for uml-heavy engineering diagrams, and svg output when direct markup is more reliable.

digital-forensics

Use for authorized digital forensics including memory dumps, disk timelines, PCAP investigation, artifact triage, and IR evidence preservation.

docs-generator

|

dotnet-reverse

.NET / C# 二进制逆向。当目标是 .NET assembly(PE 头含 CLR、.exe/.dll 托管程序)、C# 编译产物(含 NativeAOT)、红队 Sharp* 工具(Rubeus / SharpHound / SharpHound 等)、.NET 混淆程序(ConfuserEx / SmartAssembly / Babel / Eazfuscator)、.NET loader / info-stealer / 套壳 malware 时使用。优先用 dnSpyEx + de4dot,需要 AI 直接操作时联动 dnSpy MCP。不用于纯 native 二进制(走 reverse-engineering / ida-reverse)。

edr-bypass-re

|

email-security

Use for authorized email security review including phishing analysis, header authentication (SPF/DKIM/DMARC), BEC patterns, and mailbox token abuse research.

firmware-pentest

|

ghidra-reverse

Use for free/open reverse engineering with Ghidra (headless or GUI), including decompile, cross-refs, and optional Ghidra MCP workflows when IDA is unavailable.

관련 스킬