Skip to main content
Glama
1111laaaddaaa

StaticApkAuditor MCP

StaticApkAuditor MCP

Apktool 기반 디컴파일과 Android APK 보안 평가를 위한 일련의 커스텀 정적 분석 휴리스틱을 노출하는 MCP(Model Context Protocol) 서버로, Claude Code / Claude Desktop에서 자연어 명령을 통해 사용할 수 있습니다.

이 도구의 용도

APK를 지정하면 디컴파일한 다음, AI 어시스턴트가 그 결과를 분석할 수 있도록 일련의 도구(공격 표면, 권한, 하드코딩된 비밀값, 암호화 사용, 네이티브 라이브러리, 비즈니스 로직 후보 등)를 제공하며, MobSF 같은 다른 도구의 결과도 교차 검증합니다. 모든 호출은 마크다운 리포트로 디스크에 기록되므로, 단순한 채팅 기록이 아닌 감사 추적(audit trail)이 남습니다.

이 도구는 정적 분석 보조 도구이지 완전한 펜테스트 도구가 아닙니다. 여러 도구가 확정된 취약점이 아니라 수동/동적 검증이 필요한 후보를 산출하며, 이는 도구 설명과 내장 프롬프트에 명시적으로 명시되어 있습니다. 런타임 동작(경쟁 조건, 워크플로우 우회, 실제 데이터 유출)은 동적 테스트(Frida, Burp/mitmproxy, 실제 기기)로 확인해야 합니다.

Related MCP server: GDA-MCP-Server

빠른 시작

Java, Apktool, Python 3.10+가 이미 설치되어 있다고 가정합니다(아닌 경우 사전 요구사항 참조).

# 1. Set up the project folder
mkdir static-apk-auditor && cd static-apk-auditor

# 2. Create a venv and install the one dependency
python3 -m venv venv
source venv/bin/activate          # Windows: venv\Scripts\activate
pip install -r requirements.txt

# 3. Sanity check — should hang waiting for stdio input, Ctrl+C to stop
python3 server.py

# 4. Register with Claude Code (adjust paths to your actual location)
claude mcp add static-apk-auditor \
  --env APKTOOL_WORK_DIR=$(pwd)/data \
  -- $(pwd)/venv/bin/python3 $(pwd)/server.py

# 5. Verify it connected
claude mcp list

그런 다음 claude mcp add를 실행한 폴더에서 claude 세션을 시작하면 됩니다(등록은 기본적으로 해당 폴더 범위로 설정됨):

/mcp__static-apk-auditor__security_audit
/absolute/path/to/some.apk

또는 평이한 언어로 요청하기만 하면 됩니다. 모델이 decode_apk와 나머지 도구를 스스로 호출합니다:

Decompile /absolute/path/to/some.apk and give me a quick security triage.

사용 가능한 모든 항목은 아래 프롬프트도구를 참조하거나, Claude Code 세션에서 /mcp를 실행하여 대화형으로 탐색하세요.

프로젝트 구조

static-apk-auditor/                  # your folder can be named anything — this is just an example
├── server.py                    # the MCP server — single file, FastMCP-based
├── requirements.txt              # just "mcp"
├── README.md                     # this file
├── prompts/
│   ├── security_audit.md         # 16-point checklist, OWASP Mobile Top 10 mapping
│   └── mobsf_review.md           # MobSF finding validation workflow
├── venv/                         # created locally, not part of the repo
└── data/                         # created automatically on first decode_apk call
                                   # (this is APKTOOL_WORK_DIR — see Configuration below)

런타임 데이터 레이아웃 (자동 생성)

분석하는 모든 APK는 APKTOOL_WORK_DIR 아래에 자체 전용 폴더를 갖게 됩니다:

$APKTOOL_WORK_DIR/<apk_filename_without_extension>/
├── source/
│   └── <original>.apk           # copy of the APK you pointed the tool at
├── decoded/
│   ├── AndroidManifest.xml
│   ├── smali/, smali_classes2/, ...
│   ├── res/, assets/, lib/
│   └── ...                      # apktool's decompiled output
├── reports/
│   ├── 20260706_175359_809_decode_apk.md
│   ├── 20260706_175412_112_analyze_manifest.md
│   ├── 20260706_175430_501_check_root_detection.md
│   └── ...                      # one markdown file per tool call, ever
└── final_reports/
    ├── 20260706_223500_123_security_audit.md
    └── 20260706_224100_456_mobsf_review.md
                                   # the finished, synthesized reports
                                   # (Summary + Detailed Findings + Risk Table),
                                   # saved explicitly via save_final_report

