feat: Add native .NET 8.0 MCP server and unified Docker configuration#32
Closed
doomedraven wants to merge 2 commits into
Closed
feat: Add native .NET 8.0 MCP server and unified Docker configuration#32doomedraven wants to merge 2 commits into
doomedraven wants to merge 2 commits into
Conversation
doomedraven
force-pushed
the
feat/mcp-docker-support
branch
3 times, most recently
from
July 23, 2026 17:13
6ba4a9c to
d436f4e
Compare
- Implement a native C# MCP server inside the new `de4dot.mcp` project, supporting both stdio-based JSON-RPC and an in-process Kestrel HTTP Web API on port 8080. - Create a multi-stage `Dockerfile` that builds the native BeaEngine C++ disassembler library, publishes de4dotEx, and deploys them alongside a unified bash entrypoint supporting CLI, Stdio MCP, and HTTP REST modes. - Write a secondary `Dockerfile.wine` for Wine-based execution with full Windows .NET Framework 4.8 JIT-hook dynamic unpacking parity. - Resolve a cflow emulator crash by catching invalid branch target exceptions (null fall-throughs) inside `BlockCflowDeobfuscator.cs`, allowing the process to gracefully skip corrupted traps instead of aborting. - Add `MetadataFlags.KeepOldMaxStack` as a global save fallback inside `ObfuscatedFile.cs` to eliminate metadata writer stack-depth recalculation warnings and crashes on heavily obfuscated code. - Add `test_api.sh` client utility script for local testing. - Consolidate all Docker and MCP configuration and troubleshooting documentation directly into the primary `README.md` file.
doomedraven
force-pushed
the
feat/mcp-docker-support
branch
from
July 23, 2026 18:07
d436f4e to
c83a706
Compare
- Implement a native C# MCP server inside the new `de4dot.mcp` project, supporting both stdio-based JSON-RPC and an in-process Kestrel HTTP Web API on port 8080. - Create a multi-stage `Dockerfile` that builds the native BeaEngine C++ disassembler library, publishes de4dotEx, and deploys them alongside a unified bash entrypoint supporting CLI, Stdio MCP, and HTTP REST modes. - Write a secondary `Dockerfile.wine` for Wine-based execution with full Windows .NET Framework 4.8 JIT-hook dynamic unpacking parity. - Resolve a cflow emulator crash by catching invalid branch target exceptions (null fall-throughs) inside `BlockCflowDeobfuscator.cs`, allowing the process to gracefully skip corrupted traps instead of aborting. - Add `MetadataFlags.KeepOldMaxStack` as a global save fallback inside `ObfuscatedFile.cs` to eliminate metadata writer stack-depth recalculation warnings and crashes on heavily obfuscated code. - Add `test_api.sh` client utility script for local testing. - Consolidate all Docker and MCP configuration and troubleshooting documentation directly into the primary `README.md` file. - Create and install a custom Gemini CLI Skill `dotnet-deobfuscate` to provide native, expert-level deobfuscation guidelines inside the agent context.
doomedraven
force-pushed
the
feat/mcp-docker-support
branch
from
July 23, 2026 18:32
3411076 to
8fac013
Compare
Author
|
i will split this PR into smallers for easier review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds native cross-platform Docker containerization and native C# Model Context Protocol (MCP) server capabilities to
de4dotEx. It also includes critical reliability safeguards for the control flow emulator and assembly writer to prevent crashes on modern, aggressively obfuscated binaries.Key Changes
Native C# MCP & Web API Server (
de4dot.mcp):stdin/stdout.POST /deobfuscatefile uploads) that processes assemblies in-process and downloads the output directly.Unified Multi-Stage Dockerization (
Dockerfile):BeaEnginedisassembler library inside the container (libBeaEngine.so) and deploys both standard CLI and MCP/Web API modes, handled by a unified routing entrypoint script.Dockerfile.wineproviding full emulation compatibility for advanced JIT-hook protectors (ILProtector, Agile.NET).Critical Emulator and Writer Safeguards:
BlockCflowDeobfuscator.csand gracefully skips them rather than aborting the entire run.KeepOldMaxStackSave Optimization: ForcesMetadataFlags.KeepOldMaxStackinsideObfuscatedFile.csto eliminate metadata writer calculation crashes on complex obfuscated code, guaranteeing execution safety under the .NET JIT.Integration Guides & Clients:
README.md.test_api.shbash script to easily verify the local Web API.