Reversing Xamarin Mauiのロゴ

Reversing Xamarin Maui

コミュニティ
trilwu
reversing-xamarin-maui

pyxamstoreでassemblies.blobとXALZ圧縮DLLを抽出し、dnSpyまたはILSpyで逆コンパイルして、Xamarinおよび.NET MAUIモバイルアプリをリバースエンジニアリングします。APKにlibmonodroid.so、libmonosgen、assemblies.blob、assemblies/*.dll、libxamarin-app.soが含まれる場合、IPAにMonoアセンブリが含まれる場合、またはjadxでXamarinのブートストラップクラスしか表示されない場合に使用します。

Add to TypingMind

概要

公開者trilwu
リポジトリsecskills
スキル名reversing-xamarin-maui
スター
144
フォーク
15
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    trilwuがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Reversing Xamarin Maui」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/trilwu/secskills/tree/main/secskills-core/skills/reversing-xamarin-maui
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/trilwu/secskills.git /tmp/secskills
mkdir -p .claude/skills
cp -r /tmp/secskills/secskills-core/skills/reversing-xamarin-maui .claude/skills/reversing-xamarin-maui
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでReversing Xamarin Mauiを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にReversing Xamarin Mauiを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Reversing Xamarin Mauiは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Reversing Xamarin and .NET MAUI Apps

Xamarin apps hide a complete .NET application inside an Android package. Once you extract and decompress the assemblies you get near-source-quality C#, which makes this one of the highest-return reversing jobs — but only if you get past the container format, which changed twice and defeats naive unzipping.

When to Use

  • The APK contains lib/*/libmonodroid.so, libmonosgen-2.0.so, or libxamarin-app.so
  • The APK contains assemblies/assemblies.blob or assemblies/*.dll
  • jadx shows only mono.MonoPackageManager and Xamarin bootstrap classes
  • An IPA contains .dll files or a Frameworks/Mono* layout
  • The target is described as Xamarin, Xamarin.Forms, or .NET MAUI

When NOT to Use

  • Unity (global-metadata.dat, libil2cpp.so) — use reversing-unity-il2cpp; Unity is also .NET but uses a completely different packaging
  • Flutter or React Native — use reversing-flutter-apps or reversing-react-native-apps
  • TLS interception problems — use bypassing-mobile-pinning
  • The wider assessment — use testing-mobile-applications

Identify the Packaging Generation

Three formats shipped over the product's life, and the extraction differs.

bash
unzip -l target.apk | rg 'assemblies|libmonodroid|libxamarin|libmonosgen'
What you seeGenerationExtraction
assemblies/*.dll, readable PE headers (MZ)Classic, uncompressedUnzip and decompile directly
assemblies/*.dll starting with XALZClassic, LZ4-compressedDecompress the XALZ wrapper first
assemblies/assemblies.blob + .manifestAssemblyStorepyxamstore to unpack
lib/*/libxamarin-app.so with no assemblies/.NET 6+ / MAUI, assemblies in the ELFExtract from the shared library
No managed assemblies anywhereNativeAOTNot .NET reversing — use analyzing-binaries
bash
# Which one is it? Check the first four bytes of an assembly
unzip -p target.apk 'assemblies/Mono.Android.dll' 2>/dev/null | xxd | head -1
# 4d5a...  → MZ, a plain .NET PE, decompile now
# 58414c5a → "XALZ", LZ4-compressed, decompress first

Extraction

bash
# AssemblyStore (assemblies.blob)
pyxamstore unpack -d ./out target.apk
# produces the individual .dll files under ./out

# XALZ-compressed individual DLLs
# The header is: magic "XALZ" | descriptor index | uncompressed size | LZ4 block
python3 -c "
import lz4.block, struct, sys
d = open(sys.argv[1],'rb').read()
assert d[:4] == b'XALZ'
size = struct.unpack('<I', d[8:12])[0]
open(sys.argv[2],'wb').write(lz4.block.decompress(d[12:], uncompressed_size=size))
" Mono.Android.dll Mono.Android.decompressed.dll

# MAUI / .NET 6+ assemblies embedded in libxamarin-app.so
# They are stored as sections; carve by MZ header or use pyxamstore's newer modes
unzip -j target.apk 'lib/arm64-v8a/*' -d libs && binwalk -Me libs/libxamarin-app.so

Once you have plain .dll files it is ordinary .NET work:

bash
ilspycmd ./out/YourApp.dll -o ./decompiled     # or dnSpy / dnSpyEx / dotPeek
rg -n 'https?://|ApiKey|ConnectionString|Bearer|password' ./decompiled | head -40

