le crypteur build maintenant

This commit is contained in:
2023-02-10 18:15:37 +01:00
parent 2b4e2bc775
commit ebf35030d3
6 changed files with 66106 additions and 25 deletions

View File

@@ -78,20 +78,20 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath)</IncludePath> <IncludePath>$(SolutionDir)Zydis;$(IncludePath)</IncludePath>
<AllProjectIncludesArePublic>false</AllProjectIncludesArePublic> <AllProjectIncludesArePublic>false</AllProjectIncludesArePublic>
<LibraryPath>$(LibraryPath)</LibraryPath> <LibraryPath>$(LibraryPath);$(SolutionDir)lib</LibraryPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath)</IncludePath> <IncludePath>$(SolutionDir)Zydis;$(IncludePath)</IncludePath>
<AllProjectIncludesArePublic>false</AllProjectIncludesArePublic> <AllProjectIncludesArePublic>false</AllProjectIncludesArePublic>
<LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);</LibraryPath> <LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);;$(SolutionDir)lib</LibraryPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Label="Vcpkg"> <PropertyGroup Label="Vcpkg">
<VcpkgEnabled>true</VcpkgEnabled> <VcpkgEnabled>false</VcpkgEnabled>
<VcpkgManifestInstall>true</VcpkgManifestInstall> <VcpkgManifestInstall>false</VcpkgManifestInstall>
<VcpkgAutoLink>true</VcpkgAutoLink> <VcpkgAutoLink>false</VcpkgAutoLink>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
@@ -127,12 +127,13 @@
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard> <LanguageStandard>stdcpplatest</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>Zydis_debug.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -143,7 +144,8 @@
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;TRIALDLL_EXPORT</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;TRIALDLL_EXPORT</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard> <LanguageStandard>stdcpplatest</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>

54198
Crypter/Zydis/Zydis.c Normal file

File diff suppressed because one or more lines are too long

11883
Crypter/Zydis/Zydis.h Normal file

File diff suppressed because it is too large Load Diff

BIN
Crypter/lib/Zydis_debug.lib Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -7,9 +7,8 @@
#include <filesystem> #include <filesystem>
#include <inttypes.h> #include <inttypes.h>
#include <Zydis/Zydis.h> #define ZYDIS_STATIC_BUILD
#include <Zycore/LibC.h> #include <Zydis.h>
#include <Zycore/API/Memory.h>
#include "random.hpp" #include "random.hpp"
#include "utils.hpp" #include "utils.hpp"
@@ -220,8 +219,6 @@ int main(int argc, char* argv[]) {
if (changed) { if (changed) {
printf(" Instruction %s changed\n", buffer); printf(" Instruction %s changed\n", buffer);
}
// Encode the instruction back to raw bytes. // Encode the instruction back to raw bytes.
uint8_t new_bytes[ZYDIS_MAX_INSTRUCTION_LENGTH]; uint8_t new_bytes[ZYDIS_MAX_INSTRUCTION_LENGTH];
ZyanUSize new_instr_length = sizeof(new_bytes); ZyanUSize new_instr_length = sizeof(new_bytes);
@@ -233,6 +230,7 @@ int main(int argc, char* argv[]) {
ZydisFormatterFormatInstruction(&formatter, &instruction, operands, ZydisFormatterFormatInstruction(&formatter, &instruction, operands,
instruction.operand_count_visible, buffer, sizeof(buffer), 0, NULL); instruction.operand_count_visible, buffer, sizeof(buffer), 0, NULL);
printf(" New instruction: %s\n", buffer); printf(" New instruction: %s\n", buffer);
}
offset += instruction.length; offset += instruction.length;
runtime_address += instruction.length; runtime_address += instruction.length;