Lead.EnvironmentManagement
2.0.0
dotnet add package Lead.EnvironmentManagement --version 2.0.0
NuGet\Install-Package Lead.EnvironmentManagement -Version 2.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Lead.EnvironmentManagement" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lead.EnvironmentManagement" Version="2.0.0" />
<PackageReference Include="Lead.EnvironmentManagement" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Lead.EnvironmentManagement --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Lead.EnvironmentManagement, 2.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Lead.EnvironmentManagement@2.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Lead.EnvironmentManagement&version=2.0.0
#tool nuget:?package=Lead.EnvironmentManagement&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Lead.EnvironmentManagement
One-click preset sandbox environments for Windows and Linux — system info spoofing, file virtualization, and runtime variable inspection, built on top of Lead.Sandbox.
Features
- Preset Environments: Windows/Linux sandbox with Honeypot, Block, or Redirect modes
- System Info Spoofing: Fake
Environment,RuntimeInformationAPI responses - Linux File Virtualization: Virtual
/proc,/etcfiles (cpuinfo,os-release,passwd, etc.) - Runtime Inspection: Read/write static/instance fields and properties, invoke methods on loaded assemblies
Quick Start
using Lead.EnvironmentManagement;
// Windows honeypot sandbox
using var sandbox = PresetSandbox.CreateWindowsHoneypot();
// Linux honeypot with custom profile
var linuxProfile = new EnvironmentProfile
{
IsLinux = true,
MachineName = "my-fake-host",
ProcessorCount = 2,
ProcessArchitecture = Architecture.Arm64,
};
using var linux = PresetSandbox.CreateLinuxHoneypot(linuxProfile);
// Load and inspect a plugin
var result = await sandbox.LoadPluginAsync("plugin.dll");
if (result.Success)
{
var inspector = sandbox.Inspector!;
var value = inspector.GetStaticFieldValue("MyApp.Config", "Version");
inspector.SetStaticFieldValue("MyApp.Config", "Version", "2.0");
}
Preset Environments
| Method | OS | Mode | Description |
|---|---|---|---|
CreateWindowsHoneypot() |
Windows | Honeypot | Allow + log all access |
CreateWindowsBlock() |
Windows | Block | Block file/network access |
CreateWindowsRedirect() |
Windows | Redirect | Redirect to sandbox directory |
CreateLinuxHoneypot() |
Linux | Honeypot | Allow + log + virtual /proc, /etc |
CreateLinuxBlock() |
Linux | Block | Block file/network access |
CreateLinuxRedirect() |
Linux | Redirect | Redirect to sandbox directory |
Environment Profiles
Built-in profiles: EnvironmentProfile.WindowsDefault, EnvironmentProfile.LinuxDefault, EnvironmentProfile.LinuxArm64.
Custom profiles:
var profile = new EnvironmentProfile
{
MachineName = "fake-server",
UserName = "admin",
ProcessorCount = 16,
ProcessArchitecture = Architecture.X64,
OSArchitecture = Architecture.X64,
OSDescriptionString = "Linux 5.15.0-generic x86_64",
EnvironmentVariables = new() { { "CUSTOM_VAR", "value" } }
};
Runtime Inspector
var inspector = sandbox.Inspector;
// Static fields/properties
inspector.GetStaticFieldValue("Namespace.Type", "FieldName");
inspector.SetStaticFieldValue("Namespace.Type", "FieldName", value);
inspector.GetStaticPropertyValue("Namespace.Type", "PropertyName");
inspector.SetStaticPropertyValue("Namespace.Type", "PropertyName", value);
// Instance fields/properties
inspector.GetInstanceFieldValue(instance, "FieldName");
inspector.SetInstanceFieldValue(instance, "FieldName", value);
inspector.GetInstancePropertyValue(instance, "PropertyName");
inspector.SetInstancePropertyValue(instance, "PropertyName", value);
// Method invocation
inspector.InvokeStaticMethod("Namespace.Type", "MethodName", args);
inspector.InvokeInstanceMethod(instance, "MethodName", args);
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Lead.Sandbox (>= 2.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.