모든 도구 호출은 — 도구 종류, 성공 여부와 관계없이 — 해당 APK의 reports/ 폴더에 타임스탬프가 찍힌 마크다운 파일로 기록됩니다. 이는 선택적인 호출별 로깅이 아니라 모든 등록된 도구에 적용되는 데코레이터(@logged_tool)이므로, 이 서버를 호출하는 어떤 작업도 기록되지 않는 일은 없습니다. 각 리포트에는 도구 이름, 호출 시 전달된 매개변수, 전체 출력이 포함됩니다.

reports/final_reports/는 용도가 다릅니다: reports/는 원시 호출 로그(개별 도구 호출을 모두 기록하므로 무엇을 언제 확인했는지 감사하는 데 유용)이고, final_reports/는 다듬어지고 사람이 읽을 수 있는 최종 보고서만 보관합니다 — 실제로 개발자나 고객에게 전달하는 산출물입니다. security_auditmobsf_review 프롬프트는 모두 save_final_report 호출로 끝나며, 이 호출이 final_reports/를 채웁니다. 이 호출이 없으면 종합된 리포트는 채팅 응답에만 존재할 뿐 디스크 어디에도 저장되지 않습니다.

사전 요구사항

1. Java JDK 8 이상 (Apktool에 필요)

# Ubuntu/Debian
sudo apt update && sudo apt install default-jdk

# macOS
brew install openjdk
java -version

2. Apktool

# Ubuntu/Debian
sudo apt install apktool

# macOS
brew install apktool
apktool --version

3. Python 3.10 이상

python3 --version

4. (선택 사항) aapt — 디코딩 없이 전체 get_apk_info 메타데이터를 얻으려면 필요

brew install aapt   # or: brew install --cask android-commandlinetools

aapt가 설치되어 있지 않으면 get_apk_info는 조용히 실패하는 대신 이미 디코딩된 AndroidManifest.xml을 파싱하는 방식으로 대체됩니다.

설치

git clone <your-repo-or-just-copy-the-files> static-apk-auditor
cd static-apk-auditor
python3 -m venv venv
source venv/bin/activate      # Windows: venv\Scripts\activate
pip install -r requirements.txt

정상 동작 확인:

python3 server.py
# Should hang waiting for stdio input (that's normal) — Ctrl+C to stop.

Claude Code에 연결

claude mcp add apktool-pro \
  --env APKTOOL_WORK_DIR=/absolute/path/to/static-apk-auditor/data \
  -- /absolute/path/to/static-apk-auditor/venv/bin/python3 /absolute/path/to/static-apk-auditor/server.py

확인:

claude mcp list
claude mcp get apktool-pro   # should show "✔ Connected"

참고: claude mcp add는 기본적으로 현재 디렉터리 범위(local 범위)로 서버를 등록합니다. 모든 프로젝트에서 사용하려면 --scope user를 추가하세요.

Claude Desktop에 연결 (대안)

구성 파일을 편집합니다(macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "apktool-pro": {
      "command": "/absolute/path/to/static-apk-auditor/venv/bin/python3",
      "args": ["/absolute/path/to/static-apk-auditor/server.py"],
      "env": {
        "APKTOOL_WORK_DIR": "/absolute/path/to/static-apk-auditor/data"
      }
    }
  }
}

저장 후 Claude Desktop을 다시 시작하세요.

구성 (환경 변수)

변수

기본값

용도

APKTOOL_PATH

apktool

PATH에 없는 경우 apktool 실행 파일 경로

AAPT_PATH

aapt

PATH에 없는 경우 aapt 경로

APKTOOL_WORK_DIR

~/.static-apk-auditor

APK별 소스/디코딩/리포트 데이터의 루트 폴더

도구

핵심 (디컴파일 및 매니페스트)

도구

매개변수

설명

decode_apk

apk_path, force=False

apktool로 APK를 디컴파일합니다. 출력은 APKTOOL_WORK_DIR/<slug>/decoded/ 아래에 유지되며(임시 디렉터리 아님), 원본 APK 사본은 .../source/에 보관됩니다.

get_apk_info

apk_path

패키지, 버전, SDK 수준, 파일 크기 등 기본 메타데이터를 반환합니다. 가능하면 aapt를 사용하고, 그렇지 않으면 디코딩된 매니페스트를 파싱합니다.

build_apk

decoded_dir, output_apk=None

(수정된) 디코딩 디렉터리에서 APK를 다시 빌드합니다. 출력물은 서명되지 않았으므로 apksigner로 별도로 서명하세요.

install_framework

framework_apk

시스템 프레임워크 APK를 설치하여 apktool이 이를 참조하는 시스템/OEM 앱을 디코딩할 수 있게 합니다.

analyze_manifest

