diff --git a/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/test.cpp b/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/test.cpp index a0334829..a5a9fe75 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/test.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/test.cpp @@ -113,7 +113,6 @@ CommandTestPerformTest(PDEBUGGEE_KERNEL_AND_USER_TEST_INFORMATION KernelSideInfo HANDLE ThreadHandle; HANDLE ProcessHandle; UINT32 ReadBytes; - BOOLEAN SentMessageResult; CHAR * Buffer = {0}; // diff --git a/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/monitor.cpp b/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/monitor.cpp index adeee013..4e351677 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/monitor.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/monitor.cpp @@ -65,7 +65,6 @@ CommandMonitor(vector SplittedCommand, string Command) UINT32 ActionCustomCodeLength = 0; UINT32 ActionScriptLength = 0; UINT32 HookLength = 0; - UINT64 TargetAddress; UINT64 OptionalParam1 = 0; // Set the 'from' target address UINT64 OptionalParam2 = 0; // Set the 'to' target address BOOLEAN SetFrom = FALSE; diff --git a/hyperdbg/hprdbgctrl/code/debugger/commands/meta-commands/detach.cpp b/hyperdbg/hprdbgctrl/code/debugger/commands/meta-commands/detach.cpp index fe2d0d4d..630fc151 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/commands/meta-commands/detach.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/commands/meta-commands/detach.cpp @@ -38,8 +38,6 @@ CommandDetachHelp() VOID DetachFromProcess() { - BOOLEAN Status; - ULONG ReturnedLength; DEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS DetachRequest = {0}; // diff --git a/hyperdbg/hprdbgctrl/code/debugger/core/debugger.cpp b/hyperdbg/hprdbgctrl/code/debugger/core/debugger.cpp index c5b4aec1..3fe756c8 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/core/debugger.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/core/debugger.cpp @@ -720,7 +720,6 @@ InterpretScript(vector * SplittedCommand, string AppendedFinalBuffer; vector SaveBuffer; vector IndexesToRemove; - UCHAR * FinalBuffer; int Index = 0; int NewIndexToRemove = 0; int OpenBracket = 0; diff --git a/hyperdbg/hprdbgctrl/code/debugger/driver-loader/install.cpp b/hyperdbg/hprdbgctrl/code/debugger/driver-loader/install.cpp index 2bfa0483..3b578159 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/driver-loader/install.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/driver-loader/install.cpp @@ -285,7 +285,6 @@ StartDriver(SC_HANDLE SchSCManager, LPCTSTR DriverName) { SC_HANDLE SchService; DWORD LastError; - SERVICE_STATUS serviceStatus; UINT64 Status = TRUE; // diff --git a/hyperdbg/hprdbgctrl/code/debugger/kernel-level/kd.cpp b/hyperdbg/hprdbgctrl/code/debugger/kernel-level/kd.cpp index f68079df..d971f45d 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/kernel-level/kd.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/kernel-level/kd.cpp @@ -1329,7 +1329,6 @@ BOOLEAN KdReceivePacketFromDebuggee(CHAR * BufferToSave, UINT32 * LengthReceived) { - BOOL Status; /* Status */ char ReadData = NULL; /* temperory Character */ DWORD NoBytesRead = 0; /* Bytes read by ReadFile() */ UINT32 Loop = 0; @@ -1420,7 +1419,6 @@ BOOLEAN KdReceivePacketFromDebugger(CHAR * BufferToSave, UINT32 * LengthReceived) { - BOOL Status; /* Status */ char ReadData = NULL; /* temperory Character */ DWORD NoBytesRead = 0; /* Bytes read by ReadFile() */ UINT32 Loop = 0; @@ -1897,8 +1895,6 @@ BOOLEAN KdPrepareSerialConnectionToRemoteSystem(HANDLE SerialHandle, BOOLEAN IsNamedPipe) { -StartAgain: - BOOL Status; /* Status */ DWORD EventMask = 0; /* Event mask to trigger */ @@ -3127,7 +3123,6 @@ VOID KdSendSymbolDetailPacket(PMODULE_SYMBOL_DETAIL SymbolDetailPacket, UINT32 CurrentSymbolInfoIndex, UINT32 TotalSymbols) { BOOLEAN Result; - ULONG ReturnedLength; PDEBUGGER_UPDATE_SYMBOL_TABLE UsermodeSymDetailRequest; UsermodeSymDetailRequest = diff --git a/hyperdbg/hprdbgctrl/code/debugger/misc/disassembler.cpp b/hyperdbg/hprdbgctrl/code/debugger/misc/disassembler.cpp index d6806afc..3ddfd0aa 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/misc/disassembler.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/misc/disassembler.cpp @@ -419,7 +419,6 @@ HyperDbgIsConditionalJumpTaken(unsigned char * BufferToDisassemble, UINT64 CurrentRip = 0; int instr_decoded = 0; ZydisDecodedInstruction instruction; - char buffer[256]; UINT32 MaximumInstrDecoded = 1; if (ZydisGetVersion() != ZYDIS_VERSION) @@ -856,7 +855,6 @@ HyperDbgLengthDisassemblerEngine( UINT64 CurrentRip = 0; int instr_decoded = 0; ZydisDecodedInstruction instruction; - char buffer[256]; UINT32 MaximumInstrDecoded = 1; if (ZydisGetVersion() != ZYDIS_VERSION) diff --git a/hyperdbg/hprdbgctrl/code/debugger/misc/readmem.cpp b/hyperdbg/hprdbgctrl/code/debugger/misc/readmem.cpp index 14a6f869..5763edfe 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/misc/readmem.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/misc/readmem.cpp @@ -42,8 +42,6 @@ HyperDbgReadMemoryAndDisassemble(DEBUGGER_SHOW_MEMORY_STYLE Style, BOOL Status; ULONG ReturnedLength; DEBUGGER_READ_MEMORY ReadMem = {0}; - UINT32 OperationCode; - CHAR Character; UINT32 SizeOfTargetBuffer; ReadMem.Address = Address; @@ -407,7 +405,6 @@ ShowMemoryCommandDC(unsigned char * OutputBuffer, UINT Size, UINT64 Address, DEB void ShowMemoryCommandDD(unsigned char * OutputBuffer, UINT Size, UINT64 Address, DEBUGGER_READ_MEMORY_TYPE MemoryType, UINT64 Length) { - CHAR Character; for (int i = 0; i < Size; i += 16) { if (MemoryType == DEBUGGER_READ_PHYSICAL_ADDRESS) diff --git a/hyperdbg/hprdbgctrl/code/debugger/transparency/transparency.cpp b/hyperdbg/hprdbgctrl/code/debugger/transparency/transparency.cpp index 20f966ef..7a341a35 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/transparency/transparency.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/transparency/transparency.cpp @@ -22,7 +22,6 @@ unsigned long long TransparentModeRdtscDiffVmexit() { unsigned long long ret, ret2; - unsigned eax, edx; int cpuid_result[4] = {0}; // diff --git a/hyperdbg/hyperdbg-cli/hyperdbg-cli.vcxproj b/hyperdbg/hyperdbg-cli/hyperdbg-cli.vcxproj index bf581dfe..8d2b936b 100644 --- a/hyperdbg/hyperdbg-cli/hyperdbg-cli.vcxproj +++ b/hyperdbg/hyperdbg-cli/hyperdbg-cli.vcxproj @@ -76,6 +76,7 @@ $(SolutionDir)build\bin\$(Configuration)\HPRDBGCTRL.lib;%(AdditionalDependencies) AsInvoker + true if exist "$(OutDir)SDK\" rd /q /s "$(OutDir)SDK\" @@ -122,6 +123,7 @@ copy "$(OutDir)hprdbghv.dll" "$(OutDir)SDK\Libraries\hprdbghv.dll" $(SolutionDir)build\bin\$(Configuration)\HPRDBGCTRL.lib;%(AdditionalDependencies) AsInvoker + true if exist "$(OutDir)SDK\" rd /q /s "$(OutDir)SDK\" diff --git a/hyperdbg/hyperdbg-test/code/tests/hyperdbg-test.cpp b/hyperdbg/hyperdbg-test/code/tests/hyperdbg-test.cpp index 4049b25f..5e626672 100644 --- a/hyperdbg/hyperdbg-test/code/tests/hyperdbg-test.cpp +++ b/hyperdbg/hyperdbg-test/code/tests/hyperdbg-test.cpp @@ -60,7 +60,7 @@ main(int argc, char * argv[]) } SentMessageResult = - NamedPipeClientSendMessage(PipeHandle, Buffer, strlen(Buffer) + 1); + NamedPipeClientSendMessage(PipeHandle, Buffer, (int)strlen(Buffer) + 1); if (!SentMessageResult) { @@ -101,7 +101,7 @@ main(int argc, char * argv[]) "Wow! I miss you... Would you plz send me the kernel information?"); SentMessageResult = - NamedPipeClientSendMessage(PipeHandle, Buffer, strlen(Buffer) + 1); + NamedPipeClientSendMessage(PipeHandle, Buffer, (int)strlen(Buffer) + 1); if (!SentMessageResult) { diff --git a/hyperdbg/hyperdbg-test/code/tests/lookup.cpp b/hyperdbg/hyperdbg-test/code/tests/lookup.cpp index eb7f452c..df18e72c 100644 --- a/hyperdbg/hyperdbg-test/code/tests/lookup.cpp +++ b/hyperdbg/hyperdbg-test/code/tests/lookup.cpp @@ -182,7 +182,7 @@ TestCreateLookupTable(HANDLE PipeHandle, PVOID KernelInformation, UINT32 KernelI string OutputCommand = "cmd:" + NewCase; - SentMessageResult = NamedPipeClientSendMessage(PipeHandle, (char *)OutputCommand.c_str(), OutputCommand.length() + 1); + SentMessageResult = NamedPipeClientSendMessage(PipeHandle, (char *)OutputCommand.c_str(), (int)OutputCommand.length() + 1); if (!SentMessageResult) { // diff --git a/hyperdbg/hyperdbg-test/code/tests/namedpipe.cpp b/hyperdbg/hyperdbg-test/code/tests/namedpipe.cpp index b76250a0..3d28d01d 100644 --- a/hyperdbg/hyperdbg-test/code/tests/namedpipe.cpp +++ b/hyperdbg/hyperdbg-test/code/tests/namedpipe.cpp @@ -360,7 +360,7 @@ NamedPipeServerExample() SentMessageResult = NamedPipeServerSendMessageToClient( PipeHandle, BufferToSend, - strlen(BufferToSend) + 1); + (int)strlen(BufferToSend) + 1); if (!SentMessageResult) { @@ -406,7 +406,7 @@ NamedPipeClientExample() } SentMessageResult = - NamedPipeClientSendMessage(PipeHandle, Buffer, strlen(Buffer) + 1); + NamedPipeClientSendMessage(PipeHandle, Buffer, (int)strlen(Buffer) + 1); if (!SentMessageResult) { diff --git a/hyperdbg/hyperdbg-test/hyperdbg-test.vcxproj b/hyperdbg/hyperdbg-test/hyperdbg-test.vcxproj index 8cd38f4b..e028175c 100644 --- a/hyperdbg/hyperdbg-test/hyperdbg-test.vcxproj +++ b/hyperdbg/hyperdbg-test/hyperdbg-test.vcxproj @@ -67,10 +67,12 @@ Use pch.h MultiThreadedDebug + true Console true + true @@ -85,12 +87,14 @@ Use pch.h MultiThreaded + true Console true true true + true diff --git a/hyperdbg/hyperdbg.sln b/hyperdbg/hyperdbg.sln index 6465030b..cf091bf1 100644 --- a/hyperdbg/hyperdbg.sln +++ b/hyperdbg/hyperdbg.sln @@ -213,6 +213,7 @@ Global {C3DC85E1-0559-4B58-9792-DE421472DFE9}.release|ARM64.ActiveCfg = release|x64 {C3DC85E1-0559-4B58-9792-DE421472DFE9}.release|ARM64.Build.0 = release|x64 {C3DC85E1-0559-4B58-9792-DE421472DFE9}.release|x64.ActiveCfg = release|x64 + {C3DC85E1-0559-4B58-9792-DE421472DFE9}.release|x64.Build.0 = release|x64 {C3DC85E1-0559-4B58-9792-DE421472DFE9}.release|x86.ActiveCfg = release|x64 {C3DC85E1-0559-4B58-9792-DE421472DFE9}.release|x86.Build.0 = release|x64 {C2D44C60-3F23-4972-8F60-21083B9FB112}.debug|ARM64.ActiveCfg = debug|x64 @@ -295,6 +296,7 @@ Global {991B8FA7-F75E-4D8A-A0BD-636FE68B6AF4}.release|ARM64.ActiveCfg = release|x64 {991B8FA7-F75E-4D8A-A0BD-636FE68B6AF4}.release|ARM64.Build.0 = release|x64 {991B8FA7-F75E-4D8A-A0BD-636FE68B6AF4}.release|x64.ActiveCfg = release|x64 + {991B8FA7-F75E-4D8A-A0BD-636FE68B6AF4}.release|x64.Build.0 = release|x64 {991B8FA7-F75E-4D8A-A0BD-636FE68B6AF4}.release|x86.ActiveCfg = release|Win32 {991B8FA7-F75E-4D8A-A0BD-636FE68B6AF4}.release|x86.Build.0 = release|Win32 {79AB8BD3-03A4-4B65-ABF6-313C10A00CC5}.debug|ARM64.ActiveCfg = debug|ARM64 @@ -305,6 +307,7 @@ Global {79AB8BD3-03A4-4B65-ABF6-313C10A00CC5}.release|ARM64.ActiveCfg = release|ARM64 {79AB8BD3-03A4-4B65-ABF6-313C10A00CC5}.release|ARM64.Build.0 = release|ARM64 {79AB8BD3-03A4-4B65-ABF6-313C10A00CC5}.release|x64.ActiveCfg = release|x64 + {79AB8BD3-03A4-4B65-ABF6-313C10A00CC5}.release|x64.Build.0 = release|x64 {79AB8BD3-03A4-4B65-ABF6-313C10A00CC5}.release|x86.ActiveCfg = release|x64 {79AB8BD3-03A4-4B65-ABF6-313C10A00CC5}.release|x86.Build.0 = release|x64 EndGlobalSection diff --git a/hyperdbg/include/SDK/Examples/hyperdbg_app/code/hyperdbg-app.cpp b/hyperdbg/include/SDK/Examples/hyperdbg_app/code/hyperdbg-app.cpp index 7a3ab978..5a548ff9 100644 --- a/hyperdbg/include/SDK/Examples/hyperdbg_app/code/hyperdbg-app.cpp +++ b/hyperdbg/include/SDK/Examples/hyperdbg_app/code/hyperdbg-app.cpp @@ -90,8 +90,6 @@ ReadIrpBasedBuffer() UINT32 OperationCode; DWORD ErrorNum; HANDLE Handle; - BOOLEAN OutputSourceFound; - PLIST_ENTRY TempList; RegisterEvent.hEvent = NULL; RegisterEvent.Type = IRP_BASED; @@ -372,8 +370,6 @@ ReversingMachineStart() int HyperDbgUnloadReversingMachine() { - BOOL Status; - // // Check if driver is loaded // diff --git a/hyperdbg/include/SDK/Examples/hyperdbg_app/hprdbgrev.vcxproj b/hyperdbg/include/SDK/Examples/hyperdbg_app/hprdbgrev.vcxproj index 27c0160c..7a781963 100644 --- a/hyperdbg/include/SDK/Examples/hyperdbg_app/hprdbgrev.vcxproj +++ b/hyperdbg/include/SDK/Examples/hyperdbg_app/hprdbgrev.vcxproj @@ -123,11 +123,13 @@ Create pch.h $(SolutionDir)\include;$(ProjectDir)\header;%(AdditionalIncludeDirectories) + true Console true $(SolutionDir)build\bin\$(Configuration)\hprdbgctrl.lib;%(AdditionalDependencies) + true @@ -142,6 +144,7 @@ Create pch.h $(SolutionDir)\include;$(ProjectDir)\header;%(AdditionalIncludeDirectories) + true Console @@ -149,6 +152,7 @@ true true $(SolutionDir)build\bin\$(Configuration)\hprdbgctrl.lib;%(AdditionalDependencies) + true diff --git a/hyperdbg/include/SDK/Examples/hyperdbg_driver/hyperdbg_driver.vcxproj b/hyperdbg/include/SDK/Examples/hyperdbg_driver/hyperdbg_driver.vcxproj index f887d0c9..a6cb2789 100644 --- a/hyperdbg/include/SDK/Examples/hyperdbg_driver/hyperdbg_driver.vcxproj +++ b/hyperdbg/include/SDK/Examples/hyperdbg_driver/hyperdbg_driver.vcxproj @@ -100,7 +100,7 @@ pch.h - false + true $(SolutionDir)build\bin\$(Configuration)\hyperlog.lib;$(SolutionDir)build\bin\$(Configuration)\hprdbghv.lib;%(AdditionalDependencies) DriverEntry @@ -118,7 +118,7 @@ pch.h - false + true $(SolutionDir)build\bin\$(Configuration)\hyperlog.lib;$(SolutionDir)build\bin\$(Configuration)\hprdbghv.lib;%(AdditionalDependencies) DriverEntry diff --git a/hyperdbg/symbol-parser/code/symbol-parser.cpp b/hyperdbg/symbol-parser/code/symbol-parser.cpp index c34b1a9f..7f5393b9 100644 --- a/hyperdbg/symbol-parser/code/symbol-parser.cpp +++ b/hyperdbg/symbol-parser/code/symbol-parser.cpp @@ -2160,7 +2160,7 @@ SymShowDataBasedOnSymbolTypes(const char * TypeName, // 2. type (structure) name // 3. PDB file location // - SizeOfArgv = SplitedSymPath.size() + 3; + SizeOfArgv = (UINT32)SplitedSymPath.size() + 3; ArgvArray = (char **)malloc(SizeOfArgv * sizeof(char *)); if (ArgvArray == NULL) diff --git a/hyperdbg/symbol-parser/symbol-parser.vcxproj b/hyperdbg/symbol-parser/symbol-parser.vcxproj index af61f947..ed0ebc30 100644 --- a/hyperdbg/symbol-parser/symbol-parser.vcxproj +++ b/hyperdbg/symbol-parser/symbol-parser.vcxproj @@ -63,11 +63,13 @@ Use pch.h $(SolutionDir)\include;$(SolutionDir)dependencies;$(ProjectDir);%(AdditionalIncludeDirectories) + true Console true $(SolutionDir)build\bin\$(Configuration)\pdbex.lib;%(AdditionalDependencies) + true @@ -82,6 +84,7 @@ Use pch.h $(SolutionDir)\include;$(SolutionDir)dependencies;$(ProjectDir);%(AdditionalIncludeDirectories) + true Console @@ -89,6 +92,7 @@ true true $(SolutionDir)build\bin\$(Configuration)\pdbex.lib;%(AdditionalDependencies) + true