Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
apk-reverse — Android APK 리버스 엔지니어링을 위한 에이전트 스킬: dex 패칭, 언패킹, 리패킹, 광고 및 페이월 제거, 네이티브 .so 분석, Frida를 이용한 런타임 계측. | Kitploit
도구/GitHubGitHub/newliver666/apk-reverse
Android SecurityStatic AnalysisDynamic Analysis (Sandboxing)Code AnalysisMobile App PentestingReverse EngineeringScripting & AutomationMalware AnalysisMobile SecurityBinary AnalysisLearning & Education
1.4k379101일 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
GitHub
newliver666/apk-reverse

apk-reverse

Android APK 리버스 엔지니어링을 위한 에이전트 스킬: dex 패칭, 언패킹, 리패킹, 광고 및 페이월 제거, 네이티브 .so 분석, Frida를 이용한 런타임 계측.

저장소 보기

apk-reverse

English · 简体中文

stars forks license python android ci

Capabilities · Structure · Install · Requirements · Failure catalogue · Scope · Maintenance · Disclaimer

apk-reverse

Android APK 리버스 엔지니어링, 디블로팅, 광고 제거, 정밀 dex 패칭, 리패킹, 런타임/서버 분석을 위한 Agent Skill입니다.

이것은 스킬이지 튜토리얼이 아닙니다: 에이전트(Claude Code, Codex, 또는 Agent Skills 형식을 지원하는 모든 하네스)가 작업하는 동안 로드하도록 작성되었기 때문에 점진적 공개를 위해 구성되어 있습니다 — 짧고 의사결정 중심의 SKILL.md, 특정 단계에서 필요할 때만 로드되는 상세 참조 문서, 그리고 직접 실행할 수 있는 매개변수화된 스크립트입니다.

에이전트가 이것을 어떻게 소비해야 하는가

SKILL.md는 조언이 아니라 게이트가 있는 절차로 의도적으로 작성되었습니다. 관찰된 실패 양상은 무지가 아니라 — 모델이 전체를 읽고, 이에 동의한 다음, 어쨌든 제1원리로부터 추론하는 것이기 때문입니다.

따라서 본문에는 읽는 것이 아니라 행동으로 옮겨야 하는 네 가지가 있습니다:

  • 네 가지 재정의 규칙 (R1–R4). 현재 계획과 충돌할 경우, 증거가 이를 뒤집을 때까지 이 규칙이 우선합니다.
  • 증상 색인. 각 행은 이미 대가를 치른 실패입니다. 일치하는 행은 정지 신호입니다: 몇 번 더 시도한 후가 아니라, 다른 명령을 실행하기 전에 해당 파일을 로드하십시오. 알려진 증상을 지나쳐 추론하는 것이 바로 같은 시간을 두 번 쓰는 방식입니다.
  • 네 가지 게이트 (G1–G4), 각각 통과 기준이 있는 행동입니다. "개념을 이해했다"는 게이트를 통과하지 못합니다. 이들은 분류, 환경 진실, 그리고 대조 빌드가 첫 번째 패치 전에 일어나도록 존재하며, 세 번째 실패 후가 아닙니다.
  • 2회 실패 규칙과 정지 조건. 같은 형태의 실패가 두 번이면 모델이 잘못된 것이지 매개변수가 잘못된 것이 아닙니다. 이미 두 번 실패한 가설의 세 번째 변형은 라운드가 죽는 곳입니다.

그리고 마지막에 보류해야 하는 한 가지: **"완료"**에는 정의(여섯 항목)가 있습니다. 깨끗한 로그는 그중 하나가 아닙니다. 여섯 가지 모두에 미치지 못하는 것은 체크포인트이며, 남은 것이 무엇인지와 함께 체크포인트로 보고해야 합니다.

만약 당신이 이것을 읽고 있는 에이전트라면: 가장 저렴한 첫 번째 명령은 python skills/apk-reverse/scripts/doctor.py입니다. 이것은 여기에 어떤 도구가 존재하는지, 어떤 스크립트가 실제로 실행될 수 있는지, 그리고 환경의 무언가가 이미 당신의 측정을 오염시키고 있는지 알려줍니다.