decoded_dir

xml.etree를 통해 AndroidManifest.xml을 직접 파싱합니다: 패키지/버전/SDK, 내보낸 컴포넌트(Activity/Service/Receiver/Provider), 인텐트 필터/딥 링크, debuggable/allowBackup/taskAffinity.

list_permissions

decoded_dir

요청된 모든 권한을 나열하고 Android 권한 모델에서 "위험(dangerous)"으로 분류된 권한에 플래그를 지정합니다.

extract_strings

decoded_dir, locale="en"

지정된 로케일의 문자열 리소스를 추출합니다.

find_smali_references

decoded_dir, pattern, max_matches=200

디컴파일된 모든 .smali 파일을 정규식으로 검색하고 각 일치 항목의 파일과 줄 번호를 반환합니다.

보안 휴리스틱

도구

매개변수

설명

list_native_libraries

decoded_dir

APK에 포함된 .so 라이브러리와 CPU 아키텍처를 나열합니다 — smali 검색으로는 들여다볼 수 없는 코드에 플래그를 지정합니다.

check_ssl_pinning

decoded_dir

인증서 검증을 무력화할 수 있는 커스텀 TrustManager/HostnameVerifier 구현과 CertificatePinner 사용 및 network_security_config.xml 내용을 검사합니다.

check_pending_intents

decoded_dir

PendingIntent.getActivity/getBroadcast/getService 호출을 찾아 근처에 FLAG_IMMUTABLE이 없는 항목에 플래그를 지정합니다.

extract_js_bundle_strings

decoded_dir, pattern=<url regex>

React Native / Expo 앱용: assets/*.bundleassets/*.js에서 패턴을 검색합니다(기본값은 URL 추출 — 보통 실제 백엔드 엔드포인트가 노출되는 곳).

check_root_detection

decoded_dir

루팅/에뮬레이터 탐지 및 무결성 검증 서명을 검사합니다: su 바이너리 경로, RootBeer/RootTools, SafetyNet, Play Integrity, test-keys 빌드 태그, 일반적인 isRooted 스타일 메서드 이름 등. 존재 여부는 동적 테스트에서 우회해야 할 대상을 알려주며, 민감한 앱의 경우 부재 자체가 하나의 발견 사항입니다.

비즈니스 로직 정찰

도구

매개변수

설명

map_sensitive_flows

decoded_dir, extra_keywords=None

이름이 민감한 작업(결제, 자격, 역할, 할인, 할당량)을 암시하는 메서드/클래스를 찾아 가벼운 호출 컨텍스트로 주변의 invoke-* 호출을 보여줍니다. 수동/동적 검토를 위한 후보 지도입니다 — 확정된 취약점 목록이 아닙니다.

find_client_side_only_checks

decoded_dir

휴리스틱: 네트워크 호출 없이 로컬 비교(if-*/cmp-*)만으로 판단이 끝나는 민감 키워드 적중을 플래그로 표시합니다 — 결정이 클라이언트 측에서 내려져 패치 후 재빌드로 우회될 수 있음을 시사합니다.

MobSF 리포트 검증

도구

매개변수

설명

load_mobsf_report

report_path

MobSF 정적 분석 JSON 보고서(code_analysis, manifest_analysis, permissions, urls/emails/firebase_urls, network_security, certificate_analysis)를 로드하고 정규화합니다. 자체적으로 유효성을 판단하지 않습니다.

cross_validate_mobsf_finding

decoded_dir, finding_pattern, mobsf_file_hint=None

MobSF 발견 항목 하나를 직접 디컴파일한 출력(smali + 문자열 리소스)과 대조하여 오탐(false positive)을 걸러냅니다. 모델이 분류(확인됨 / 오탐 / 수동 검토 필요)할 수 있도록 증거를 반환하며, 자체적으로 분류하지는 않습니다.

프롬프트(가이드 워크플로)

프롬프트는 도구와 달리 모델이 필요에 따라 자체적으로 호출하는 것이 아니라, Claude Code에서 슬래시 명령(/apktool-pro:<name>)으로 명시적으로 호출됩니다.

프롬프트

인수

수행 작업

security_audit

apk_path

전체 16개 항목 체크리스트(공격 표면, 권한, 시크릿, 암호화, WebView, 저장소, SSL 핀닝, 작업 하이재킹, 루트 탐지, 내보낸 리시버/프로바이더, JS 번들, 네이티브 라이브러리, 로깅, 의존성 버전, PendingIntent 변경 가능성, 비즈니스 로직)를 실행하고 다음을 출력합니다: 요약 → 상세 발견 사항(신뢰도 등급 + adb PoC 단계 포함) → OWASP Mobile Top 10(M1–M10)에 매핑된 위험 테이블.

