Communitygithub.com

iOS アプリセキュリティ解析 with Objection

Objection と Frida を使用して iOS アプリのランタイムセキュリティ評価を実施するスキル。キーチェーン、ファイルシステム、メモリの検査、SSL ピンバイパス、脱獄検出バイパスなどを支援します。

iOS アプリセキュリティ解析 with Objection とは?

このスキルは、iOS アプリのランタイムセキュリティ評価を支援するためのものです。Objection と Frida を使用して、キーチェーン、ファイルシステム、メモリの機密データ露出を検査し、SSL ピン留めや脱獄検出などのクライアントサイドセキュリティ制御をバイパスします。サポートするプラットフォームは、脱獄済みデバイス(Frida サーバー使用)と非脱獄デバイス(Frida Gadget 注入済み IPA 使用)の両方に対応しています。ワークフローは、環境準備、Objection のアタッチ、データストレージ評価(MASVS-STORAGE)、ネットワークセキュリティ評価(MASVS-NETWORK)、認証・認可評価(MASVS-AUTH)、バイナリ保護評価(MASVS-RESILIENCE)、プラットフォーム連携評価(MASVS-PLATFORM)の 7 ステップで構成されます。各ステップで Objection コマンドを実行し、アプリのランタイム動作をリアルタイムに分析・操作できます。一般的な落とし穴として、アプリの Frida 検出対策、キーチェーンアクセス範囲の制限、Swift メソッド名のマングリング、変更の非永続性などに注意が必要です。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/analyzing-ios-app-security-with-objection

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Objection を使用した iOS アプリセキュリティ解析

使用すべき場合

このスキルは以下の場合に使用します:

  • 許可された侵入テスト中の iOS アプリケーションのランタイムセキュリティ評価の実施
  • iOS キーチェーン、ファイルシステム、メモリの機密データ露出の検査
  • セキュリティテスト中のクライアントサイドセキュリティ制御(SSL ピン留め、脱獄検出)のバイパス
  • ソースコードにアクセスせずに iOS アプリのランタイム動作の評価

許可なく本番デバイスでこのスキルを使用しないでください — Objection はアプリのランタイム動作を変更し、セキュリティ監視をトリガーする可能性があります。

前提条件

  • Python 3.10 以上(pip 付き)
  • Objection インストール済み: pip install objection
  • Frida インストール済み: pip install frida-tools
  • 対象 iOS デバイス(脱獄済みで Frida サーバーが動作しているか、再パッケージ化された IPA を使用した非脱獄デバイス)
  • 非脱獄デバイスの場合: objection patchipa を使用して IPA に Frida Gadget を注入
  • iOS テストには macOS 推奨(Xcode、ideviceinstaller)
  • USB 接続またはネットワーク Frida サーバー経由の対象デバイス

ワークフロー

ステップ 1: テスト環境の準備

脱獄済みデバイスの場合:

# Cydia/Sileo 経由でデバイスに Frida サーバーをインストール
# SSH でデバイスに接続し、Frida サーバーを起動
ssh root@<device_ip> "/usr/sbin/frida-server -D"

# Frida 接続を確認
frida-ps -U  # USB 接続デバイスのプロセス一覧表示

非脱獄デバイスの場合(許可されたテスト):

# IPA に Frida Gadget を注入
objection patchipa --source target.ipa --codesign-signature "Apple Development: [email protected]"

# パッチ済み IPA をインストール
ideviceinstaller -i target-patched.ipa

ステップ 2: Objection を対象アプリにアタッチ

# 実行中のアプリにバンドル ID でアタッチ
objection --gadget "com.target.app" explore

# またはアプリを新たに起動
objection --gadget "com.target.app" explore --startup-command "ios hooking list classes"

アタッチ後、Objection はランタイム探索のための対話型 REPL を提供します。

ステップ 3: データストレージセキュリティ評価(MASVS-STORAGE)

# アプリからアクセス可能な iOS キーチェーンアイテムをダンプ
ios keychain dump

# アプリサンドボックス内のファイル一覧
ios plist cat Info.plist
env  # アプリ環境パスの表示

# NSUserDefaults の機密データを検査
ios nsuserdefaults get

# SQLite データベースの一覧表示
sqlite connect app_data.db
sqlite execute query "SELECT * FROM credentials"

# ペーストボードの機密データを確認
ios pasteboard monitor

ステップ 4: ネットワークセキュリティ評価(MASVS-NETWORK)

# SSL/TLS 証明書ピン留めを無効化
ios sslpinning disable

# Burp Suite プロキシでトラフィックを観測してピンバイパスを確認
# ネットワーク関連クラスのメソッド呼び出しを監視
ios hooking watch class NSURLSession
ios hooking watch class NSURLConnection

ステップ 5: 認証と認可の評価(MASVS-AUTH)

# すべての Objective-C クラス一覧
ios hooking list classes

# 認証関連クラスの検索
ios hooking search classes Auth
ios hooking search classes Login
ios hooking search classes Token

# 認証メソッドをフックしてパラメータを観察
ios hooking watch method "+[AuthManager validateToken:]" --dump-args --dump-return

# バイオメトリック認証呼び出しを監視
ios hooking watch class LAContext

ステップ 6: バイナリ保護評価(MASVS-RESILIENCE)

# 脱獄検出の実装を確認
ios jailbreak disable

# 脱獄検出バイパスのシミュレーション
ios jailbreak simulate

# ロード済みフレームワークとライブラリの一覧
memory list modules

# メモリ内の機密文字列を検索
memory search "password" --string
memory search "api_key" --string
memory search "Bearer" --string

