-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Owner
authored and
Owner
committed
Oct 4, 2021
1 parent
4e7c16e
commit 699c473
Showing
38 changed files
with
4,887 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[*.cs] | ||
|
||
# IDE0022: Use block body for methods | ||
csharp_style_expression_bodied_methods = true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | ||
</startup> | ||
<runtime> | ||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
</assemblyBinding> | ||
</runtime> | ||
</configuration> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{4363303C-AF4C-4C1B-8284-FC468514C15D}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<RootNamespace>NetReactorSlayer_x64</RootNamespace> | ||
<AssemblyName>NetReactorSlayer-x64</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
<NuGetPackageImportStamp> | ||
</NuGetPackageImportStamp> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>x64</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>..\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<StartupObject>NetReactorSlayer_x64.Program</StartupObject> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="NetReactorSlayer.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\Debug\NetReactorSlayer.Core.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="App.config" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace NetReactorSlayer_x64 | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) => NetReactorSlayer.Core.Program.Main(args); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("NetReactorSlayer-x64")] | ||
[assembly: AssemblyDescription("Deobfuscator for eziriz.com/dotnet_reactor.htm")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("CS-RET")] | ||
[assembly: AssemblyProduct("NetReactorSlayer")] | ||
[assembly: AssemblyCopyright("Copyright © 2021-2021 CS-RET")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("4363303c-af4c-4c1b-8284-fc468514c15d")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{11E508F0-7AA3-46BD-9891-766DEB293830}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>NetReactorSlayer.Core</RootNamespace> | ||
<AssemblyName>NetReactorSlayer.Core</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
<NuGetPackageImportStamp> | ||
</NuGetPackageImportStamp> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>..\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="0Harmony, Version=2.1.1.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Lib.Harmony.2.1.1\lib\net45\0Harmony.dll</HintPath> | ||
</Reference> | ||
<Reference Include="de4dot.blocks, Version=3.1.41592.3405, Culture=neutral, PublicKeyToken=d3f3ed1e47f67fc6, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>Libs\de4dot.blocks.dll</HintPath> | ||
</Reference> | ||
<Reference Include="dnlib, Version=3.3.2.0, Culture=neutral, PublicKeyToken=50e96378b6e77999, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\dnlib.3.3.2\lib\net45\dnlib.dll</HintPath> | ||
</Reference> | ||
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.3.11, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Protections\Anti.cs" /> | ||
<Compile Include="Protections\ControlFlow.cs" /> | ||
<Compile Include="Protections\EmbeddedAsm.cs" /> | ||
<Compile Include="Protections\HideCall.cs" /> | ||
<Compile Include="Protections\Native.cs" /> | ||
<Compile Include="Protections\NecroBit.cs" /> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="Protections\ProxyCall.cs" /> | ||
<Compile Include="Protections\Remover.cs" /> | ||
<Compile Include="Protections\Resources.cs" /> | ||
<Compile Include="Protections\Strings.cs" /> | ||
<Compile Include="Utils\de4dot\ArrayFinder.cs" /> | ||
<Compile Include="Utils\de4dot\AssemblyModule.cs" /> | ||
<Compile Include="Utils\Context.cs" /> | ||
<Compile Include="Utils\de4dot\DeobUtils.cs" /> | ||
<Compile Include="Utils\de4dot\DumpedMethodsRestorer.cs" /> | ||
<Compile Include="Utils\de4dot\LocalTypes.cs" /> | ||
<Compile Include="Utils\Logger.cs" /> | ||
<Compile Include="Utils\de4dot\MethodBodyParser.cs" /> | ||
<Compile Include="Utils\de4dot\MyPEImage.cs" /> | ||
<Compile Include="Utils\de4dot\QuickLZ.cs" /> | ||
<Compile Include="Utils\de4dot\TheAssemblyResolver.cs" /> | ||
<Compile Include="Utils\Variables.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="app.config" /> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="Libs\de4dot.blocks.dll" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using NETReactorSlayer.Core.Protections; | ||
using NETReactorSlayer.Core.Utils; | ||
using System; | ||
using System.Diagnostics; | ||
|
||
namespace NetReactorSlayer.Core | ||
{ | ||
public class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
Console.Title = ".NET Reactor Slayer v" + Variables.version + " by CS-RET"; | ||
Console.BackgroundColor = ConsoleColor.Black; | ||
Console.ForegroundColor = ConsoleColor.White; | ||
Console.Clear(); | ||
Logger.PrintLogo(); | ||
if (Context.Parse(args)) | ||
{ | ||
if (Variables.options["necrobit"]) NecroBit.Execute(); | ||
|
||
ControlFlow.Execute(); | ||
|
||
Anti.Execute( | ||
Variables.options["antidebug"], | ||
Variables.options["antitamper"]); | ||
|
||
if (Variables.options["proxycall"]) ProxyCall.Execute(); | ||
|
||
if (Variables.options["hidecall"]) HideCall.Execute(); | ||
|
||
if (Variables.options["str"]) Strings.Execute(); | ||
|
||
if (Variables.options["rsrc"]) Resources.Execute(); | ||
|
||
if (Variables.options["dump"]) EmbeddedAsm.Execute(); | ||
|
||
Remover.Execute(); | ||
Context.Save(); | ||
} | ||
Console.WriteLine("\r\n Press any key to exit . . ."); | ||
Console.ReadKey(); | ||
if (!Context.IsNative) return; | ||
Process.Start(new ProcessStartInfo("cmd.exe", "/C ping 1.1.1.1 -n 1 -w 3000 > Nul & Del \"" + Context.FilePath + "\"") { WindowStyle = ProcessWindowStyle.Hidden }).Dispose(); | ||
Process.GetCurrentProcess().Kill(); | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("NetReactorSlayer.Core")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("NetReactorSlayer.Core")] | ||
[assembly: AssemblyCopyright("Copyright © 2021")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("11e508f0-7aa3-46bd-9891-766deb293830")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using dnlib.DotNet; | ||
using dnlib.DotNet.Emit; | ||
using NETReactorSlayer.Core.Utils; | ||
using System.Linq; | ||
|
||
namespace NETReactorSlayer.Core.Protections | ||
{ | ||
class Anti | ||
{ | ||
public static void Execute(bool antiDebug = true, bool antiTamper = true) | ||
{ | ||
bool isAntiTamperFound = false; | ||
bool isAntiDebugFound = false; | ||
foreach (TypeDef type in Context.Module.GetTypes()) | ||
{ | ||
foreach (MethodDef method in (from x in type.Methods where x.HasBody && x.Body.HasInstructions && x.IsStatic select x).ToArray<MethodDef>()) | ||
{ | ||
foreach (Instruction instruction in (from x in method.Body.Instructions where x.OpCode.Equals(OpCodes.Ldstr) select x).ToArray<Instruction>()) | ||
{ | ||
if (instruction.Operand.ToString().Contains("Debugger Detected") && antiDebug) | ||
{ | ||
isAntiDebugFound = true; | ||
Remover.MethodsToPatch.Add(method); | ||
Instruction ins = Instruction.Create(OpCodes.Ret); | ||
CilBody cli = new CilBody(); | ||
cli.Instructions.Add(ins); | ||
method.Body = cli; | ||
Logger.Info("Anti debugger removed."); | ||
} | ||
if (instruction.Operand.ToString().Contains("is tampered") && antiTamper) | ||
{ | ||
isAntiTamperFound = true; | ||
Remover.MethodsToPatch.Add(method); | ||
Instruction ins = Instruction.Create(OpCodes.Ret); | ||
CilBody cli = new CilBody(); | ||
cli.Instructions.Add(ins); | ||
method.Body = cli; | ||
Logger.Info("Anti tamper removed."); | ||
} | ||
} | ||
} | ||
} | ||
if (!isAntiTamperFound) | ||
Logger.Warn("Couldn't find anti tamper method."); | ||
if (!isAntiDebugFound) | ||
Logger.Warn("Couldn't find debugger method."); | ||
} | ||
} | ||
} |
Oops, something went wrong.