mobsf_review

apk_path, mobsf_report_path

MobSF JSON 보고서를 로드하고, 모든 발견 항목을 실제 디스컴파일된 코드와 대조 검증하여 각각 확인됨/오탐/수동 검토 필요로 분류하고, MobSF 자체 등급과 무관하게 심각도를 재평가한 후 확인된 발견 항목만으로 우선 조치 목록을 생성합니다.

quick_triage

apk_path

빠른 점검: 내보낸 컴포넌트 + 위험한 권한 + 명백한 하드코딩된 시크릿. 전체 감사가 필요하지 않을 때 사용합니다.

사용 예시

Use decode_apk to decompile /path/to/app.apk
/apktool-pro:security_audit apk_path="/path/to/app.apk"
Use check_root_detection on the decompiled output
/apktool-pro:mobsf_review apk_path="/path/to/app.apk" mobsf_report_path="/path/to/mobsf_report.json"

사용 가능한 모든 도구와 정확한 매개변수를 확인하려면 Claude Code 세션에서 /mcp를 실행하고 apktool-pro를 선택하세요.

MobSF 보고서 얻기

MobSF를 로컬에서 실행 중이라면:

# upload the APK, get back a hash
curl -F 'file=@/path/to/app.apk' http://localhost:8000/api/v1/upload \
  -H "Authorization: <MOBSF_API_KEY>"

# fetch the JSON report using that hash
curl -X POST http://localhost:8000/api/v1/report_json \
  -H "Authorization: <MOBSF_API_KEY>" \
  --data "hash=<hash_from_upload>" -o mobsf_report.json

알려진 제한 사항

  • 정적 분석만 수행합니다. 여기서는 앱을 실행하거나 실제 트래픽을 가로채지 않습니다. 비즈니스 로직 발견 항목과 일부 "확인된" 정적 발견 항목은 입증된 것으로 간주하기 전에 여전히 동적 검증이 필요합니다.

  • build_apk 출력은 서명되지 않았습니다. 기기에 설치하기 전에 apksigner로 서명하세요.

  • 정규식 기반 휴리스틱(check_ssl_pinning, check_root_detection, map_sensitive_flows 등)은 난독화/이름 변경된 코드를 놓칠 수 있고, 관련 없는 일치 항목에 대해 오탁할 수 있습니다. 출력을 판정이 아닌 검토용 후보 목록으로 취급하세요.

  • install_frameworkframework-res.apk를 참조하는 시스템/OEM APK를 디코딩할 때만 필요합니다. 대부분의 타사 앱 분석에는 필요하지 않습니다.

설계 노트

  • APKTOOL_WORK_DIR는 항상 존중됩니다. 모든 APK는 영구적이고 자체 포함된 폴더(source/, decoded/, reports/, final_reports/)를 가지며, 임시 tempdir에 쓰지 않습니다.

  • get_apk_infoaapt가 설치되지 않은 경우 유용한 결과를 반환하지 않는 대신 디코딩된 매니페스트를 파싱하여 대체합니다.

  • 모든 도구 호출은 자동으로 기록되며(reports/), 완성된 종합 보고서는 save_final_report(final_reports/)를 통해 별도로 저장됩니다.

  • 간단한 도구/프롬프트 등록을 위해 FastMCP 기반으로 구축되었습니다.

법적 / 책임 있는 사용

소유하거나 명시적인 서면 허가를 받은 APK만 분석하세요. 디컴파일된 APK에는 민감한 사용자 데이터가 포함될 수 있습니다. 출력물을 적절히 처리하고, 클라이언트 데이터가 포함된 경우 작업 종료 후 APKTOOL_WORK_DIR을 정리하세요. 이 도구는 자체적으로 네트워크 유출이나 능동적 공격을 수행하지 않습니다. security_audit 출력의 PoC 명령(예: adb shell am start ...)은 사용자가 제어하는 기기/에뮬레이터에서 수동으로 실행하도록 설계되었습니다.

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that enables AI assistants to analyze Android APK and iOS IPA files for security issues through natural language conversation, including permission auditing, secret detection, and SDK enumeration.
    12
    14
    4
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables Android APK static analysis in Cursor/Claude via GDA CLI Server, supporting reconnaissance, attack surface scanning, and code decompilation through natural language.
    11
    GPL 3.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP server for analyzing Android APK, DEX, or JAR files via a headless jadx engine, enabling LLM agents to query decompiled code, symbols, call graphs, and more.
    1
    GPL 3.0

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/1111laaaddaaa/static-apk-auditor'

If you have feedback or need assistance with the MCP directory API, please join our Discord server