# 特定のメモリ領域をダンプ
memory dump all dump_output/

ステップ 7: プラットフォーム連携評価(MASVS-PLATFORM)

# アプリが登録した URL スキームの一覧
ios info binary
ios bundles list_frameworks

# URL スキームハンドラをフック
ios hooking watch method "-[AppDelegate application:openURL:options:]" --dump-args

# クリップボードアクセスを監視
ios pasteboard monitor

# カスタムキーボード制限の確認
ios hooking search classes UITextField

主要概念

用語定義
ObjectionFrida 上に構築されたランタイムモバイル探索ツールキット。一般的なセキュリティテストタスク用のプリビルドスクリプトを提供
Frida Gadgetアプリプロセスに注入され、脱獄なしで Frida インストルメンテーションを可能にする共有ライブラリ
キーチェーンiOS の安全な資格情報ストレージシステム。Objection は対象アプリのキーチェーンアクセスグループにアクセス可能なアイテムをダンプ可能
SSL ピン留めバイパスHTTPS トラフィックのプロキシインターセプトを可能にするため、証明書検証ロジックをランタイムで変更
メソッドフックObjective-C/Swift メソッド呼び出しをランタイムでインターセプトし、引数、戻り値の観察、動作の変更を行う

ツール&システム

  • Objection: 高レベルな Frida 駆動モバイルセキュリティ探索ツールキット。プリビルドコマンドを提供
  • Frida: 動的インストルメンテーションフレームワーク。ネイティブアプリプロセスへの JavaScript 注入を提供
  • Frida-tools: frida-ps、frida-trace、frida-discover などの Frida 用 CLI ユーティリティ
  • ideviceinstaller: USB 経由での iOS アプリのインストール・管理のためのクロスプラットフォームツール
  • Burp Suite: SSL ピン留めバイパス後のトラフィックインターセプト用 HTTP プロキシ

一般的な落とし穴

  • アタッチ時にアプリがクラッシュ: 一部のアプリは Frida 検出を実装しています。アプリライフサイクルの初期に --startup-command を使用してアンチ Frida チェックをフックしてください。
  • キーチェーンアクセス範囲: Objection はアプリのアクセスグループ内のキーチェーンアイテムのみをダンプできます。システムキーチェーンアイテムには別途脱獄レベルのツールが必要です。
  • Swift 名前マングリング: Swift メソッド名はランタイムでマングルされます。ios hooking list classes を grep と組み合わせてデマングルされた名前を見つけてください。
  • 非永続的な変更: すべての Objection の変更はランタイムのみで、アプリ再起動時にリセットされます。発見事項はすぐに文書化してください。

Individual skills in this repo

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

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket

abusing-shadow-credentials-for-privesc

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target

achieving-cmmc-level-2-compliance

>-

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically triage a suspicious APK without executing it or to build mobile malware detection rules.

analyzing-api-gateway-access-logs

Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect

analyzing-apt-group-with-mitre-navigator

Query ATT&CK data with attackcti, mitreattack-python, and stix2, then build MITRE ATT&CK Navigator layers and multi-layer heatmap overlays mapping one or more APT groups

analyzing-azure-activity-logs-for-threats

Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query

analyzing-bootkit-and-rootkit-samples

Analyzes bootkit and advanced rootkit malware infecting the Master

analyzing-browser-forensics-with-hindsight

Parse Chromium-based browser databases with Hindsight to extract and correlate browsing history, downloads, cookies, cached content, autofill data, saved passwords, and extensions from Chrome, Edge, Brave, Opera, and Vivaldi into a unified timeline (XLSX, JSON, or SQLite output). Use during incident response, insider-threat investigations, or criminal cases when you need to reconstruct a user

analyzing-campaign-attribution-evidence

Systematically evaluate cyber-campaign evidence to attribute an operation to a threat actor, using the Diamond Model and Analysis of Competing Hypotheses (ACH) to weigh infrastructure overlaps, TTP consistency, malware code similarity, and timing/language artifacts into confidence-weighted attribution assessments. Use when an incident investigation needs a defensible attribution confidence level.

analyzing-certificate-transparency-for-phishing

Monitor Certificate Transparency logs using crt.sh and Certstream to

analyzing-cloud-storage-access-patterns

Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and API-call spikes (e.g. GetObject) via statistical baselines and time-series anomaly detection. Use when investigating suspected cloud data exfiltration or building related detection rules.

analyzing-cobalt-strike-beacon-configuration

Extract and analyze Cobalt Strike beacon configuration from PE files

analyzing-cobaltstrike-malleable-c2-profiles

Parse and analyze Cobalt Strike Malleable C2 profiles with dissect.cobaltstrike (profiles and beacon-payload configs) and pyMalleableC2 (AST parsing) to extract HTTP/DNS transforms, URIs, headers, sleep/jitter, and injection behavior, then generate network detection signatures. Use when reverse-engineering a captured malleable profile or building detections against Cobalt Strike Beacon traffic.

analyzing-command-and-control-communication

Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom

analyzing-cyber-kill-chain

Analyzes intrusion activity against the Lockheed Martin Cyber Kill Chain

analyzing-disk-image-with-autopsy

Perform comprehensive forensic analysis of raw (dd), E01, or AFF disk images with Autopsy and The Sleuth Kit, recovering deleted files, examining metadata and embedded artifacts, keyword searching, and building investigation timelines with visual reports. Use for structured analysis of a forensic disk image or when stakeholders need visual reports from evidence.

analyzing-dns-logs-for-exfiltration

Analyzes DNS query logs to detect data exfiltration via DNS tunneling,

関連スキル