잘하는 것

  • 서버에 의해 강제되는 페이월에 몇 시간을 태우는 대신, 요청이 클라이언트 측에서 애초에 달성 가능한지 빠르게 판단합니다.
  • 작업을 시작하기 전에 산출물이 어떤 형태여야 하는지 결정합니다 — 루팅되지 않은 자체 포함 아티팩트는 "이 머신에서 작동하게 만들기"와는 다른 문제이며, 이 둘을 혼동하는 것이 이 영역에서 가장 비용이 큰 표류입니다.
  • 주어진 변경에 대해 가장 안전한 패치 계층을 선택하고, 앱을 망가뜨리는 계층을 피합니다.
  • 성공처럼 보이는 리패킹 실패를 잡아냅니다: 앱이 설치되고, 실행되고, 완벽하게 렌더링되지만 모든 서명된 요청이 거부되는 경우 — 클라이언트가 자체 서명 인증서에서 요청 서명 키를 도출하기 때문입니다.
  • 당신 자신의 실수와 앱 또는 서버의 문제를 분리합니다 — 기능 범위의 실패(로그인, 등록, 결제)는 종종 방금 만든 패치의 결과가 아니라 하나의 코드 경로에서의 TLS/인증서 문제입니다. 기기 상태, 죽은 기기 서버, 시계 드리프트도 같은 방식으로 위장합니다.
  • 매니페스트가 제공하는 것 또는 기기가 주장하는 것을 신뢰하는 대신, 어떤 아키텍처와 어떤 라이브러리가 실제로 실행되고 있는지 확립합니다.
  • 패킹/하드닝된 대상을 처리합니다: 패커 식별, 언패킹, 그리고 메모리 덤프를 다시 패치된 설치 가능한 APK로 변환합니다.
  • 의도적으로 프로세스를 종료하는 하드닝된 라이브러리를 처리합니다 — 평범한 널 역참조 버그처럼 보이는 의도적 크래시 형태(fault addr 0x4)와, 수정이 작동하는지 아니면 원인과 전혀 닮지 않은 방식으로 전체 앱을 멈추게 하는지를 결정하는 "무력화하되, 절대 반환하지 않게 만들어서는 안 된다" 규칙을 포함합니다.
  • 어떤 도구를 사용해야 하고 각각이 어디에서 거짓말하는지 파악합니다 — GUI로만 존재하는 도구를 포함하여, 더 약한 방법으로 조용히 대체하는 대신 사람을 요청합니다.
  • 패치된 빌드가 패치된 상태로 유지되게 합니다: 버전 검사, 강제 업그레이드 대화상자, 자체 업데이트 설치 프로그램을 무력화하여 작업이 원격으로 꺼지지 않도록 — 그리고 버전 변경 없이 조용히 이를 되돌릴 수 있는 핫 업데이트/원격 구성 채널을 인식합니다.
  • 클라이언트 측 로그인 게이트(패치 가능)와 계정 범위 리소스(서버가 응답할 것이 없어 비어 있음)를 분리하고, 세션을 위조하는 것이 로그아웃된 것보다 더 나쁜 상태를 만든다는 것을 압니다.
  • 장기 작업을 정직하게 유지합니다: 실시간 기록, 등급이 매겨진 결론, 보정된 타임아웃, 제한된 대기 — 진행 상황이 손실되지 않고 같은 실수가 두 번 반복되지 않도록 합니다.
  • 완벽하게 빌드되고 런타임에 죽는 APK를 만들어내는 특정 실수를 피합니다.
  • APK가 선택지가 아닐 때 산출물이 무엇이어야 하는지 결정합니다 — 여러 독립적 검사에 의해 거부된 리패킹은 비용이 많이 드는 것이 아니라 차단된 것이며, 대체 사다리는 시스템 수준 모듈, 로컬 RPC 서비스, 또는 경계가 명시된 정직한 보고서입니다.
  • 실제 메모리 덤프와 추출 셸 골격을 구별하고, 어떤 복구 경로가 적용되는지 압니다 — frida 자체가 거부될 때의 루트 측 덤프를 포함합니다. 측정이 무엇을 볼 수 있고 볼 수 없는지는 skills/apk-reverse/references/advanced-unpacking.md에 있습니다.
  • 리버싱이 호출보다 더 많은 비용이 들 때 리버싱 대신 루틴을 호출합니다: 호스트에서의 에뮬레이션 실행, 또는 Frida RPC를 통해 서비스화된 라이브 함수.
  • OLLVM에 의해 네이티브 함수가 상태 머신으로 평탄화되었을 때 를 읽습니다 — 실제 기기에서 Stalker가 역효과를 낸 것으로 측정된 두 가지 방식을 포함합니다.

구조