Start with the app's own assembly, not the framework ones. It is usually named after the product; Mono.Android.dll, System.*, and Xamarin.* are stock and waste your time.

Runtime Hooking

Frida's Java bridge does not see Mono methods — the app's logic is not in the JVM. You need Mono-aware instrumentation.

bash
# Enumerate the Mono runtime and its loaded assemblies
frida -U -f com.target.app -l frida-mono-api.js
# Fridax targets Xamarin specifically; also useful:
#   mono_get_root_domain, mono_assembly_foreach, mono_class_get_methods,
#   mono_compile_method  → resolve a managed method to a native address, then
#   Interceptor.attach at that address

The practical route: decompile first, find the exact class and method you want, then resolve it through the Mono API and attach. Blind hooking of Mono is far slower than reading the C# you already recovered.

Certificate validation in Xamarin lives in managed code, which is why generic Android pinning bypasses miss it entirely:

csharp
// The two hook targets, both in the managed layer
ServicePointManager.ServerCertificateValidationCallback
HttpClientHandler.ServerCertificateCustomValidationCallback

Force these to return true via Mono hooking, or patch the assembly and repack. See bypassing-mobile-pinning for the surrounding diagnosis.

Where the Findings Are

Xamarin apps concentrate risk in ways that are easy to spot once decompiled:

  • Hardcoded secrets in C#. Developers treat compiled assemblies as opaque; API keys, connection strings, and storage credentials ship in plain IL.
  • Full backend logic in the client. Shared code between the mobile app and the server-side project is a Xamarin idiom, so the client often contains the authoritative business rules — and sometimes the server's own models and validation, which tells you exactly how to shape a malicious request.
  • Custom ServerCertificateValidationCallback returning true. Common in development builds that shipped.
  • Insecure local storage. Xamarin.Essentials.SecureStorage is usually fine; Preferences and raw file writes are not.
  • Embedded SQLite with credentials or full offline datasets.

Patching and Repacking

bash
# Edit IL directly in dnSpy, save the assembly, then rebuild the container
pyxamstore pack -d ./out          # rebuild assemblies.blob
apktool b target -o patched.apk && apksigner sign --ks debug.keystore patched.apk

Repacking must reproduce the original container format exactly — an uncompressed DLL where the loader expects XALZ, or a mis-sized blob, fails at startup with an unhelpful native crash. Prefer runtime hooking when you only need to observe.

Rationalizations to Reject

  • "jadx found nothing, so it's obfuscated." There is nothing in the dex. The app is in assemblies/.
  • "Unzipping gave me DLLs but dnSpy rejects them." They are XALZ-compressed. Check the first four bytes.
  • "Frida's Java hooks aren't working." The methods are Mono, not JVM. Use the Mono API.
  • "It's compiled to a DLL, so the key is safe." IL decompiles to readable C#. Treat every assembly constant as public.
  • "The pinning bypass ran and traffic still fails." Xamarin validates in managed code; the Java-layer bypass never touched it.
  • "There are hundreds of assemblies." Most are stock framework. Read the one named after the product.

References

  • testing-mobile-applications — the wider assessment and platform storage
  • bypassing-mobile-pinning — diagnosing the interception failure around this
  • reversing-unity-il2cpp — the other .NET-based mobile framework
  • analyzing-binaries — NativeAOT builds with no managed assemblies
  • pyxamstore, dnSpy/dnSpyEx, ILSpy, Fridax, frida-mono-api

よくある質問

AIスキル「Reversing Xamarin Maui」では何ができますか?

pyxamstoreでassemblies.blobとXALZ圧縮DLLを抽出し、dnSpyまたはILSpyで逆コンパイルして、Xamarinおよび.NET MAUIモバイルアプリをリバースエンジニアリングします。APKにlibmonodroid.so、libmonosgen、assemblies.blob、assemblies/*.dll、libxamarin-app.soが含まれる場合、IPAにMonoアセンブリが含まれる場合、またはjadxでXamarinのブートストラップクラスしか表示されない場合に使用します。

TypingMindでReversing Xamarin Mauiを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Reversing Xamarin Mauiはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにReversing Xamarin Mauiをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/trilwu/secskills/tree/main/secskills-core/skills/reversing-xamarin-mauiを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Reversing Xamarin Mauiを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Reversing Xamarin Mauiで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもReversing Xamarin Mauiを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Reversing Xamarin Maui」は無料ですか?

はい。trilwuがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