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 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 trilwu 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Reversing Xamarin Maui AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

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

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

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,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Reversing Xamarin Maui。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Reversing Xamarin Maui 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 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

常见问题

Reversing Xamarin Maui AI 技能有什么作用?

通过 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,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Reversing Xamarin Maui?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Reversing Xamarin Maui 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Reversing Xamarin Maui 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Reversing Xamarin Maui AI 技能免费吗?

是的。trilwu 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