SKILL.md, references/, scripts/는 모두 스킬 디렉터리인 skills/apk-reverse/ 안에 있습니다. 저장소 루트에 있는 모든 것은 스킬 간에 공유되는 유지보수 도구이며, 설치된 스킬의 일부가 아닙니다.``` SKILL.md a procedure with gates, not background reading: how-to-use -> four override rules (R1-R4) symptom index (a matching row is a stop signal) four gates (G1-G4, actions with pass criteria) thirteen classification questions the workflow, with a per-step skip condition and a two-strike rule what "done" means -> stop conditions -> constraints -> indexes references/ loaded on demand, one topic each recon.md identify packer, SDKs, code location, tamper checks; unpacking server-config-and-updates.md the most common shape of "ad" and the one usually mis-diagnosed: the server supplies UI the client renders (launch screen, popup, announcement, tab set). The two-layer fetch that proves it, how to find the config DTOs by the field names data classes keep, why you patch the decision and not the data, deciding the scope of "remove", and remote re-enable / cached config durability byte-level-patching.md equal-length byte edits: why they beat method rebuilding (measured), locating an instruction's exact offset without scraping listings, the instruction width traps that desynchronise a decode, neutralise a branch vs redirect it, dex header integrity field order, and the verifier's move-result rule packers.md hardened targets: rejection signals, measuring the validation boundary with single-variable tests, choosing a native host code-virtualization-and-custom-linkers.md the layer between "packed" and "clean": whole classes turned into native declarations, a private loader whose SONAME does not match its filename, an embedded self-decrypting payload, a Java-layer "signature killer" that logs success while a native check kills you. The keep-it/drop-it deadlock, how to separate the checker from the implementation, and the string-redirect technique that ends it without neutralizing anything framework-runtimes.md Flutter / React Native / Unity: which layer owns the UI, and how to find logic when there are no symbols (string encoding traps) dart-aot.md Dart AOT in depth: version pinning and building a matching decompiler, the object pool and reference indexes, register/boolean conventions, the three signatures that identify business logic, locating, patching. Begins with the snapshot-decoding front end it depends on (aotopsy or blutter) because the pool listing is an input, not something this skill produces itself native-and-so.md .so hosts, DT_NEEDED vs JNI_OnLoad, relocation limits, relocation-free bootstrapping, replacing Java methods natively, and which ABI/library is native-tamper-and-suicide.md how a hardened library kills its own process: the visible mechanisms, how to tell which one actually fires, how to find the site, forged section headers, function boundaries from PT_GNU_EH_FRAME, scanner traps, and neutralising safely detection-and-anti-analysis.md when the app fights back or the tool cannot run here: telling detection apart from a broken environment, deciding by cost instead of escalating, recognising an environment where dynamic analysis simply does not work, and keeping the "blocks my analysis" question separate from "blocks the deliverable" toolchain.md what to install, how to invoke it non-interactively, which tools are GUI-only, version-alignment traps, working offline, , and which signer to use long-task-discipline.md live record, conclusion grading, drift control, timeout and wait calibration, deliverable-form drift, captures-you-never-looked-at, long-context decay, handover ad-removal.md ad taxonomy, wrapper mapping, callback trap, global gates, verification updates-and-forced-upgrade.md keeping a patched build alive: locating the version check, the two-layer patch (no-op the routine, neutralise the comparison), what not to touch (manifest version, installer permission, host blocking), self-update and hot-update/remote-config channels, verifying that no version request is issued at all account-gates.md sign-in walls, forced phone binding, guest mode: telling a client-side gate (patchable) apart from an account-scoped resource (not), why fabricating a session is worse than staying signed out, and the unavoidable session loss after a reinstall signature-derived-keys.md when the app's own signing certificate is used as key material: detection greps, why offline extraction is unreliable, the hardcode-then-verify procedure membership-and-limits.md server vs client authority; what is and is not patchable server-api.md probe an app's API; prove who owns the gate tls-and-cert.md feature-scoped network failures: expired certs, dual trust chains third-party-builds.md auditing a "cracked"/"modded" APK before trusting it dex-patching.md patch-layer table + dexlib2 technique in depth patch-audit.md proving a patch and is : length-vs-bytes comparison, the equal-length-replacement blind spot, verifier-level legality (move-result adjacency) checked statically, text-matching patch traps, and reporting a missing patch repack-and-sign.md repack rules, unpack-and-repack, signing, post-install hazards runtime-data.md DataStore / SharedPreferences / SQLite / protobuf; when the app rewrites your edit, and decoding a value that looks encrypted dynamic-frida.md Frida setup, version pinning, the four-layer probe, hook strategy environment.md device/emulator setup, root, ADB, offline devices, log signals, emulator console control and recovery, preflight, look-at-the-screen verification.md the claim ladder; what "done" means desensitization-and-leak-scans.md publishing discipline: what must be desensitized and what must stay, the do-not-anonymize list, the leak scanner and its exit states, and the entry-point file as a prompt surface precedents/ the positive case library: route including dead ends, a grade per assertion, measured pit-falls, and the write-back checklist routing.md the on-demand inventory: every reference with when to load it, every script with what it does, and a mirror of the symptom index rasc-and-droidsaw.md the Rust re-implementation of the ASC indexer: measured speedup and identical class sets, the enum shape where it silently drops bodies, and how to build and verify it evidence-summary.md the condensation that ships with the skill: capability, one-line conclusion, strength, and the evidence you can actually open in an installed copy

../evals/ NOT a spec directory either, but the location the Agent Skills guidance recommends: evals.json holds the with-skill / without-skill cases this skill has not run, with the method for running them written into the file ../evidence/ NOT a spec directory: the machine-readable companions to the evidence summary reference above -- capability-matrix.json (the same rows with more fields), tested-tool-versions.json (versions and the probe behind each), known-limitations.md (the installer-facing limit list). Shipped inside the skill so an installed copy can answer "was this verified, and how strongly" without the repository pitfalls.md the failure catalogue -- read before building advanced-unpacking.md the dump landed but the bodies are empty: extraction-shell diagnosis by trivial-body ratio, FART-style active invocation and why its classic hooks died on Android 12-16, code_item splicing, the root-side dump for when frida itself is refused, and the honest VMP boundary lsposed-and-modules.md the repack is refused, so deliver a system-level hook module instead: module anatomy, a gradle-free build chain, scope configuration and how to verify injection, and the layer a Java module cannot reach emulation-and-rpc.md call the routine instead of reading it: Unidbg/Unicorn emulation and its environment-filling cost, versus service-ifying a live function over Frida RPC native-dbi-and-deobfuscation.md OLLVM shapes, Frida-Stalker traces, the trace-to-CFG route, the Stalker/QBDI/emulation decision, and two measured boundaries (a follow that delivers no events, and a crash from following a hot libc export) protocol-reverse.md protobuf without a schema, schema recovery from decompiled code, gRPC frame capture, the QUIC/HTTP3 limit, and native-side certificate pinning kernel-and-environment-hardening.md userspace hooking provably cannot reach the check: raw svc, init_array-early detection, what each root scheme hides, the kernel-route map with its version gate, and when to stop escalating on-device-tooling.md working from the phone itself: MT Manager edit/repack/sign and its APK MCP, LSPosed Manager, Termux+frida, on-device data inspection java2c-and-jni-sinking.md Java2C and JNI sinking, the two hardening shapes most easily confused with an extraction shell: the table that separates landing shell / extraction shell / VMP / Java2C / JNI sinking, why the code is in the and in a dumped dex, and why a symbol search comes back empty (dynamic registration, ) split-apk.md App Bundle / split APK sets: what the set is, pulling it off a device, merging into one APK vs signing the set as a unit, the install refusals and what each means, and making an installable fixture from a pulled set vmp-differential-analysis.md the known-plaintext differential for a real Dex VMP: which links can be automated and which cannot (the upload is the bottleneck), the coverage a compiled fixture can reach, how to a derived private-opcode table, smali generation, and when the route is closed coverage-and-limits.md the claim ladder applied to the skill itself: the evidence behind each covered item, the dependencies this skill does not ship, and what was never exercised handoff-boundaries.md where this skill ends and another discipline begins: the JNI form table, the packer-versus-loader split, and what "verified" means for each of the four deliverable forms scripts/ parameterized, path-agnostic doctor.py run this first: capability report + per-script runnability, finds tools installed off-PATH or as runnable jars, and surfaces the environment facts that poison experiments (clock skew, leftover adb forward / proxy, a device-side frida process already running) dexutil.py dependency-free dex reader: structural walk + exact instruction decode, dex header recompute/verify (correct checksum/signature order), branch-target and operand helpers. Library shared by the dex scripts, also runs standalone to dump one method with offsets dex_find_insn.py locate an instruction by decoded semantics and print its exact byte offset with context and both sides of any branch -- how you find a patch site instead of guessing offsets dex_patch_bytes.py equal-length byte patches from a JSON spec: semantic match, polarity pin via expect_next, equal-length enforcement, verifier check, dex header recompute, re-decode to prove it landed (--dry-run first) dex_check_verifier.py tier-3 check: does any conditional branch target a move-result (bypassing its producer)? Compares two builds and separates pre-existing findings from regressions your patch introduced coldstart.py cold-launch capture: timed screenshot burst + logcat signals + installed-build facts + launch timing, and warns when the foreground activity is not your app so_constpatch.py same-length in-place rewrite of an isolated string constant, for redirecting a library load instead of defeating a check smtool.py baksmali/smali wrapper with a configurable classpath dexpatch/ dexlib2 method-level rewriter (for changes that need new instructions) patch_smali.py method-body replacement in a smali tree dex_strpatch.py byte-level string patch with a string_ids ordering guard dex_classdiff.py prove a dex edit was surgical dex_strings.py strings/URLs/SDK markers without a decompiler dart_pool_strings.py recover literals from a Dart AOT snapshot (framed entries, the one-byte vs UTF-16 split, file offsets, run-length noise filter) dart_pprefs.py build/query the object-pool -> code-site index for a Dart snapshot dart_disasm.py annotated windowed disassembly of Dart AOT code + B/BL caller index find_refs.py count callers of a method before patching it repack.py rebuild APK, strip only signatures, keep META-INF/services/, write a 4-byte-aligned archive (resources.arsc STORED+aligned), sign, verify; also split APK / App Bundle sets: inventory, sign every member with one keystore, or merge code/native members into a standalone APK devsh.py quoting-safe ADB shell helper usb_net_proxy.py give an offline device network over USB datastore_inject.py encode/inject AndroidX DataStore preferences safely probe_api.py probe an HTTP API with the right headers grab_crash.py recover stacks hidden by a crash-reporter SDK install_test.py install + launch health check with logcat signal scan frida_probe.js four-layer runtime probe (app net layer + OkHttp + java.net + exceptions) run_probe.py inject the probe, stream it to a log file, stay resident tls_check.py strict certificate check for one or more hosts preflight.py environment check before every experiment block (device, root, ABI/translation, clock skew, leftover proxy/forwards, dead server) lib_map.py what is into a live process: per-library path, base, architecture, and whether it came from the APK or was materialized at runtime elf_plt.py resolve a PLT stub to its imported symbol (x86_64 + aarch64) from the relocation table; list a symbol's callers; byte-diff two libraries and name the symbol each changed stub belongs to apk_diff.py entry-level diff of two builds: changed / added / removed, by content hash so same-size replacements are caught native_crash.py locate a native death from a log or tombstone: signal, fault address, registers, frames split app vs system, the faulting instruction, and a flag when the fault looks blob_decode.py search, don't guess, the framing of a stored value (base64/hex x rotation x deflate); re-encode the edited payload snap.py bounded burst screenshots + control-tree capture with a stall detector, and a verdict on whether the tree is usable at all sig_probe.py find the exact signatures[0].toCharsString() value — offline candidates from an APK, or the authoritative read from a device spawn_patch_detach.py spawn under a Frida probe, detach, then launch and capture: under spawn mode the Activity stack often never comes up, and memory writes survive detach while hooks do not hook_patch_only.js the minimal probe for spawn_patch_detach.py — neutralise one native death site by offset and report PATCHED dex_dump_validate.py dedupe, validate and rank a directory of dumped dex images: sha256 grouping, header integrity, the trivial-body ratio that separates a real dump from an extraction-shell skeleton, and a most-likely-original ranking (--trim for page-aligned /proc//mem captures) dex_mem_scan.py search memory captures for embedded dex images and extract each at the size its own header declares -- for a decrypted dex sitting in an anonymous mapping no maps entry names lsposed_scaffold.py generate a minimal LSPosed/Xposed module project (manifest with the xposed meta-data, assets/xposed_init, hook class, gradle-free build notes) frida_rpc_serve.py bridge a Frida script's rpc.exports to a local caller with reconnect handling, so a live native function can be called rather than reversed rpc_template.js the editable companion to frida_rpc_serve.py stalker_trace.js instruction-level tracing with Frida Stalker: configurable targets, trigger selection, the event stream, and output-size rules stalker_report.py reduce a stalker_trace.js log to block histograms and call sequences, with an explicit diagnostic for the measured zero-event case mt_mcp_probe.py probe MT Manager's on-device APK MCP (Streamable HTTP, port 8787): JSON-RPC handshake plus the grouped tool inventory java2c_probe.py collect the evidence that separates Java2C from an extraction shell, a VMP and ordinary JNI sinking: native density and stub ratio from the dex, JNI_OnLoad / dynamic registration / toolchain strings from the , each item labelled strong/medium/weak protobuf_decode_raw.py schema-free protobuf decode: hex / file / stdin to a JSON tree, every length-delimited field kept as a candidate set with ties labelled rather than guessed, plus a byte-exact re-encode to check a round trip vmp_diff_harness.py build a labelled opcode-coverage fixture, derive a candidate private- opcode map from an original/hardened dex pair, verify the comparison in a closed loop, and render a restored stream as a smali skeleton kernelsu_syscall_mask.py generate a KernelSU/APatch syscall-masking scaffold: an installable userspace module skeleton plus KPM/LKM/eBPF kernel-side templates, each with its version gate and an explicit unverified label rasc_build.py build and verify rasc, the Rust ASC re-implementation: --check what is present, --build clone plus cargo, --verify an APK against droidasc and fail on any class-set difference scan_leaks.py scan a repository for target identity before publishing it: bundle ids in manifest / / contexts, serial-shaped tokens, PATs, inline appkey assignments, literal endpoints, host user paths. Exemptions for everything that must stay (tools, libraries, CVEs, hardening products, public crackmes, placeholders), findings carry their context, prints why a hit was suppressed, exit 0/1/2 svc_scan.py name the syscall behind an inline and the segment it sits in, which decides whether a libc-level hook can observe the call at all; shows neighbours because a byte scan also matches data anti_detect_probe.js observer-only Frida probe (patches nothing): path/loader/thread/kill hooks with caller module + offset, an environment self-report (, frida-named mappings), and live streaming so a sub-second self-destructing target still yields evidence

root@kitploit:~
저장소에는 **실행 가능한** 테스트 계층도 포함되어 있는데, 이는 증거 기록과는 다른 것입니다: `tests/`는 스크립트가 수행하는 동작(단위, CLI 계약, 무디바이스 통합)을 검증하고, `tests/benchmark.md`는 실제 대상에서 라우트가 수행한 동작을 기록합니다. `tests/README.md`는 이 구분을 명시하고, `.github/workflows/ci.yml`은 게이트와 테스트 스위트를 실행합니다.

## 설치

이 저장소는 **스킬 저장소**입니다: 스킬은 `skills/apk-reverse/`에 위치하며, 이는 `skills` CLI가 해석하는 레이아웃이고, 디렉터리를 복사하는 대신 이름으로 설치됩니다:```
npx skills add newliver666/apk-reverse              # install every skill in the repo
npx skills add newliver666/apk-reverse --list       # list what is here, install nothing
npx skills add newliver666/apk-reverse --skill apk-reverse -y
npx skills use  newliver666/apk-reverse@apk-reverse # use it once, without installing

