inspect_managed_artifactHow to REA .NET Assemblies: PE/CLI Metadata, CIL Bytecode & P/Invoke Boundaries
Statically audit .NET Core, .NET Framework, and .NET Standard assemblies: parse ECMA-335 metadata tables, decode Common Intermediate Language (CIL) instructions, and map unmanaged P/Invoke [DllImport] library boundaries without running the CLR.
In this official REA guide for .NET Assemblies & CIL Bytecode, AI coding agents (Claude Code, Cursor, Windsurf) execute 'rea inspect-managed-artifact ./CoreEngine.dll --json' to safely extract file layout, symbols, and code logic without launching unverified binaries.
The Problem & Target Artifact
Enterprise software auditing or game modding: You need to inspect a proprietary .NET 8 DLL to determine what external native C++ libraries it imports, what encryption algorithms it uses, and what public APIs it exposes.
Natural Language Agent Instructions
Copy and paste this prompt directly into your AI coding agent when REA is registered via Model Context Protocol (MCP):
Use REA to inspect this .NET assembly. List all declared native P/Invoke boundaries, exported types, and unmanaged CIL calls.Run REA Analysis Command
Execute the following command in your terminal or inspect the MCP JSON-RPC call executed by your agent:
rea inspect-managed-artifact ./CoreEngine.dll --jsonWhat REA Extracts & Returns
Extracted P/Invoke Interop Declarations
The verified findings and synthesized clean-room structures generated from this investigation:
{
"assembly": "CoreSecurity.dll",
"target_framework": ".NETStandard,Version=v2.1",
"native_boundaries": [
{
"method": "CryptAcquireContextW",
"import_dll": "advapi32.dll",
"calling_convention": "Winapi",
"entry_point": "CryptAcquireContextW"
},
{
"method": "NativeHardwareToken",
"import_dll": "licensing_native.dll",
"calling_convention": "Cdecl",
"entry_point": "VerifyHardwareKey"
}
]
}Static ECMA-335 Parsing Without Runtime Execution
Traditional .NET tools like dnSpy or ILSpy instantiate parts of the .NET runtime to inspect types, which can trigger module initializers (.cctor). REA's parser operates strictly as a static binary reader over raw byte buffers, mapping CLI table tokens and compressed integer streams without executing any managed or unmanaged code.