CLI는 기본적으로 스킬을 에이전트의 skills 디렉터리에 심볼릭 링크합니다(--copy를 사용하면 대신 독립적인 복사본을 만듭니다). 그리고 -g는 현재 프로젝트가 아닌 모든 프로젝트에 설치합니다. 저장소에 스킬이 하나뿐인 경우 --skill apk-reverse는 현재로서는 중복입니다. 두 번째 스킬이 생기면 단일 스킬을 선택하는 역할을 하기 때문에 여기에 명시해 두었습니다.

설치가 완료되면 에이전트는 작업이 설명과 일치할 때 SKILL.md를 로드하고, 필요할 때만 references/*를 가져옵니다. 전역 상태도, 머신별 경로도, 빌드 단계도 없습니다.

요구 사항

필수 사항은 없습니다. 각 스크립트가 필요한 것을 스스로 확인합니다. skills/apk-reverse/scripts/doctor.py는 이 환경에 어떤 것들이 존재하는지, 따라서 어떤 스크립트를 실행할 수 있는지, 그리고 유용하게도 PATH가 아닌 다른 곳에 존재하는 도구가 무엇인지 보고합니다.

툴체인이 PATH 밖에 있는 경우(프로젝트 로컬 tools/ 디렉터리, 버전이 지정된 SDK 폴더, 명령 대신 실행 가능한 .jar), APKREV_TOOLS를 하나 이상의 디렉터리로 설정하면 doctor.py가 해당 도구들을 찾습니다:``` set APKREV_TOOLS=

; # Windows, e.g. an SDK or project-local tools dir export APKREV_TOOLS=: # POSIX

root@kitploit:~
스크립트 자체는 순수 `python3`이며 Windows, macOS, Linux에서 동일하게 동작하도록 의도되었다.
POSIX 전용인 부분은 표시해 두었다. 여기서는 어떤 것도 Unix 셸을 가정하지 않는다.

| 도구 | 용도 |
|---|---|
| Python 3.9+ | 모든 스크립트 |
| **`droidasc`** (ASC) (**선택 사항이지만 강력히 권장 — 이것을 먼저 설치하라**) | 전체 APK 상호 참조 인덱스: `findrefs` / `listclass` / `getclass` / `getmanifest`. `pip install droidasc` 한 번이면 되고, JVM도, SDK도, 인덱스 빌드도 필요 없다. "N천 개의 클래스 중 어느 것이 이 문자열을 언급하는가"를 1초 미만의 쿼리로 바꿔 주며, R8이 이름을 망가뜨린 클래스에 접근하는 유일한 경로다. **이것은 에이전트가 전체 디컴파일보다 먼저 손을 뻗어야 하는 도구다** — `skills/apk-reverse/references/toolchain.md` §droidasc (ASC) — APK에게 "누가 이것을 참조하는가?"를 단일 쿼리로 물어보라 |
| `ddc` (선택 사항이지만 강력히 권장) | 쿼리 하위 명령(`info`, `findrefs`, `strings --with-locations`, 클래스별 디컴파일)을 갖춘 단일 바이너리 dex→Java 디컴파일러. JVM 불필요. ASC가 **찾아내는** 것을 **읽으며**, 패키지 정체성도 안정적으로 보고한다 — `skills/apk-reverse/references/toolchain.md` §ddc — 쿼리 하위 명령을 갖춘 dex-to-Java (도입할 가치가 있음) |
| `baksmali` / `smali` + `dexlib2` jars | 디스어셈블리, 어셈블리, 외과적 패치 |
| JDK (`javac`, `java`) | dexlib2 패처 빌드/실행; `keytool`/`jarsigner`도 제공 |
| Android SDK build-tools (`aapt`, `zipalign`, `apksigner`) | 매니페스트 정보, 정렬, 서명. **`apksigner`가 사용해야 할 서명 도구다** — `jarsigner`는 아카이브를 다시 쓰고 Android R+가 요구하는 정렬을 깨뜨린다 |
| `uber-apk-signer` (선택 사항) | 한 단계로 정렬 + 서명 |
| ADB | 기기 작업 |
| Frida (호스트 패키지 + 일치하는 온디바이스 서버) | 동적 분석 |
| 루팅된 기기 또는 에뮬레이터 | 정적 분석을 넘어서는 모든 것 |

이들 중 어느 것도 `PATH`에 있을 필요는 없다. 모든 스크립트는 자신이 호출하는 도구에 대해 명시적 경로를 받아들이며, `skills/apk-reverse/references/toolchain.md`는 `PATH`가 알지 못하는 설치를 찾는 방법(`apksigner`와 `keytool`의 흔한 경우)을 다룬다.

## 먼저 읽어야 할 것

**이 프로젝트는 학습, 연구 및 승인된 보안 테스트 목적으로만 공개된다.** 익스플로잇 페이로드도, 대상 데이터도, 서드파티 바이너리도 포함하지 않는다 — 이것은 방법론, 스크립트 모음, 증거 기록이다. 당신이 무엇을 향해 이 도구를 겨누든 그것을 분석할 권리가 있는지는 당신의 책임이다. 이 파일 끝의 **면책 조항**을 보라.

`skills/apk-reverse/references/pitfalls.md`. 여기서 가장 가치 있는 파일이다 — 모든 항목은 완전히 건강해 보이면서도 망가진 산출물을 만들어낸 실패다.

가장 아픈 네 가지:

1. 리패킹 중 `META-INF/` 전체를 제거하면 ServiceLoader 등록이 삭제되고, 앱은 무관한 라이브러리를 지목하는 오류와 함께 시작 시 죽는다.
2. `string_ids` 순서를 보존하지 않고 바이트 수준 문자열을 패치하면 체크섬과 서명은 완벽하게 검증되는데도 전체 dex가 거부된다.
3. 전체 트리 smali 왕복으로 dex를 재빌드하면 R8 출력이 보이지 않게 손상된다 — 클래스 테이블은 깨끗하게 비교되고, 런타임에서만 터진다.
4. 네이티브 종료 경로를 **반환하지 않게** 만들어 무력화하기. 스피닝 스텁은 검사를 억제하지 않는다; 호출자와 그 뒤의 모든 스레드를 얼려 버린다. 앱은 *크래시 기록이 전혀 없이* 멈추고, 최종적인 죽음은 얼어붙은 프로세스를 죽인 무엇인가의 탓으로 돌려진다.

## 범위

자신의 애플리케이션, 분석이 승인된 샘플, 그리고 CTF/대회 샌드박스에서 작업하기 위해 만들어졌다. 벤더링된 서드파티 바이너리도, 대상별 데이터도 포함하지 않는다.

무엇을 다루고 무엇을 의도적으로 다루지 않는지는 `SKILL.md` 상단의 **Coverage** 아래에 명시되어 있다. 요약하자면: Android 전용(iOS 없음), 그리고 실제로 끝까지 작업해 본 계층에 깊이 들어간다 — dex 패칭, 리패킹, 패커와 커스텀 로더, 네이티브 변조 대응, Flutter/Dart AOT. 확장 패스는 문서화된 경로의 두 번째 계층을 추가했다: 리패킹이 막혔을 때의 **모듈 측 전달**, **추출 셸 복구**와 그 VMP 경계, 읽는 것이 아니라 호출하기 위한 **에뮬레이션과 라이브 RPC**, OLLVM에 대항하는 **명령어 수준 트레이싱**, REST를 넘어서는 **프로토콜 리버싱**, 사용자 공간 후킹이 입증 가능하게 손이 닿지 않을 때를 위한 **커널 측 경로** 맵, 그리고 **온디바이스 툴링**. 그런 다음 **벤치마크 패스**가 공개 대상을 그 경로들 아래에 놓았다(`tests/benchmark.md`): **Java2C 판별**(결코 존재하지 않는 복호화된 DEX를 찾아 헤매게 만드는 오진), **분할 APK / App Bundle 처리**, **스키마 없는 protobuf 디코딩**, **Dex-VMP 차분** 하네스, 그리고 **버전 게이트가 있는 커널 모듈 템플릿**을 추가했으며 — 측정값이 주장과 어긋난 두 가지 이전 주장을 바로잡았다. Unity/IL2CPP 로직 복구, React Native/Hermes 바이트코드 내부, 그리고 서버 측 권위 무력화는 **다루지 않으며**, 이 스킬은 그렇게 말하고 멈추도록 작성되어 있다 — 자신이 작성되지 않은 대상에 가장 가까운 문서화된 절차를 적용하는 대신에.

Coverage 섹션이 전부 명시하고 여기에도 속하는 네 가지 단서:

- **Flutter/Dart AOT 분석에는 의존성이 있다.** 워크플로는 풀 목록(`pp.txt`급 출력)에서 시작한다. 그것을 생성하려면 스냅샷 디코딩 디컴파일러가 필요하다 — aotopsy(정적 바이너리, 툴체인 불필요) 또는 blutter(소스에서 빌드, ~80초) — 그리고 이 저장소에는 그것이 들어 있지 않다. 암묵적으로 남겨두지 않고 전제 조건으로 명시한다.
- **이 저장소의 모든 주장에 실행이 뒤따르는 것은 아니다.** `docs/tool-verification/`은 실제로 무엇이 측정되었는지, 어느 대상에서, 어떤 독립적 교차 검증으로 측정되었는지를 기록한다; 거기에 다루어지지 않은 것은 경험에서 문서화된 것이며, 이 스킬 자체의 주장 사다리에 따라 *추론됨*으로 읽어야 한다.
- **확장 패스는 별도로 기록되며 대부분 *추론됨*이다.** 그 증거는 `docs/tool-verification/EXTENSION-*.md`에 주제당 한 파일로, 자체적인 강도 노트와 함께 있다. 거기의 일반적인 형태는 *도구는 측정되었지만 경로는 측정되지 않았다* — 그러므로 더 새로운 문서를 검증된 경로로 취급하기 전에 그 파일들을 읽어라.
- **벤치마크 패스는 행별로, 그 행 자체의 강도와 함께 기록된다.** `tests/benchmark.md`는 각 공개 대상, 그 행이 실행하는 스크립트, 실제로 일어난 일(실패한 행과 아무도 실행하지 않은 행 포함), 그리고 증거가 얼마나 강한지를 명시한다. `unverified`로 표시된 행은 이 저장소의 증거에 대한 진술이지, 메커니즘에 대한 진술이 아니다.

## 저장소 유지 관리

루트에 네 개의 도구가 있으며 설치된 스킬의 일부가 아니다:```
check_repo.py      every skill discovered, frontmatter valid, scripts runnable,
                   documented paths resolve, README paths explicit and existing,
                   and -- on the tracked surface only -- no target identity
                   (delegates the rules to skills/apk-reverse/scripts/scan_leaks.py
                   so there is one place to argue with the exemption list)
check_refs.py      every cross-reference that names a section of another
                   document reaches a real heading in that document
check_routing.py   the on-demand inventory still matches the entry point: the
                   symptom mirror agrees with SKILL.md, every reference file is
                   named in skills/apk-reverse/references/routing.md, and every
                   script is too
check_commands.py  every command a document tells you to run is checked against
                   the script's own argparse table -- a documented flag that does
                   not exist is a drift the anchor checks cannot see
check_budget.py    keep the always-loaded part from creeping: SKILL.md's whole
                   body (index lines included, because they load too) measured in
                   lines and tokens, index-row length, long files with no
                   navigable head, and hedged rules reported as a trend
build_scripts.py   audit for machine-specific leftovers (absolute paths, credentials)

일관성에는 자연스러운 반대 압력이 있다 -- 깨진 경로는 크게 실패하고, 누군가 고친다. 비대함에는 그런 것이 없기에 세 번째 도구가 존재한다: 모든 패스가 참조, 인덱스 행, 커버리지 주장을 추가하지만, 측정이 없으면 저장소의 그 무엇도 알아차리지 못한다.

tests/benchmark.md에는 회귀 매트릭스가 있다: 차원 -> 공개 대상 -> 해당 행이 실행하는 스크립트 -> 측정 결과 -> 강도 레이블. 이는 docs/tool-verification/ 아래의 어떤 주장이든 신뢰하기 전에 다시 실행해야 할 체크리스트다. 샘플은 tools/_work/로 다운로드되며 절대 커밋되지 않으므로, 각 행은 공개 출처를 명시하고 실행에 사용된 해시를 기록한다.

docs/tool-verification/ 역시 설치된 스킬의 일부가 아니다. 이는 실제 대상에 대한 한 번의 측정 패스에 대한 증거 기록이다: 각 스크립트가 실제로 무엇을 했는지, 어떤 독립적 방법이 이를 확인했는지, 어떤 결함이 발견되었는지, 그리고 대상이 실행할 수 없었던 시나리오는 무엇인지. 이는 SKILL.md의 Coverage 주장을 신뢰하는 대신 실행 기록과 대조해 확인할 수 있도록, 그리고 다음 사람이 찾을 수 있는 곳에 격차를 기록해 두기 위해 존재한다.


LINUX DO 커뮤니티의 후원을 받습니다.

면책 조항

학습, 연구 및 승인된 보안 테스트 전용입니다. 이 저장소의 모든 스크립트, 참조 및 기록된 결과는 Android 애플리케이션 분석이 어떻게 작동하는지 설명하여 실무자가 이미 보유한 도구에 대해 추론할 수 있도록 하기 위해 존재한다. 여기의 어떤 것도 서비스, 제품 또는 특정 용도의 보증이 아니다.

  • 승인된 대상에만 사용하십시오. 소유하고 있거나 분석이 명시적으로 허가된 애플리케이션, 공개 CTF/챌린지 자료, 또는 통제하는 샌드박스에서 사용하십시오. 분석할 권리가 없는 소프트웨어를 분석하는 것은 거주 지역에서 불법일 수 있으며, 그 판단은 이 저장소가 아닌 본인의 몫이다.
  • 보증 없음, 어떠한 목적에도 적합성 없음. 자료는 있는 그대로 제공되며, 어떠한 종류의 보증도 없다. 결과는 한 시점에 한 머신에서 측정된 대로 기록된다; 여기의 어떤 것도 특정 경로가 당신의 대상, 기기, 툴체인 또는 오늘의 앱 버전에서 작동할 것이라고 약속하지 않는다.
  • 신뢰하기 전에 검증하고, 행동하기 전에 백업하십시오. 여러 스크립트가 아티팩트(dex, APK, .so, 저장된 앱 데이터)를 수정하며 일부는 루팅된 기기에서 작동한다. 자신의 사본을 보관하고, 복제본에서 작업하며, 소중한 것에 대해 무엇이든 실행하기 전에 SKILL.md의 게이트를 읽으십시오.
  • 사용에 대한 책임은 본인에게 있습니다. 저자와 기여자는 이 저장소의 사용 또는 오용으로 인해 발생하는 어떠한 손실, 손해, 법적 결과 또는 서비스 중단에 대해서도 책임을 지지 않으며, 이 저장소가 검사에 사용될 수 있는 어떠한 애플리케이션, 벤더 또는 플랫폼과도 제휴하거나, 보증받거나, 대리하지 않는다.
  • 테스트 데이터는 여기에 배포되지 않습니다. 샘플, 덤프 및 기기 아티팩트는 트리에서 의도적으로 제외되며(.gitignore가 제외함) 로컬의 무시된 작업 공간에만 존재한다. 따라 하기 위해 얻은 무엇이든 안전하게 보관하고 다 사용한 후 삭제하는 것은 본인의 몫이다 — 현지 규칙과 샘플과 함께 제공된 약관을 따르십시오. 이 저장소가 실제로 공개하는 것은 모든 대상 식별 정보가 제거된 방법과 증거이다.
  • 제휴 없음. 도구, 라이브러리, 하드닝 제품 및 공개 챌린지 대상의 이름은 자료를 재사용 가능하게 만들기 위해서만 등장한다; 이들은 각 소유자에게 속하며 이 프로젝트는 이들과 연결되어 있지 않다.
도구 다운로드
명령어 수준 실행 증거
  • 사용자 공간 후킹이 검사에 전혀 도달할 수 없을 때(원시 svc 시스템 콜, init_array 초기 감지)를 인식하고, 위아래 다음 계층이 실제로 무엇을 할 수 있는지, 그리고 에스컬레이션이 잘못된 답인 경우를 압니다.
  • REST가 아닌 프로토콜 — 스키마 없는 protobuf, gRPC, QUIC/HTTP3 — 과 시스템 신뢰 저장소를 무시하는 네이티브 측 인증서 피닝을 다룹니다.
  • 폰 자체에서 작업합니다: MT Manager의 편집/리패킹/서명 흐름과 APK MCP 표면, LSPosed Manager, 온디바이스 데이터 검사 — PC 툴체인을 대신하는 것이 아니라 그와 함께 사용합니다.
  • 프로세스 수명 중 어느 시점에도 존재하지 않는 복호화된 DEX를 찾아 몇 시간을 허비하기 전에 Java2C와 추출 셸을 구별합니다 — 코드는 .so로 컴파일되었습니다.
  • 분할 APK / App Bundle 세트로 도착하는 빌드를 처리합니다: 기기에서 세트를 읽고, pm install-multiple을 위해 모든 멤버에 하나의 키스토어로 서명하거나, 합법적일 때 코드/네이티브 멤버를 독립 실행형 APK로 병합합니다.
  • 알려진 평문 차분을 사용하여 실제 Dex VMP를 다룹니다 — 어떤 링크가 자동화될 수 있고 어떤 것이 안 되는지, 컴파일된 픽스처가 무엇에 도달할 수 있고 없는지, 그리고 파생된 프라이빗 옵코드 테이블을 주장하는 대신 어떻게 증명하는지.
  • 대상을 게시하지 않고 배운 것을 게시합니다 — 컨텍스트와 함께 아이덴티티 형태를 보고하는 스캐너, 반드시 삭제해서는 안 되는 것들의 명시적 목록(도구, 라이브러리, 프로토콜 필드, CVE, 하드닝 제품, 공개 크랙미) — 그것들을 삭제하면 재사용 가능한 부분이 파괴되기 때문입니다 — 그리고 커밋을 게이트하는 종료 코드.
  • 이 저장소가 이미 수렴한 작업을 반복하기 전에 선례를 읽습니다: 기록의 긍정적인 절반, 막다른 길을 포함한 경로, 모든 주장에 대한 등급, 그리고 사례가 다시 작성하라고 말하는 파일들.
  • actually loaded and executing
    "not on PATH" is not "not installed"
    landed
    legal
    .so
    never
    Java_*
    -fvisibility=hidden
    prove
    actually mapped
    arranged
    .so
    pm
    ps
    --show-exempt
    svc
    --context
    TracerPid