diff --git a/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/e.cpp b/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/e.cpp index 8a69ad99..399672cb 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/e.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/e.cpp @@ -138,6 +138,7 @@ CommandEditMemory(vector SplittedCommand, string Command) continue; } + if (NextIsProcId) { // @@ -375,7 +376,7 @@ CommandEditMemory(vector SplittedCommand, string Command) return; } - if (EditMemoryRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (EditMemoryRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Was successful, nothing to do diff --git a/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/events.cpp b/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/events.cpp index 72263aeb..8d8a0477 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/events.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/events.cpp @@ -500,7 +500,7 @@ CommandEventsHandleModifiedEvent( UINT64 Tag, PDEBUGGER_MODIFY_EVENTS ModifyEventRequest) { - if (ModifyEventRequest->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (ModifyEventRequest->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Successfull, nothing to show but we should also diff --git a/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/flush.cpp b/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/flush.cpp index 26ab26be..1fc0cc47 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/flush.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/flush.cpp @@ -80,7 +80,7 @@ CommandFlushRequestFlush() return; } - if (FlushRequest.KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (FlushRequest.KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // The amount of message that are deleted are the amount of diff --git a/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/lm.cpp b/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/lm.cpp index 2dc55f50..a8bcd981 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/lm.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/lm.cpp @@ -97,7 +97,7 @@ CommandLmShowUserModeModule(UINT32 ProcessId, const char * SearchModule) // // Check if counting modules was successful or not // - if (ModuleCountRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (ModuleCountRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { ModulesCount = ModuleCountRequest.ModulesCount; @@ -147,7 +147,7 @@ CommandLmShowUserModeModule(UINT32 ProcessId, const char * SearchModule) // // Show modules list // - if (ModuleCountRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (ModuleCountRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { Modules = (PUSERMODE_LOADED_MODULE_SYMBOLS)((UINT64)ModuleDetailsRequest + sizeof(USERMODE_LOADED_MODULE_DETAILS)); diff --git a/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/prealloc.cpp b/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/prealloc.cpp index e4be7b40..e09483a6 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/prealloc.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/prealloc.cpp @@ -112,7 +112,7 @@ CommandPrealloc(vector SplittedCommand, string Command) return; } - if (PreallocRequest.KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (PreallocRequest.KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { ShowMessages("the requested pools are allocated and reserved\n"); } diff --git a/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/test.cpp b/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/test.cpp index 9d41ef53..4d25d52c 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/test.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/test.cpp @@ -72,7 +72,7 @@ CommandTestPerformKernelTestsIoctl() return FALSE; } - if (KernelTestRequest.KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (KernelTestRequest.KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Nothing to show diff --git a/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/hide.cpp b/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/hide.cpp index 2b5d949f..934e4b36 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/hide.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/hide.cpp @@ -257,7 +257,7 @@ CommandHide(vector SplittedCommand, string Command) return; } - if (FinalRequestBuffer->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (FinalRequestBuffer->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { ShowMessages("transparent debugging successfully enabled :)\n"); } diff --git a/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/pa2va.cpp b/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/pa2va.cpp index c2f4ff94..d87b7699 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/pa2va.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/pa2va.cpp @@ -190,7 +190,7 @@ CommandPa2va(vector SplittedCommand, string Command) return; } - if (AddressDetails.KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (AddressDetails.KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Show the results diff --git a/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/pte.cpp b/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/pte.cpp index 2825635c..609a1c0f 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/pte.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/pte.cpp @@ -233,7 +233,7 @@ CommandPte(vector SplittedCommand, string Command) return; } - if (AddressDetails.KernelStatus != DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (AddressDetails.KernelStatus != DEBUGGER_OPERATION_WAS_SUCCESSFUL) { ShowErrorMessage(AddressDetails.KernelStatus); return; diff --git a/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/unhide.cpp b/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/unhide.cpp index 5dc4dbbb..9628f3f6 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/unhide.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/unhide.cpp @@ -80,7 +80,7 @@ CommandUnhide(vector SplittedCommand, string Command) return; } - if (UnhideRequest.KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (UnhideRequest.KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { ShowMessages("transparent debugging successfully disabled :)\n"); } diff --git a/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/va2pa.cpp b/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/va2pa.cpp index 0b7dc7c7..876203b9 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/va2pa.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/commands/extension-commands/va2pa.cpp @@ -192,7 +192,7 @@ CommandVa2pa(vector SplittedCommand, string Command) return; } - if (AddressDetails.KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (AddressDetails.KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Show the results diff --git a/hyperdbg/hprdbgctrl/code/debugger/core/debugger.cpp b/hyperdbg/hprdbgctrl/code/debugger/core/debugger.cpp index 63cca585..6dde9cfc 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/core/debugger.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/core/debugger.cpp @@ -442,7 +442,7 @@ DebuggerPauseDebuggee() return FALSE; } - if (PauseRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (PauseRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Nothing to show, the request was successfully processed diff --git a/hyperdbg/hprdbgctrl/code/debugger/kernel-level/kd.cpp b/hyperdbg/hprdbgctrl/code/debugger/kernel-level/kd.cpp index bab1204d..b178e1b0 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/kernel-level/kd.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/kernel-level/kd.cpp @@ -2088,7 +2088,7 @@ KdPrepareAndConnectDebugPort(const char * PortName, DWORD Baudrate, UINT32 Port, return FALSE; } - if (DebuggeeRequest->Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (DebuggeeRequest->Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Ignore handling CTRL+C breaks @@ -2303,7 +2303,7 @@ KdSendGeneralBuffersFromDebuggeeToDebugger( } if (GeneralPacketFromDebuggeeToDebuggerRequest->KernelResult != - DEBUGGER_OPERATION_WAS_SUCCESSFULL) + DEBUGGER_OPERATION_WAS_SUCCESSFUL) { ShowErrorMessage(GeneralPacketFromDebuggeeToDebuggerRequest->KernelResult); @@ -2349,7 +2349,7 @@ KdReloadSymbolsInDebuggee(BOOLEAN PauseDebuggee, UINT32 UserProcessId) // // Set the status // - SymReload.KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + SymReload.KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; // // Send the finished request packet diff --git a/hyperdbg/hprdbgctrl/code/debugger/kernel-level/kernel-listening.cpp b/hyperdbg/hprdbgctrl/code/debugger/kernel-level/kernel-listening.cpp index 9ae0e75e..b4bd520e 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/kernel-level/kernel-listening.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/kernel-level/kernel-listening.cpp @@ -398,7 +398,7 @@ StartAgain: (DEBUGGEE_CHANGE_CORE_PACKET *)(((CHAR *)TheActualPacket) + sizeof(DEBUGGER_REMOTE_PACKET)); - if (ChangeCorePacket->Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (ChangeCorePacket->Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { ShowMessages("current operating core changed to 0x%x\n", ChangeCorePacket->NewCore); @@ -421,7 +421,7 @@ StartAgain: (DEBUGGEE_DETAILS_AND_SWITCH_PROCESS_PACKET *)(((CHAR *)TheActualPacket) + sizeof(DEBUGGER_REMOTE_PACKET)); - if (ChangeProcessPacket->Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (ChangeProcessPacket->Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { if (ChangeProcessPacket->ActionType == DEBUGGEE_DETAILS_AND_SWITCH_PROCESS_GET_PROCESS_DETAILS) { @@ -456,7 +456,7 @@ StartAgain: (DEBUGGEE_RESULT_OF_SEARCH_PACKET *)(((CHAR *)TheActualPacket) + sizeof(DEBUGGER_REMOTE_PACKET)); - if (SearchResultsPacket->Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (SearchResultsPacket->Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { if (SearchResultsPacket->CountOfResults == 0) { @@ -481,7 +481,7 @@ StartAgain: (DEBUGGEE_DETAILS_AND_SWITCH_THREAD_PACKET *)(((CHAR *)TheActualPacket) + sizeof(DEBUGGER_REMOTE_PACKET)); - if (ChangeThreadPacket->Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (ChangeThreadPacket->Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { if (ChangeThreadPacket->ActionType == DEBUGGEE_DETAILS_AND_SWITCH_THREAD_GET_THREAD_DETAILS) { @@ -518,7 +518,7 @@ StartAgain: (DEBUGGER_FLUSH_LOGGING_BUFFERS *)(((CHAR *)TheActualPacket) + sizeof(DEBUGGER_REMOTE_PACKET)); - if (FlushPacket->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (FlushPacket->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // The amount of message that are deleted are the amount of @@ -551,7 +551,7 @@ StartAgain: sizeof(DEBUGGER_REMOTE_PACKET) + sizeof(DEBUGGER_CALLSTACK_REQUEST)); - if (CallstackPacket->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (CallstackPacket->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Show the callstack @@ -579,7 +579,7 @@ StartAgain: (DEBUGGER_DEBUGGER_TEST_QUERY_BUFFER *)(((CHAR *)TheActualPacket) + sizeof(DEBUGGER_REMOTE_PACKET)); - if (TestQueryPacket->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (TestQueryPacket->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Nothing to show, everything is shown from the kernel @@ -602,7 +602,7 @@ StartAgain: ScriptPacket = (DEBUGGEE_SCRIPT_PACKET *)(((CHAR *)TheActualPacket) + sizeof(DEBUGGER_REMOTE_PACKET)); - if (ScriptPacket->Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (ScriptPacket->Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Nothing to do @@ -692,7 +692,7 @@ StartAgain: // Set the result of query // if (EventModifyAndQueryPacket->KernelStatus != - DEBUGGER_OPERATION_WAS_SUCCESSFULL) + DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // There was an error @@ -731,7 +731,7 @@ StartAgain: // Show messages as the result of updating symbols // if (SymbolReloadFinishedPacket->KernelStatus != - DEBUGGER_OPERATION_WAS_SUCCESSFULL) + DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // There was an error @@ -761,7 +761,7 @@ StartAgain: DEBUGGER_REMOTE_PACKET)); if (ReadRegisterPacket->KernelStatus == - DEBUGGER_OPERATION_WAS_SUCCESSFULL) + DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Show the result of reading registers like rax=0000000000018b01 @@ -846,7 +846,7 @@ StartAgain: sizeof(DEBUGGER_REMOTE_PACKET)); if (ReadMemoryPacket->KernelStatus == - DEBUGGER_OPERATION_WAS_SUCCESSFULL) + DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Show the result of reading memory like mem=0000000000018b01 @@ -952,7 +952,7 @@ StartAgain: sizeof(DEBUGGER_REMOTE_PACKET)); if (EditMemoryPacket->KernelStatus == - DEBUGGER_OPERATION_WAS_SUCCESSFULL) + DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Show the result of reading memory like mem=0000000000018b01 @@ -975,7 +975,7 @@ StartAgain: BpPacket = (DEBUGGEE_BP_PACKET *)(((CHAR *)TheActualPacket) + sizeof(DEBUGGER_REMOTE_PACKET)); - if (BpPacket->Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (BpPacket->Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Everything was okay, nothing to do @@ -998,7 +998,7 @@ StartAgain: ShortCircuitingPacket = (DEBUGGER_SHORT_CIRCUITING_EVENT *)(((CHAR *)TheActualPacket) + sizeof(DEBUGGER_REMOTE_PACKET)); - if (ShortCircuitingPacket->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (ShortCircuitingPacket->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { ShowMessages("the event's short-circuiting state changed to %s\n", ShortCircuitingPacket->IsShortCircuiting ? "'on'" : "'off'"); } @@ -1019,7 +1019,7 @@ StartAgain: PtePacket = (DEBUGGER_READ_PAGE_TABLE_ENTRIES_DETAILS *)(((CHAR *)TheActualPacket) + sizeof(DEBUGGER_REMOTE_PACKET)); - if (PtePacket->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (PtePacket->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Show the Page Tables result @@ -1043,7 +1043,7 @@ StartAgain: Va2paPa2vaPacket = (DEBUGGER_VA2PA_AND_PA2VA_COMMANDS *)(((CHAR *)TheActualPacket) + sizeof(DEBUGGER_REMOTE_PACKET)); - if (Va2paPa2vaPacket->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (Va2paPa2vaPacket->KernelStatus == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { if (Va2paPa2vaPacket->IsVirtual2Physical) { @@ -1073,7 +1073,7 @@ StartAgain: sizeof(DEBUGGER_REMOTE_PACKET)); if (ListOrModifyBreakpointPacket->Result == - DEBUGGER_OPERATION_WAS_SUCCESSFULL) + DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Everything was okay, nothing to do diff --git a/hyperdbg/hprdbgctrl/code/debugger/script-engine-wrapper/script-engine.cpp b/hyperdbg/hprdbgctrl/code/debugger/script-engine-wrapper/script-engine.cpp index 003467fb..e0abeb21 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/script-engine-wrapper/script-engine.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/script-engine-wrapper/script-engine.cpp @@ -84,7 +84,7 @@ ScriptEngineEvalSingleExpression(string Expr, PBOOLEAN HasError) // // Check whether there was an error in evaluation or not // - if (g_ErrorStateOfResultOfEvaluatedExpression == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (g_ErrorStateOfResultOfEvaluatedExpression == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Everything was fine, return the result of the evaluated diff --git a/hyperdbg/hprdbgctrl/code/debugger/script-engine-wrapper/symbol.cpp b/hyperdbg/hprdbgctrl/code/debugger/script-engine-wrapper/symbol.cpp index 99767298..a2e2ff38 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/script-engine-wrapper/symbol.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/script-engine-wrapper/symbol.cpp @@ -601,7 +601,7 @@ SymbolBuildSymbolTable(PMODULE_SYMBOL_DETAIL * BufferToStoreDetails, // // Check if counting modules was successful or not // - if (ModuleCountRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (ModuleCountRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { ModulesCount = ModuleCountRequest.ModulesCount; @@ -650,7 +650,7 @@ SymbolBuildSymbolTable(PMODULE_SYMBOL_DETAIL * BufferToStoreDetails, // // Show modules list // - if (ModuleCountRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (ModuleCountRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Se the modules buffer diff --git a/hyperdbg/hprdbgctrl/code/debugger/user-level/ud.cpp b/hyperdbg/hprdbgctrl/code/debugger/user-level/ud.cpp index e9d4a84b..709013dc 100644 --- a/hyperdbg/hprdbgctrl/code/debugger/user-level/ud.cpp +++ b/hyperdbg/hprdbgctrl/code/debugger/user-level/ud.cpp @@ -21,7 +21,7 @@ extern DEBUGGER_SYNCRONIZATION_EVENTS_STATE /** * @brief Initialize the user debugger in user mode - * + * * @return VOID */ VOID @@ -49,7 +49,7 @@ UdInitializeUserDebugger() /** * @brief Uninitialize the user debugger in user mode - * + * * @return VOID */ VOID @@ -93,7 +93,7 @@ UdUninitializeUserDebugger() * @param ProcessId * @param ThreadId * @param Is32Bit - * + * * @return VOID */ VOID @@ -121,8 +121,8 @@ UdSetActiveDebuggingProcess(UINT64 DebuggingId, /** * @brief Remove the current active debugging process (thread) - * @param DontSwitchToNewProcess - * + * @param DontSwitchToNewProcess + * * @return VOID */ VOID @@ -137,7 +137,7 @@ UdRemoveActiveDebuggingProcess(BOOLEAN DontSwitchToNewProcess) /** * @brief print error messages relating to the finding thread id * @details this function is used only in the scope of Thread32First - * + * * @return VOID */ VOID @@ -299,7 +299,7 @@ UdCheckThreadByProcessId(DWORD Pid, DWORD Tid) * @param FileName * @param CommandLine * @param ProcessInformation - * + * * @return BOOLEAN */ BOOLEAN @@ -435,7 +435,7 @@ UdAttachToProcess(UINT32 TargetPid, // // Check if attaching was successful then we can set the attached to true // - if (AttachRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (AttachRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { if (!AttachRequest.IsStartingNewProcess) { @@ -494,7 +494,7 @@ UdAttachToProcess(UINT32 TargetPid, // Check whether the result of removing hooks was successful or we should // re-send the request // - if (AttachRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (AttachRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // The hook is remove successfuly @@ -541,7 +541,7 @@ UdAttachToProcess(UINT32 TargetPid, * thread id is valid or not * * @param TargetPid - * + * * @return BOOLEAN */ BOOLEAN @@ -591,7 +591,7 @@ UdKillProcess(UINT32 TargetPid) // // Check if killing was successful or not // - if (KillRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (KillRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Remove the current active debugging process (thread) @@ -617,7 +617,7 @@ UdKillProcess(UINT32 TargetPid) * * @param TargetPid * @param ProcessDetailToken - * + * * @return BOOLEAN */ BOOLEAN @@ -673,7 +673,7 @@ UdDetachProcess(UINT32 TargetPid, UINT64 ProcessDetailToken) // // Check if detaching was successful or not // - if (DetachRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (DetachRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Remove the current active debugging process (thread) @@ -696,7 +696,7 @@ UdDetachProcess(UINT32 TargetPid, UINT64 ProcessDetailToken) * @brief Pause the target process * * @param ProcessDebuggingToken - * + * * @return BOOLEAN */ BOOLEAN @@ -746,7 +746,7 @@ UdPauseProcess(UINT64 ProcessDebuggingToken) // // Check if killing was successful or not // - if (PauseRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (PauseRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // The operation of attaching was successful @@ -770,7 +770,7 @@ UdPauseProcess(UINT64 ProcessDebuggingToken) * @param OptionalParam2 * @param OptionalParam3 * @param OptionalParam4 - * + * * @return VOID */ VOID @@ -830,7 +830,7 @@ UdSendCommand(UINT64 ProcessDetailToken, /** * @brief Continue the target user debugger * @param ProcessDetailToken - * + * * @return VOID */ VOID @@ -854,7 +854,7 @@ UdContinueDebuggee(UINT64 ProcessDetailToken) * @param ProcessDetailToken * @param TargetThreadId * @param StepType - * + * * @return VOID */ VOID @@ -887,11 +887,11 @@ UdSendStepPacketToDebuggee(UINT64 ProcessDetailToken, UINT32 TargetThreadId, DEB } /** - * @brief Set the active debugging thread by process id or thread id + * @brief Set the active debugging thread by process id or thread id * * @param TargetPidOrTid * @param IsTid - * + * * @return BOOLEAN */ BOOLEAN @@ -948,7 +948,7 @@ UdSetActiveDebuggingThreadByPidOrTid(UINT32 TargetPidOrTid, BOOLEAN IsTid) // // Check if killing was successful or not // - if (SwitchRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (SwitchRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { // // Set the current active debugging process (thread) @@ -972,7 +972,7 @@ UdSetActiveDebuggingThreadByPidOrTid(UINT32 TargetPidOrTid, BOOLEAN IsTid) } /** - * @brief Show list of active debugging processes and threads + * @brief Show list of active debugging processes and threads * * @return BOOLEAN */ @@ -1031,7 +1031,7 @@ UdShowListActiveDebuggingProcessesAndThreads() // // Query was successful // - if (QueryCountOfActiveThreadsRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (QueryCountOfActiveThreadsRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { if (QueryCountOfActiveThreadsRequest.CountOfActiveDebuggingThreadsAndProcesses == 0) { diff --git a/hyperdbg/hprdbgctrl/code/objects/objects.cpp b/hyperdbg/hprdbgctrl/code/objects/objects.cpp index e579b358..560e5b80 100644 --- a/hyperdbg/hprdbgctrl/code/objects/objects.cpp +++ b/hyperdbg/hprdbgctrl/code/objects/objects.cpp @@ -61,7 +61,7 @@ ObjectShowProcessesOrThreadDetails(BOOLEAN IsProcess) // // Query was successful // - if (GetInformationProcess.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (GetInformationProcess.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { ShowMessages("process id: %x\nprocess (_EPROCESS): %s\nprocess name (16-Byte): %s\n", GetInformationProcess.ProcessId, @@ -107,7 +107,7 @@ ObjectShowProcessesOrThreadDetails(BOOLEAN IsProcess) // // Query was successful // - if (GetInformationThread.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (GetInformationThread.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { ShowMessages("thread id: %x (pid: %x)\nthread (_ETHREAD): %s\nprocess (_EPROCESS): %s\nprocess name (16-Byte): %s\n", GetInformationThread.ThreadId, @@ -220,7 +220,7 @@ ObjectShowProcessesOrThreadList(BOOLEAN IsProcess, // // Query was successful // - if (QueryCountOfActiveThreadsOrProcessesRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (QueryCountOfActiveThreadsOrProcessesRequest.Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { if (QueryCountOfActiveThreadsOrProcessesRequest.Count == 0) { diff --git a/hyperdbg/hprdbghv/code/debugger/commands/BreakpointCommands.c b/hyperdbg/hprdbghv/code/debugger/commands/BreakpointCommands.c index f9186875..9b47daa0 100644 --- a/hyperdbg/hprdbghv/code/debugger/commands/BreakpointCommands.c +++ b/hyperdbg/hprdbghv/code/debugger/commands/BreakpointCommands.c @@ -677,7 +677,7 @@ BreakpointAddNew(PDEBUGGEE_BP_PACKET BpDescriptorArg) // // Show that operation was successful // - BpDescriptorArg->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + BpDescriptorArg->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } @@ -834,7 +834,7 @@ BreakpointListOrModify(PDEBUGGEE_BP_LIST_OR_MODIFY_PACKET ListOrModifyBreakpoint // // Operation was successful // - ListOrModifyBreakpoints->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + ListOrModifyBreakpoints->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } diff --git a/hyperdbg/hprdbghv/code/debugger/commands/DebuggerCommands.c b/hyperdbg/hprdbghv/code/debugger/commands/DebuggerCommands.c index c7bed7cd..ffd98e6b 100644 --- a/hyperdbg/hprdbghv/code/debugger/commands/DebuggerCommands.c +++ b/hyperdbg/hprdbghv/code/debugger/commands/DebuggerCommands.c @@ -2,23 +2,23 @@ * @file DebuggerCommands.c * @author Sina Karvandi (sina@hyperdbg.org) * @author Alee Amini (alee@hyperdbg.org) - * @brief Implementation of Debugger Commands - * + * @brief Implementation of Debugger Commands + * * @version 0.1 * @date 2020-04-23 - * + * * @copyright This project is released under the GNU Public License v3. - * + * */ #include "pch.h" /** * @brief Read memory for different commands - * + * * @param ReadMemRequest request structure for reading memory * @param UserBuffer user buffer to copy the memory * @param ReturnSize size that should be returned to user mode buffers - * @return NTSTATUS + * @return NTSTATUS */ NTSTATUS DebuggerCommandReadMemory(PDEBUGGER_READ_MEMORY ReadMemRequest, PVOID UserBuffer, PSIZE_T ReturnSize) @@ -45,11 +45,11 @@ DebuggerCommandReadMemory(PDEBUGGER_READ_MEMORY ReadMemRequest, PVOID UserBuffer /** * @brief Read memory for different commands from vmxroot mode - * + * * @param ReadMemRequest request structure for reading memory * @param UserBuffer user buffer to copy the memory * @param ReturnSize size that should be returned to user mode buffers - * @return BOOLEAN + * @return BOOLEAN */ BOOLEAN DebuggerCommandReadMemoryVmxRoot(PDEBUGGER_READ_MEMORY ReadMemRequest, UCHAR * UserBuffer, PSIZE_T ReturnSize) @@ -130,7 +130,7 @@ DebuggerCommandReadMemoryVmxRoot(PDEBUGGER_READ_MEMORY ReadMemRequest, UCHAR * U ReadMemRequest->KernelStatus = DEBUGGER_ERROR_MEMORY_TYPE_INVALID; return FALSE; } - ReadMemRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + ReadMemRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; *ReturnSize = Size; return TRUE; @@ -138,7 +138,7 @@ DebuggerCommandReadMemoryVmxRoot(PDEBUGGER_READ_MEMORY ReadMemRequest, UCHAR * U /** * @brief Perform rdmsr, wrmsr commands - * + * * @param ReadOrWriteMsrRequest Msr read/write request * @param UserBuffer user buffer to save the results * @param ReturnSize return size to user-mode buffers @@ -295,9 +295,9 @@ DebuggerReadOrWriteMsr(PDEBUGGER_READ_AND_WRITE_ON_MSR ReadOrWriteMsrRequest, UI /** * @brief Edit physical and virtual memory - * + * * @param EditMemRequest edit memory request - * @return NTSTATUS + * @return NTSTATUS */ NTSTATUS DebuggerCommandEditMemory(PDEBUGGER_EDIT_MEMORY EditMemRequest) @@ -394,16 +394,16 @@ DebuggerCommandEditMemory(PDEBUGGER_EDIT_MEMORY EditMemRequest) // // Set the resutls // - EditMemRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + EditMemRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return STATUS_SUCCESS; } /** * @brief Edit physical and virtual memory on vmxroot mode - * + * * @param EditMemRequest edit memory request - * @return NTSTATUS + * @return NTSTATUS */ BOOLEAN DebuggerCommandEditMemoryVmxRoot(PDEBUGGER_EDIT_MEMORY EditMemRequest) @@ -495,20 +495,20 @@ DebuggerCommandEditMemoryVmxRoot(PDEBUGGER_EDIT_MEMORY EditMemRequest) // // Set the resutls // - EditMemRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + EditMemRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } /** * @brief Search on virtual memory (not work on physical memory) - * + * * @details This function can be called from vmx-root mode * Do NOT directly call this function as the virtual addresses * should be valid on the target process memory layout * instead call : SearchAddressWrapper * the address between StartAddress and EndAddress should be contiguous - * + * * @param AddressToSaveResults Address to save the search results * @param SearchMemRequest request structure of searching memory * @param StartAddress valid start address based on target process @@ -791,11 +791,11 @@ PerformSearchAddress(UINT64 * AddressToSaveResults, /** * @brief The wrapper to check for validity of addresses and call * the search routines for both physical and virtual memory - * + * * @details This function can be called from vmx-root mode * The address between start address and end address will be checked * to make a contiguous address - * + * * @param AddressToSaveResults Address to save the search results * @param SearchMemRequest request structure of searching memory * @param StartAddress start address of searching based on target process @@ -803,7 +803,7 @@ PerformSearchAddress(UINT64 * AddressToSaveResults, * @param IsDebuggeePaused Set to true when the search is performed in * the debugger mode * @param CountOfMatchedCases Number of matched cases - * @return BOOLEAN Whether there was any error or not + * @return BOOLEAN Whether there was any error or not */ BOOLEAN SearchAddressWrapper(PUINT64 AddressToSaveResults, @@ -972,9 +972,9 @@ SearchAddressWrapper(PUINT64 AddressToSaveResults, /** * @brief Start searching memory - * + * * @param SearchMemRequest Request to search memory - * @return NTSTATUS + * @return NTSTATUS */ NTSTATUS DebuggerCommandSearchMemory(PDEBUGGER_SEARCH_MEMORY SearchMemRequest) @@ -1078,9 +1078,9 @@ DebuggerCommandSearchMemory(PDEBUGGER_SEARCH_MEMORY SearchMemRequest) /** * @brief Perform the flush requests to vmx-root and vmx non-root buffers - * + * * @param DebuggerFlushBuffersRequest Request to flush the buffers - * @return NTSTATUS + * @return NTSTATUS */ NTSTATUS DebuggerCommandFlush(PDEBUGGER_FLUSH_LOGGING_BUFFERS DebuggerFlushBuffersRequest) @@ -1090,17 +1090,17 @@ DebuggerCommandFlush(PDEBUGGER_FLUSH_LOGGING_BUFFERS DebuggerFlushBuffersRequest // DebuggerFlushBuffersRequest->CountOfMessagesThatSetAsReadFromVmxRoot = LogMarkAllAsRead(TRUE); DebuggerFlushBuffersRequest->CountOfMessagesThatSetAsReadFromVmxNonRoot = LogMarkAllAsRead(FALSE); - DebuggerFlushBuffersRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + DebuggerFlushBuffersRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return STATUS_SUCCESS; } /** * @brief Perform the command finished signal - * - * @param DebuggerFinishedExecutionRequest Request to + * + * @param DebuggerFinishedExecutionRequest Request to * signal debuggee about execution state - * @return NTSTATUS + * @return NTSTATUS */ NTSTATUS DebuggerCommandSignalExecutionState(PDEBUGGER_SEND_COMMAND_EXECUTION_FINISHED_SIGNAL DebuggerFinishedExecutionRequest) @@ -1110,16 +1110,16 @@ DebuggerCommandSignalExecutionState(PDEBUGGER_SEND_COMMAND_EXECUTION_FINISHED_SI // AsmVmxVmcall(VMCALL_SIGNAL_DEBUGGER_EXECUTION_FINISHED, 0, 0, 0); - DebuggerFinishedExecutionRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + DebuggerFinishedExecutionRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return STATUS_SUCCESS; } /** * @brief Send the user-mode buffer to debugger - * + * * @param DebuggerSendUsermodeMessageRequest Request to send message to debugger - * @return NTSTATUS + * @return NTSTATUS */ NTSTATUS DebuggerCommandSendMessage(PDEBUGGER_SEND_USERMODE_MESSAGES_TO_DEBUGGER DebuggerSendUsermodeMessageRequest) @@ -1132,16 +1132,16 @@ DebuggerCommandSendMessage(PDEBUGGER_SEND_USERMODE_MESSAGES_TO_DEBUGGER Debugger DebuggerSendUsermodeMessageRequest->Length, 0); - DebuggerSendUsermodeMessageRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + DebuggerSendUsermodeMessageRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return STATUS_SUCCESS; } /** * @brief Send general buffers from the debuggee to the debugger - * + * * @param DebuggeeBufferRequest Request to buffer that will be sent to the debugger - * @return NTSTATUS + * @return NTSTATUS */ NTSTATUS DebuggerCommandSendGeneralBufferToDebugger(PDEBUGGEE_SEND_GENERAL_PACKET_FROM_DEBUGGEE_TO_DEBUGGER DebuggeeBufferRequest) @@ -1154,16 +1154,16 @@ DebuggerCommandSendGeneralBufferToDebugger(PDEBUGGEE_SEND_GENERAL_PACKET_FROM_DE 0, 0); - DebuggeeBufferRequest->KernelResult = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + DebuggeeBufferRequest->KernelResult = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return STATUS_SUCCESS; } /** * @brief Reserve and allocate pre-allocated buffers - * + * * @param PreallocRequest Request details of needed buffers to be reserved - * @return NTSTATUS + * @return NTSTATUS */ NTSTATUS DebuggerCommandReservePreallocatedPools(PDEBUGGER_PREALLOC_COMMAND PreallocRequest) @@ -1211,7 +1211,7 @@ DebuggerCommandReservePreallocatedPools(PDEBUGGER_PREALLOC_COMMAND PreallocReque // PoolManagerCheckAndPerformAllocationAndDeallocation(); - PreallocRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + PreallocRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return STATUS_SUCCESS; } diff --git a/hyperdbg/hprdbghv/code/debugger/commands/ExtensionCommands.c b/hyperdbg/hprdbghv/code/debugger/commands/ExtensionCommands.c index 6d93254a..bff88ffd 100644 --- a/hyperdbg/hprdbghv/code/debugger/commands/ExtensionCommands.c +++ b/hyperdbg/hprdbghv/code/debugger/commands/ExtensionCommands.c @@ -3,21 +3,21 @@ * @author Sina Karvandi (sina@hyperdbg.org) * @brief Implementation of Debugger Commands (Extensions) * @details Debugger Commands that start with "!" - * + * * @version 0.1 * @date 2020-04-11 - * + * * @copyright This project is released under the GNU Public License v3. - * + * */ #include "pch.h" /** * @brief routines for !va2pa and !pa2va commands - * - * @param AddressDetails - * @param OperateOnVmxRoot - * @return VOID + * + * @param AddressDetails + * @param OperateOnVmxRoot + * @return VOID */ VOID ExtensionCommandVa2paAndPa2va(PDEBUGGER_VA2PA_AND_PA2VA_COMMANDS AddressDetails, BOOLEAN OperateOnVmxRoot) @@ -46,7 +46,7 @@ ExtensionCommandVa2paAndPa2va(PDEBUGGER_VA2PA_AND_PA2VA_COMMANDS AddressDetails, // // Operation was successful // - AddressDetails->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + AddressDetails->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } } else @@ -56,7 +56,7 @@ ExtensionCommandVa2paAndPa2va(PDEBUGGER_VA2PA_AND_PA2VA_COMMANDS AddressDetails, // // We don't know a way for checking physical address validity // - AddressDetails->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + AddressDetails->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } } else @@ -90,7 +90,7 @@ ExtensionCommandVa2paAndPa2va(PDEBUGGER_VA2PA_AND_PA2VA_COMMANDS AddressDetails, // // Operation was successful // - AddressDetails->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + AddressDetails->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } } else @@ -100,7 +100,7 @@ ExtensionCommandVa2paAndPa2va(PDEBUGGER_VA2PA_AND_PA2VA_COMMANDS AddressDetails, // // We don't know a way for checking physical address validity // - AddressDetails->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + AddressDetails->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } } else @@ -140,7 +140,7 @@ ExtensionCommandVa2paAndPa2va(PDEBUGGER_VA2PA_AND_PA2VA_COMMANDS AddressDetails, // // Operation was successful // - AddressDetails->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + AddressDetails->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } } else @@ -150,7 +150,7 @@ ExtensionCommandVa2paAndPa2va(PDEBUGGER_VA2PA_AND_PA2VA_COMMANDS AddressDetails, // // We don't know a way for checking physical address validity // - AddressDetails->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + AddressDetails->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } } } @@ -158,10 +158,10 @@ ExtensionCommandVa2paAndPa2va(PDEBUGGER_VA2PA_AND_PA2VA_COMMANDS AddressDetails, /** * @brief routines for !pte command - * - * @param PteDetails - * @param IsOperatingInVmxRoot - * @return BOOLEAN + * + * @param PteDetails + * @param IsOperatingInVmxRoot + * @return BOOLEAN */ BOOLEAN ExtensionCommandPte(PDEBUGGER_READ_PAGE_TABLE_ENTRIES_DETAILS PteDetails, BOOLEAN IsOperatingInVmxRoot) @@ -268,7 +268,7 @@ ExtensionCommandPte(PDEBUGGER_READ_PAGE_TABLE_ENTRIES_DETAILS PteDetails, BOOLEA PteDetails->PteValue = Pte->Flags; } - PteDetails->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + PteDetails->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; Result = TRUE; RestoreTheState: @@ -285,10 +285,10 @@ RestoreTheState: } /** - * @brief routines for !msrread command which - * @details causes vm-exit on all msr reads + * @brief routines for !msrread command which + * @details causes vm-exit on all msr reads * @param BitmapMask Bit mask of msr to put on msr bitmap - * @return VOID + * @return VOID */ VOID ExtensionCommandChangeAllMsrBitmapReadAllCores(UINT64 BitmapMask) @@ -301,7 +301,7 @@ ExtensionCommandChangeAllMsrBitmapReadAllCores(UINT64 BitmapMask) /** * @brief routines for disable (reset) !msrread command - * @return VOID + * @return VOID */ VOID ExtensionCommandResetChangeAllMsrBitmapReadAllCores() @@ -313,9 +313,9 @@ ExtensionCommandResetChangeAllMsrBitmapReadAllCores() } /** - * @brief routines for !msrwrite command which - * @details causes vm-exit on all msr writes - * @return VOID + * @brief routines for !msrwrite command which + * @details causes vm-exit on all msr writes + * @return VOID */ VOID ExtensionCommandChangeAllMsrBitmapWriteAllCores(UINT64 BitmapMask) @@ -327,8 +327,8 @@ ExtensionCommandChangeAllMsrBitmapWriteAllCores(UINT64 BitmapMask) } /** - * @brief routines for reset !msrwrite command which - * @return VOID + * @brief routines for reset !msrwrite command which + * @return VOID */ VOID ExtensionCommandResetAllMsrBitmapWriteAllCores() @@ -341,8 +341,8 @@ ExtensionCommandResetAllMsrBitmapWriteAllCores() /** * @brief routines for !tsc command - * @details causes vm-exit on all execution of rdtsc/rdtscp - * @return VOID + * @details causes vm-exit on all execution of rdtsc/rdtscp + * @return VOID */ VOID ExtensionCommandEnableRdtscExitingAllCores() @@ -355,7 +355,7 @@ ExtensionCommandEnableRdtscExitingAllCores() /** * @brief routines for disabling rdtsc/p exiting - * @return VOID + * @return VOID */ VOID ExtensionCommandDisableRdtscExitingAllCores() @@ -367,8 +367,8 @@ ExtensionCommandDisableRdtscExitingAllCores() } /** - * @brief routines ONLY for disabling !tsc command - * @return VOID + * @brief routines ONLY for disabling !tsc command + * @return VOID */ VOID ExtensionCommandDisableRdtscExitingForClearingEventsAllCores() @@ -394,8 +394,8 @@ ExtensionCommandDisableMov2ControlRegsExitingForClearingEventsAllCores(PDEBUGGER } /** - * @brief routines ONLY for disabling !dr command - * @return VOID + * @brief routines ONLY for disabling !dr command + * @return VOID */ VOID ExtensionCommandDisableMov2DebugRegsExitingForClearingEventsAllCores() @@ -407,9 +407,9 @@ ExtensionCommandDisableMov2DebugRegsExitingForClearingEventsAllCores() } /** - * @brief routines for !pmc - * @details causes vm-exit on all execution of rdpmc - * @return VOID + * @brief routines for !pmc + * @details causes vm-exit on all execution of rdpmc + * @return VOID */ VOID ExtensionCommandEnableRdpmcExitingAllCores() @@ -421,8 +421,8 @@ ExtensionCommandEnableRdpmcExitingAllCores() } /** - * @brief routines for disabling !pmc - * @return VOID + * @brief routines for disabling !pmc + * @return VOID */ VOID ExtensionCommandDisableRdpmcExitingAllCores() @@ -434,11 +434,11 @@ ExtensionCommandDisableRdpmcExitingAllCores() } /** - * @brief routines for !exception command which - * @details causes vm-exit when exception occurred + * @brief routines for !exception command which + * @details causes vm-exit when exception occurred * @param ExceptionIndex index of exception on IDT - * - * @return VOID + * + * @return VOID */ VOID ExtensionCommandSetExceptionBitmapAllCores(UINT64 ExceptionIndex) @@ -450,11 +450,11 @@ ExtensionCommandSetExceptionBitmapAllCores(UINT64 ExceptionIndex) } /** - * @brief routines for disabling exception bitmap - * @details removes vm-exit when exception occurred + * @brief routines for disabling exception bitmap + * @details removes vm-exit when exception occurred * @param ExceptionIndex index of exception on IDT - * - * @return VOID + * + * @return VOID */ VOID ExtensionCommandUnsetExceptionBitmapAllCores(UINT64 ExceptionIndex) @@ -466,8 +466,8 @@ ExtensionCommandUnsetExceptionBitmapAllCores(UINT64 ExceptionIndex) } /** - * @brief routines for reset !exception command - * @return VOID + * @brief routines for reset !exception command + * @return VOID */ VOID ExtensionCommandResetExceptionBitmapAllCores() @@ -507,11 +507,10 @@ ExtensionCommandDisableMovToControlRegistersExitingAllCores(PDEBUGGER_EVENT Even KeGenericCallDpc(DpcRoutineDisableMovControlRegisterExitingAllCores, Event); } - /** - * @brief routines for !dr - * @details causes vm-exit on all accesses to debug registers - * @return VOID + * @brief routines for !dr + * @details causes vm-exit on all accesses to debug registers + * @return VOID */ VOID ExtensionCommandEnableMovDebugRegistersExitingAllCores() @@ -523,8 +522,8 @@ ExtensionCommandEnableMovDebugRegistersExitingAllCores() } /** - * @brief routines for disabling !dr - * @return VOID + * @brief routines for disabling !dr + * @return VOID */ VOID ExtensionCommandDisableMovDebugRegistersExitingAllCores() @@ -536,9 +535,9 @@ ExtensionCommandDisableMovDebugRegistersExitingAllCores() } /** - * @brief routines for !interrupt command which - * @details causes vm-exit when external interrupt occurs - * @return VOID + * @brief routines for !interrupt command which + * @details causes vm-exit when external interrupt occurs + * @return VOID */ VOID ExtensionCommandSetExternalInterruptExitingAllCores() @@ -550,8 +549,8 @@ ExtensionCommandSetExternalInterruptExitingAllCores() } /** - * @brief routines for ONLY terminate !interrupt command - * @return VOID + * @brief routines for ONLY terminate !interrupt command + * @return VOID */ VOID ExtensionCommandUnsetExternalInterruptExitingOnlyOnClearingInterruptEventsAllCores() @@ -563,9 +562,9 @@ ExtensionCommandUnsetExternalInterruptExitingOnlyOnClearingInterruptEventsAllCor } /** - * @brief routines for !ioin and !ioout command which - * @details causes vm-exit on all i/o instructions or one port - * @return VOID + * @brief routines for !ioin and !ioout command which + * @details causes vm-exit on all i/o instructions or one port + * @return VOID */ VOID ExtensionCommandIoBitmapChangeAllCores(UINT64 Port) @@ -577,8 +576,8 @@ ExtensionCommandIoBitmapChangeAllCores(UINT64 Port) } /** - * @brief routines for reset !ioin and !ioout command - * @return VOID + * @brief routines for reset !ioin and !ioout command + * @return VOID */ VOID ExtensionCommandIoBitmapResetAllCores() diff --git a/hyperdbg/hprdbghv/code/debugger/communication/SerialConnection.c b/hyperdbg/hprdbghv/code/debugger/communication/SerialConnection.c index d9fe111c..530c1052 100644 --- a/hyperdbg/hprdbghv/code/debugger/communication/SerialConnection.c +++ b/hyperdbg/hprdbghv/code/debugger/communication/SerialConnection.c @@ -14,7 +14,7 @@ /** * @brief A simple connection test * - * @return VOID + * @return VOID */ VOID SerialConnectionTest() @@ -28,7 +28,7 @@ SerialConnectionTest() /** * @brief Send end of buffer packet * - * @return VOID + * @return VOID */ VOID SerialConnectionSendEndOfBuffer() @@ -146,10 +146,10 @@ SerialConnectionRecvBuffer(CHAR * BufferToSave, /** * @brief Perform sending buffer over serial - * + * * @param Buffer buffer to send * @param Length length of buffer to send - * @return BOOLEAN + * @return BOOLEAN */ BOOLEAN SerialConnectionSend(CHAR * Buffer, UINT32 Length) @@ -180,12 +180,12 @@ SerialConnectionSend(CHAR * Buffer, UINT32 Length) /** * @brief Perform sending 2 not appended buffers over serial - * + * * @param Buffer1 buffer to send * @param Length1 length of buffer to send * @param Buffer2 buffer to send * @param Length2 length of buffer to send - * @return BOOLEAN + * @return BOOLEAN */ BOOLEAN SerialConnectionSendTwoBuffers(CHAR * Buffer1, UINT32 Length1, CHAR * Buffer2, UINT32 Length2) @@ -227,14 +227,14 @@ SerialConnectionSendTwoBuffers(CHAR * Buffer1, UINT32 Length1, CHAR * Buffer2, U /** * @brief Perform sending 3 not appended buffers over serial - * + * * @param Buffer1 buffer to send * @param Length1 length of buffer to send * @param Buffer2 buffer to send * @param Length2 length of buffer to send * @param Buffer3 buffer to send * @param Length3 length of buffer to send - * @return BOOLEAN + * @return BOOLEAN */ BOOLEAN SerialConnectionSendThreeBuffers(CHAR * Buffer1, @@ -329,10 +329,10 @@ SerialConnectionCheckPort(UINT32 SerialPort) /** * @brief Perform tasks relating to stepping (step-in & step-out) requests - * + * * @param DebuggerPrintRequest Request to prepare debuggee * - * @return NTSTATUS + * @return NTSTATUS */ NTSTATUS SerialConnectionPrepare(PDEBUGGER_PREPARE_DEBUGGEE DebuggeeRequest) @@ -382,7 +382,7 @@ SerialConnectionPrepare(PDEBUGGER_PREPARE_DEBUGGEE DebuggeeRequest) // // Set status to successful // - DebuggeeRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + DebuggeeRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return STATUS_SUCCESS; } diff --git a/hyperdbg/hprdbghv/code/debugger/core/Debugger.c b/hyperdbg/hprdbghv/code/debugger/core/Debugger.c index 180f4611..91569440 100644 --- a/hyperdbg/hprdbghv/code/debugger/core/Debugger.c +++ b/hyperdbg/hprdbghv/code/debugger/core/Debugger.c @@ -3285,7 +3285,7 @@ DebuggerParseEventsModificationFromUsermode(PDEBUGGER_MODIFY_EVENTS DebuggerEven // // The function was successful // - DebuggerEventModificationRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + DebuggerEventModificationRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } diff --git a/hyperdbg/hprdbghv/code/debugger/features/hooks/ept-hook/EptHook.c b/hyperdbg/hprdbghv/code/debugger/features/hooks/ept-hook/EptHook.c index 81b6c6cf..eb127c23 100644 --- a/hyperdbg/hprdbghv/code/debugger/features/hooks/ept-hook/EptHook.c +++ b/hyperdbg/hprdbghv/code/debugger/features/hooks/ept-hook/EptHook.c @@ -390,7 +390,7 @@ ExAllocatePoolWithTagHook( * * @param TargetAddress The address of function or memory address to be hooked * @param ProcessCr3 The process cr3 to translate based on that process's cr3 - * @return BOOLEAN Returns true if the hook was successfull or false if there was an error + * @return BOOLEAN Returns true if the hook was successful or false if there was an error */ BOOLEAN EptHookPerformPageHook(PVOID TargetAddress, CR3_TYPE ProcessCr3) @@ -474,7 +474,7 @@ EptHookPerformPageHook(PVOID TargetAddress, CR3_TYPE ProcessCr3) * * @param TargetAddress The address of function or memory address to be hooked * @param ProcessId The process id to translate based on that process's cr3 - * @return BOOLEAN Returns true if the hook was successfull or false if there was an error + * @return BOOLEAN Returns true if the hook was successful or false if there was an error */ BOOLEAN EptHook(PVOID TargetAddress, UINT32 ProcessId) @@ -1110,7 +1110,7 @@ EptHookPerformPageHook2(PVOID TargetAddress, * @param SetHookForRead Hook READ Access * @param SetHookForWrite Hook WRITE Access * @param SetHookForExec Hook EXECUTE Access - * @return BOOLEAN Returns true if the hook was successfull or false if there was an error + * @return BOOLEAN Returns true if the hook was successful or false if there was an error */ BOOLEAN EptHook2(PVOID TargetAddress, PVOID HookFunction, UINT32 ProcessId, BOOLEAN SetHookForRead, BOOLEAN SetHookForWrite, BOOLEAN SetHookForExec) diff --git a/hyperdbg/hprdbghv/code/debugger/kernel-level/Kd.c b/hyperdbg/hprdbghv/code/debugger/kernel-level/Kd.c index 04765f65..c3e294c0 100644 --- a/hyperdbg/hprdbghv/code/debugger/kernel-level/Kd.c +++ b/hyperdbg/hprdbghv/code/debugger/kernel-level/Kd.c @@ -842,7 +842,7 @@ KdSendFormatsFunctionResult(UINT64 Value) { DEBUGGEE_FORMATS_PACKET FormatsPacket = {0}; - FormatsPacket.Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + FormatsPacket.Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; FormatsPacket.Value = Value; // @@ -1487,7 +1487,7 @@ KdPerformSettingTheStateOfShortCircuiting(UINT32 CurrentProcessorIndex, PDEBUGGE // // The status was okay // - ShortCircuitingEvent->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + ShortCircuitingEvent->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } /** @@ -1550,7 +1550,7 @@ KdPerformEventQueryAndModification(PDEBUGGER_MODIFY_EVENTS ModifyAndQueryEvent) // // The function was successful // - ModifyAndQueryEvent->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + ModifyAndQueryEvent->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } } else if (ModifyAndQueryEvent->TypeOfAction == DEBUGGER_MODIFY_EVENTS_ENABLE) @@ -1573,7 +1573,7 @@ KdPerformEventQueryAndModification(PDEBUGGER_MODIFY_EVENTS ModifyAndQueryEvent) // // The function was successful // - ModifyAndQueryEvent->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + ModifyAndQueryEvent->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } else if (ModifyAndQueryEvent->TypeOfAction == DEBUGGER_MODIFY_EVENTS_DISABLE) { @@ -1595,7 +1595,7 @@ KdPerformEventQueryAndModification(PDEBUGGER_MODIFY_EVENTS ModifyAndQueryEvent) // // The function was successful // - ModifyAndQueryEvent->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + ModifyAndQueryEvent->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } else if (ModifyAndQueryEvent->TypeOfAction == DEBUGGER_MODIFY_EVENTS_CLEAR) { @@ -1828,7 +1828,7 @@ KdDispatchAndPerformCommandsFromDebugger(ULONG CurrentCore, PGUEST_REGS GuestReg // UnlockTheNewCore = TRUE; - ChangeCorePacket->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + ChangeCorePacket->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } else { @@ -1840,7 +1840,7 @@ KdDispatchAndPerformCommandsFromDebugger(ULONG CurrentCore, PGUEST_REGS GuestReg // // The operating core and the target core is the same, no need for further action // - ChangeCorePacket->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + ChangeCorePacket->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } // @@ -1907,7 +1907,7 @@ KdDispatchAndPerformCommandsFromDebugger(ULONG CurrentCore, PGUEST_REGS GuestReg CallstackPacket->Size, CallstackPacket->Is32Bit)) { - CallstackPacket->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + CallstackPacket->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } else { @@ -1942,7 +1942,7 @@ KdDispatchAndPerformCommandsFromDebugger(ULONG CurrentCore, PGUEST_REGS GuestReg // KdQuerySystemState(); - TestQueryPacket->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + TestQueryPacket->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; break; @@ -1951,7 +1951,7 @@ KdDispatchAndPerformCommandsFromDebugger(ULONG CurrentCore, PGUEST_REGS GuestReg // // Query index not found // - TestQueryPacket->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + TestQueryPacket->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; break; } @@ -1975,7 +1975,7 @@ KdDispatchAndPerformCommandsFromDebugger(ULONG CurrentCore, PGUEST_REGS GuestReg // if (KdReadRegisters(GuestRegs, ReadRegisterPacket)) { - ReadRegisterPacket->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + ReadRegisterPacket->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } else { @@ -2011,7 +2011,7 @@ KdDispatchAndPerformCommandsFromDebugger(ULONG CurrentCore, PGUEST_REGS GuestReg (PVOID)((UINT64)ReadMemoryPacket + sizeof(DEBUGGER_READ_MEMORY)), &ReturnSize)) { - ReadMemoryPacket->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + ReadMemoryPacket->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } else { @@ -2039,7 +2039,7 @@ KdDispatchAndPerformCommandsFromDebugger(ULONG CurrentCore, PGUEST_REGS GuestReg // if (DebuggerCommandEditMemoryVmxRoot(EditMemoryPacket)) { - EditMemoryPacket->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + EditMemoryPacket->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } else { @@ -2113,7 +2113,7 @@ KdDispatchAndPerformCommandsFromDebugger(ULONG CurrentCore, PGUEST_REGS GuestReg // // Set status // - ScriptPacket->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + ScriptPacket->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } else { @@ -2172,7 +2172,7 @@ KdDispatchAndPerformCommandsFromDebugger(ULONG CurrentCore, PGUEST_REGS GuestReg // // The search was successful // - SearchPacketResult.Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + SearchPacketResult.Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } else { @@ -2681,5 +2681,5 @@ KdHaltSystem(PDEBUGGER_PAUSE_PACKET_RECEIVED PausePacket) // // Set the status // - PausePacket->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + PausePacket->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } diff --git a/hyperdbg/hprdbghv/code/debugger/objects/Process.c b/hyperdbg/hprdbghv/code/debugger/objects/Process.c index 5f99d81a..d8ddccbf 100644 --- a/hyperdbg/hprdbghv/code/debugger/objects/Process.c +++ b/hyperdbg/hprdbghv/code/debugger/objects/Process.c @@ -3,12 +3,12 @@ * @author Sina Karvandi (sina@hyperdbg.org) * @brief Implementation of kernel debugger functions for processes * @details - * + * * @version 0.1 * @date 2021-11-23 - * + * * @copyright This project is released under the GNU Public License v3. - * + * */ #include "pch.h" @@ -16,9 +16,9 @@ * @brief handle process changes * @param ProcessorIndex Index of processor * @param GuestState Guest's gp registers - * - * - * @return VOID + * + * + * @return VOID */ BOOLEAN ProcessHandleProcessChange(UINT32 ProcessorIndex, PGUEST_REGS GuestState) @@ -48,8 +48,8 @@ ProcessHandleProcessChange(UINT32 ProcessorIndex, PGUEST_REGS GuestState) * @param ProcessId * @param EProcess * @param IsSwitchByClockIntrrupt - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN ProcessSwitch(UINT32 ProcessId, PEPROCESS EProcess, BOOLEAN IsSwitchByClockIntrrupt) @@ -124,13 +124,13 @@ ProcessSwitch(UINT32 ProcessId, PEPROCESS EProcess, BOOLEAN IsSwitchByClockIntrr } /** - * @brief Enable or disable the process change monitoring detection + * @brief Enable or disable the process change monitoring detection * on the running core based on intercepting clock interrupts * @details should be called on vmx root - * - * @param CurrentProcessorIndex - * @param Enable - * @return VOID + * + * @param CurrentProcessorIndex + * @param Enable + * @return VOID */ VOID ProcessDetectChangeByInterceptingClockInterrupts(UINT32 CurrentProcessorIndex, @@ -163,13 +163,13 @@ ProcessDetectChangeByInterceptingClockInterrupts(UINT32 CurrentProcessorIndex, } /** - * @brief Enable or disable the process change monitoring detection + * @brief Enable or disable the process change monitoring detection * on the running core based on mov-to-cr3 vm-exits * @details should be called on vmx root - * - * @param CurrentProcessorIndex - * @param Enable - * @return VOID + * + * @param CurrentProcessorIndex + * @param Enable + * @return VOID */ VOID ProcessDetectChangeByMov2Cr3Vmexits(UINT32 CurrentProcessorIndex, @@ -204,14 +204,14 @@ ProcessDetectChangeByMov2Cr3Vmexits(UINT32 CurrentProcessorIndex, } /** - * @brief Enable or disable the process change monitoring detection + * @brief Enable or disable the process change monitoring detection * on the running core * @details should be called on vmx root - * - * @param CurrentProcessorIndex - * @param Enable - * @param CheckByClockInterrupts - * @return VOID + * + * @param CurrentProcessorIndex + * @param Enable + * @param CheckByClockInterrupts + * @return VOID */ VOID ProcessEnableOrDisableThreadChangeMonitor(UINT32 CurrentProcessorIndex, @@ -237,8 +237,8 @@ ProcessEnableOrDisableThreadChangeMonitor(UINT32 CurrentProcessorIndex, * @param Eprocess target nt!_EPROCESS * @param ActiveProcessHead nt!PsActiveProcessHead * @param ActiveProcessLinksOffset nt!_EPROCESS.ActiveProcessLinks - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN ProcessCheckIfEprocessIsValid(UINT64 Eprocess, UINT64 ActiveProcessHead, ULONG ActiveProcessLinksOffset) @@ -313,8 +313,8 @@ ProcessCheckIfEprocessIsValid(UINT64 Eprocess, UINT64 ActiveProcessHead, ULONG A * @param CountOfProcesses * @param ListSaveBuffer * @param ListSaveBuffSize - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN ProcessShowList(PDEBUGGEE_PROCESS_LIST_NEEDED_DETAILS PorcessListSymbolInfo, @@ -495,10 +495,10 @@ ReturnEnd: /** * @brief change the current process * @detail ONLY TO BE USED IN KD STUFFS - * + * * @param PidRequest - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN ProcessInterpretProcess(PDEBUGGEE_DETAILS_AND_SWITCH_PROCESS_PACKET PidRequest) @@ -517,7 +517,7 @@ ProcessInterpretProcess(PDEBUGGEE_DETAILS_AND_SWITCH_PROCESS_PACKET PidRequest) // // Operation was successful // - PidRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + PidRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; break; @@ -535,7 +535,7 @@ ProcessInterpretProcess(PDEBUGGEE_DETAILS_AND_SWITCH_PROCESS_PACKET PidRequest) // // Operation was successful // - PidRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + PidRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; break; @@ -557,7 +557,7 @@ ProcessInterpretProcess(PDEBUGGEE_DETAILS_AND_SWITCH_PROCESS_PACKET PidRequest) // // Operation was successful // - PidRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + PidRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; break; @@ -574,7 +574,7 @@ ProcessInterpretProcess(PDEBUGGEE_DETAILS_AND_SWITCH_PROCESS_PACKET PidRequest) // // Check if the above operation contains error // - if (PidRequest->Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (PidRequest->Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { return TRUE; } @@ -586,10 +586,10 @@ ProcessInterpretProcess(PDEBUGGEE_DETAILS_AND_SWITCH_PROCESS_PACKET PidRequest) /** * @brief Query process details (count) - * + * * @param DebuggerUsermodeProcessOrThreadQueryRequest - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN ProcessQueryCount(PDEBUGGER_QUERY_ACTIVE_PROCESSES_OR_THREADS DebuggerUsermodeProcessOrThreadQueryRequest) @@ -607,7 +607,7 @@ ProcessQueryCount(PDEBUGGER_QUERY_ACTIVE_PROCESSES_OR_THREADS DebuggerUsermodePr if (Result && DebuggerUsermodeProcessOrThreadQueryRequest->Count != 0) { - DebuggerUsermodeProcessOrThreadQueryRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + DebuggerUsermodeProcessOrThreadQueryRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } @@ -617,12 +617,12 @@ ProcessQueryCount(PDEBUGGER_QUERY_ACTIVE_PROCESSES_OR_THREADS DebuggerUsermodePr /** * @brief Query process details (list) - * + * * @param DebuggerUsermodeProcessOrThreadQueryRequest * @param AddressToSaveDetail * @param BufferSize - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN ProcessQueryList(PDEBUGGER_QUERY_ACTIVE_PROCESSES_OR_THREADS DebuggerUsermodeProcessOrThreadQueryRequest, @@ -645,10 +645,10 @@ ProcessQueryList(PDEBUGGER_QUERY_ACTIVE_PROCESSES_OR_THREADS DebuggerUsermodePro /** * @brief Query process details - * + * * @param GetInformationProcessRequest - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN ProcessQueryDetails(PDEBUGGEE_DETAILS_AND_SWITCH_PROCESS_PACKET GetInformationProcessRequest) @@ -659,7 +659,7 @@ ProcessQueryDetails(PDEBUGGEE_DETAILS_AND_SWITCH_PROCESS_PACKET GetInformationPr GetProcessNameFromEprocess(PsGetCurrentProcess()), 15); - GetInformationProcessRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + GetInformationProcessRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } diff --git a/hyperdbg/hprdbghv/code/debugger/objects/Thread.c b/hyperdbg/hprdbghv/code/debugger/objects/Thread.c index fbc49386..384482aa 100644 --- a/hyperdbg/hprdbghv/code/debugger/objects/Thread.c +++ b/hyperdbg/hprdbghv/code/debugger/objects/Thread.c @@ -3,12 +3,12 @@ * @author Sina Karvandi (sina@hyperdbg.org) * @brief Implementation of kernel debugger functions for threads * @details - * + * * @version 0.1 * @date 2021-11-23 - * + * * @copyright This project is released under the GNU Public License v3. - * + * */ #include "pch.h" @@ -16,8 +16,8 @@ * @brief handle thread changes * @param CurrentCore * @param GuestState - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN ThreadHandleThreadChange(UINT32 CurrentCore, PGUEST_REGS GuestState) @@ -50,8 +50,8 @@ ThreadHandleThreadChange(UINT32 CurrentCore, PGUEST_REGS GuestState) * @param ThreadId * @param EThread * @param CheckByClockInterrupt - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN ThreadSwitch(UINT32 ThreadId, PETHREAD EThread, BOOLEAN CheckByClockInterrupt) @@ -115,8 +115,8 @@ ThreadSwitch(UINT32 ThreadId, PETHREAD EThread, BOOLEAN CheckByClockInterrupt) * @param CountOfThreads * @param ListSaveBuffer * @param ListSaveBuffSize - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN ThreadShowList(PDEBUGGEE_THREAD_LIST_NEEDED_DETAILS ThreadListSymbolInfo, @@ -316,8 +316,8 @@ ReturnEnd: /** * @brief change the current thread * @param TidRequest - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN ThreadInterpretThread(PDEBUGGEE_DETAILS_AND_SWITCH_THREAD_PACKET TidRequest) @@ -338,7 +338,7 @@ ThreadInterpretThread(PDEBUGGEE_DETAILS_AND_SWITCH_THREAD_PACKET TidRequest) // // Operation was successful // - TidRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + TidRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; break; @@ -356,7 +356,7 @@ ThreadInterpretThread(PDEBUGGEE_DETAILS_AND_SWITCH_THREAD_PACKET TidRequest) // // Operation was successful // - TidRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + TidRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; break; @@ -378,7 +378,7 @@ ThreadInterpretThread(PDEBUGGEE_DETAILS_AND_SWITCH_THREAD_PACKET TidRequest) // // Operation was successful // - TidRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + TidRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; break; @@ -395,7 +395,7 @@ ThreadInterpretThread(PDEBUGGEE_DETAILS_AND_SWITCH_THREAD_PACKET TidRequest) // // Check if the above operation contains error // - if (TidRequest->Result == DEBUGGER_OPERATION_WAS_SUCCESSFULL) + if (TidRequest->Result == DEBUGGER_OPERATION_WAS_SUCCESSFUL) { return TRUE; } @@ -406,13 +406,13 @@ ThreadInterpretThread(PDEBUGGEE_DETAILS_AND_SWITCH_THREAD_PACKET TidRequest) } /** - * @brief Enable or disable the thread change monitoring detection + * @brief Enable or disable the thread change monitoring detection * on the running core based on putting a HW breakpoint on the gs:[188] * @details should be called on vmx root - * - * @param CurrentProcessorIndex - * @param Enable - * @return VOID + * + * @param CurrentProcessorIndex + * @param Enable + * @return VOID */ VOID ThreadDetectChangeByDebugRegisterOnGs(UINT32 CurrentProcessorIndex, @@ -538,13 +538,13 @@ ThreadDetectChangeByDebugRegisterOnGs(UINT32 CurrentProcessorIndex, } /** - * @brief Enable or disable the thread change monitoring detection + * @brief Enable or disable the thread change monitoring detection * on the running core based on intercepting clock interrupts * @details should be called on vmx root - * - * @param CurrentProcessorIndex - * @param Enable - * @return VOID + * + * @param CurrentProcessorIndex + * @param Enable + * @return VOID */ VOID ThreadDetectChangeByInterceptingClockInterrupts(UINT32 CurrentProcessorIndex, @@ -577,14 +577,14 @@ ThreadDetectChangeByInterceptingClockInterrupts(UINT32 CurrentProcessorIndex, } /** - * @brief Enable or disable the thread change monitoring detection + * @brief Enable or disable the thread change monitoring detection * on the running core * @details should be called on vmx root - * - * @param CurrentProcessorIndex - * @param Enable - * @param CheckByClockInterrupts - * @return VOID + * + * @param CurrentProcessorIndex + * @param Enable + * @param CheckByClockInterrupts + * @return VOID */ VOID ThreadEnableOrDisableThreadChangeMonitor(UINT32 CurrentProcessorIndex, @@ -606,10 +606,10 @@ ThreadEnableOrDisableThreadChangeMonitor(UINT32 CurrentProcessorIndex, /** * @brief Query thread details (count) - * + * * @param DebuggerUsermodeProcessOrThreadQueryRequest - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN ThreadQueryCount(PDEBUGGER_QUERY_ACTIVE_PROCESSES_OR_THREADS DebuggerUsermodeProcessOrThreadQueryRequest) @@ -627,7 +627,7 @@ ThreadQueryCount(PDEBUGGER_QUERY_ACTIVE_PROCESSES_OR_THREADS DebuggerUsermodePro if (Result && DebuggerUsermodeProcessOrThreadQueryRequest->Count != 0) { - DebuggerUsermodeProcessOrThreadQueryRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + DebuggerUsermodeProcessOrThreadQueryRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } @@ -637,12 +637,12 @@ ThreadQueryCount(PDEBUGGER_QUERY_ACTIVE_PROCESSES_OR_THREADS DebuggerUsermodePro /** * @brief Query thread details (list) - * + * * @param DebuggerUsermodeProcessOrThreadQueryRequest * @param AddressToSaveDetail * @param BufferSize - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN ThreadQueryList(PDEBUGGER_QUERY_ACTIVE_PROCESSES_OR_THREADS DebuggerUsermodeProcessOrThreadQueryRequest, @@ -665,10 +665,10 @@ ThreadQueryList(PDEBUGGER_QUERY_ACTIVE_PROCESSES_OR_THREADS DebuggerUsermodeProc /** * @brief Query thread details - * + * * @param GetInformationThreadRequest - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN ThreadQueryDetails(PDEBUGGEE_DETAILS_AND_SWITCH_THREAD_PACKET GetInformationThreadRequest) @@ -682,7 +682,7 @@ ThreadQueryDetails(PDEBUGGEE_DETAILS_AND_SWITCH_THREAD_PACKET GetInformationThre GetProcessNameFromEprocess(PsGetCurrentProcess()), 15); - GetInformationThreadRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + GetInformationThreadRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } diff --git a/hyperdbg/hprdbghv/code/debugger/tests/KernelTests.c b/hyperdbg/hprdbghv/code/debugger/tests/KernelTests.c index 727d0102..adb4a8c2 100644 --- a/hyperdbg/hprdbghv/code/debugger/tests/KernelTests.c +++ b/hyperdbg/hprdbghv/code/debugger/tests/KernelTests.c @@ -3,23 +3,23 @@ * @author Sina Karvandi (sina@hyperdbg.org) * @brief Implementation of kernel-side test functions * @details - * + * * @version 0.1 * @date 2021-04-06 - * + * * @copyright This project is released under the GNU Public License v3. - * + * */ #include "pch.h" /** * @brief Configures tags and calls target functions - * + * * @details This function should not be called simultaneously * and only functions with at most 4 parameters should be called * the target function should be fast call * Note : Target test function should check r14 for Tag1 and r15 for Tag2 - * + * * @param Tag1 the first tag * @param Tag2 the second tag * @param TargetFunction function that needs to be called @@ -27,8 +27,8 @@ * @param Param2 parameter to the target function * @param Param3 parameter to the target function * @param Param4 parameter to the target function - * - * @return UINT64 Target function return result + * + * @return UINT64 Target function return result */ UINT64 TestKernelConfigureTagsAndCallTargetFunction(UINT64 Tag1, @@ -73,9 +73,9 @@ TestKernelConfigureTagsAndCallTargetFunction(UINT64 Tag1, /** * @brief Perform the kernel-side tests - * + * * @param KernelTestRequest user-mode buffer to fill kernel test information - * @return VOID + * @return VOID */ VOID TestKernelPerformTests(PDEBUGGER_PERFORM_KERNEL_TESTS KernelTestRequest) @@ -105,14 +105,14 @@ TestKernelPerformTests(PDEBUGGER_PERFORM_KERNEL_TESTS KernelTestRequest) LogInfo("All the kernel events are triggered"); - KernelTestRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + KernelTestRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } /** * @brief Collect the kernel-side debugging informations - * + * * @param InfoRequest user-mode buffer to fill kernel information - * @return UINT32 Filled entries + * @return UINT32 Filled entries */ UINT32 TestKernelGetInformation(PDEBUGGEE_KERNEL_AND_USER_TEST_INFORMATION InfoRequest) diff --git a/hyperdbg/hprdbghv/code/debugger/user-level/Attaching.c b/hyperdbg/hprdbghv/code/debugger/user-level/Attaching.c index 7beb1f86..e1e9582e 100644 --- a/hyperdbg/hprdbghv/code/debugger/user-level/Attaching.c +++ b/hyperdbg/hprdbghv/code/debugger/user-level/Attaching.c @@ -2,13 +2,13 @@ * @file Attaching.c * @author Sina Karvandi (sina@hyperdbg.org) * @brief Attaching and detaching for debugging user-mode processes - * @details + * @details * * @version 0.1 * @date 2021-12-28 - * + * * @copyright This project is released under the GNU Public License v3. - * + * */ #include "pch.h" @@ -87,14 +87,14 @@ AttachingInitialize() } /** - * @brief Create user-mode debugging details for threads - * - * @param ProcessId - * @param Is32Bit - * @param Eprocess - * @param PebAddressToMonitor - * @param UsermodeReservedBuffer - * @return UINT64 returns the unique token + * @brief Create user-mode debugging details for threads + * + * @param ProcessId + * @param Is32Bit + * @param Eprocess + * @param PebAddressToMonitor + * @param UsermodeReservedBuffer + * @return UINT64 returns the unique token */ UINT64 AttachingCreateProcessDebuggingDetails(UINT32 ProcessId, @@ -156,9 +156,9 @@ AttachingCreateProcessDebuggingDetails(UINT32 ProcessId, /** * @brief Find user-mode debugging details for threads by token - * - * @param Token - * @return PUSERMODE_DEBUGGING_PROCESS_DETAILS + * + * @param Token + * @return PUSERMODE_DEBUGGING_PROCESS_DETAILS */ PUSERMODE_DEBUGGING_PROCESS_DETAILS AttachingFindProcessDebuggingDetailsByToken(UINT64 Token) @@ -179,9 +179,9 @@ AttachingFindProcessDebuggingDetailsByToken(UINT64 Token) /** * @brief Find user-mode debugging details for threads by process Id - * - * @param ProcessId - * @return PUSERMODE_DEBUGGING_PROCESS_DETAILS + * + * @param ProcessId + * @return PUSERMODE_DEBUGGING_PROCESS_DETAILS */ PUSERMODE_DEBUGGING_PROCESS_DETAILS AttachingFindProcessDebuggingDetailsByProcessId(UINT32 ProcessId) @@ -203,8 +203,8 @@ AttachingFindProcessDebuggingDetailsByProcessId(UINT32 ProcessId) /** * @brief Find user-mode debugging details for threads that is in * the start-up phase - * - * @return PUSERMODE_DEBUGGING_PROCESS_DETAILS + * + * @return PUSERMODE_DEBUGGING_PROCESS_DETAILS */ PUSERMODE_DEBUGGING_PROCESS_DETAILS AttachingFindProcessDebuggingDetailsInStartingPhase() @@ -222,8 +222,8 @@ AttachingFindProcessDebuggingDetailsInStartingPhase() /** * @brief Remove and deallocate all thread debuggig details - * - * @return VOID + * + * @return VOID */ VOID AttachingRemoveAndFreeAllProcessDebuggingDetails() @@ -249,9 +249,9 @@ AttachingRemoveAndFreeAllProcessDebuggingDetails() /** * @brief Remove user-mode debugging details for threads by its token - * - * @param Token - * @return BOOLEAN + * + * @param Token + * @return BOOLEAN */ BOOLEAN AttachingRemoveProcessDebuggingDetailsByToken(UINT64 Token) @@ -291,10 +291,10 @@ AttachingRemoveProcessDebuggingDetailsByToken(UINT64 Token) /** * @brief Set the start up phase of a debugging thread buffer by its token - * - * @param Set - * @param Token - * @return BOOLEAN + * + * @param Set + * @param Token + * @return BOOLEAN */ BOOLEAN AttachingSetStartingPhaseOfProcessDebuggingDetailsByToken(BOOLEAN Set, UINT64 Token) @@ -337,13 +337,13 @@ AttachingSetStartingPhaseOfProcessDebuggingDetailsByToken(BOOLEAN Set, UINT64 To } /** - * @brief Handle the state when it reached to the entrypoint - * of the user-mode process - * - * @param CurrentProcessorIndex - * @param GuestRegs - * @param ThreadDebuggingToken - * @return VOID + * @brief Handle the state when it reached to the entrypoint + * of the user-mode process + * + * @param CurrentProcessorIndex + * @param GuestRegs + * @param ThreadDebuggingToken + * @return VOID */ VOID AttachingReachedToProcessEntrypoint(UINT32 CurrentProcessorIndex, PGUEST_REGS GuestRegs, UINT64 ThreadDebuggingToken) @@ -379,11 +379,11 @@ AttachingReachedToProcessEntrypoint(UINT32 CurrentProcessorIndex, PGUEST_REGS Gu } /** - * @brief Handle debug register event (#DB) for attaching to user-mode process - * - * @param CurrentProcessorIndex - * @param GuestRegs - * @return VOID + * @brief Handle debug register event (#DB) for attaching to user-mode process + * + * @param CurrentProcessorIndex + * @param GuestRegs + * @return VOID */ VOID AttachingHandleEntrypointDebugBreak(UINT32 CurrentProcessorIndex, PGUEST_REGS GuestRegs) @@ -526,11 +526,11 @@ AttachingHandleEntrypointDebugBreak(UINT32 CurrentProcessorIndex, PGUEST_REGS Gu } /** - * @brief Allocate a nop-sled buffer + * @brief Allocate a nop-sled buffer * @param ReservedBuffAddress * @param ProcessId - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN AttachingAdjustNopSledBuffer(UINT64 ReservedBuffAddress, UINT32 ProcessId) @@ -594,7 +594,7 @@ AttachingAdjustNopSledBuffer(UINT64 ReservedBuffAddress, UINT32 ProcessId) * @param InterruptExit * @param Address * @param ErrorCode - * + * * @return BOOLEAN if TRUE show that the page-fault injection should be ignored */ BOOLEAN @@ -657,10 +657,10 @@ AttachingCheckPageFaultsWithUserDebugger(UINT32 CurrentPro /** * @brief Enable or disable the thread intercepting phase * @details this function should be called in vmx non-root - * - * @param ProcessDebuggingToken - * @param Enable - * @return BOOLEAN + * + * @param ProcessDebuggingToken + * @param Enable + * @return BOOLEAN */ BOOLEAN AttachingConfigureInterceptingThreads(UINT64 ProcessDebuggingToken, BOOLEAN Enable) @@ -749,10 +749,10 @@ AttachingConfigureInterceptingThreads(UINT64 ProcessDebuggingToken, BOOLEAN Enab /** * @brief Attach to the target process * @details this function should not be called in vmx-root - * - * @param AttachRequest - * @param IsAttachingToEntrypoint - * @return BOOLEAN + * + * @param AttachRequest + * @param IsAttachingToEntrypoint + * @return BOOLEAN */ BOOLEAN AttachingPerformAttachToProcess(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS AttachRequest, BOOLEAN IsAttachingToEntrypoint) @@ -931,7 +931,7 @@ AttachingPerformAttachToProcess(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS Attach // Operation was successful // AttachRequest->Token = ProcessDebuggingToken; - AttachRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + AttachRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } else @@ -954,7 +954,7 @@ AttachingPerformAttachToProcess(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS Attach // Operation was successful // AttachRequest->Token = ProcessDebuggingToken; - AttachRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + AttachRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } } @@ -962,10 +962,10 @@ AttachingPerformAttachToProcess(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS Attach /** * @brief Handle the cr3 vm-exits for thread interception * @details this function should be called in vmx-root - * - * @param CurrentCoreIndex - * @param NewCr3 - * @return BOOLEAN + * + * @param CurrentCoreIndex + * @param NewCr3 + * @return BOOLEAN */ BOOLEAN AttachingHandleCr3VmexitsForThreadInterception(UINT32 CurrentCoreIndex, CR3_TYPE NewCr3) @@ -1028,9 +1028,9 @@ AttachingHandleCr3VmexitsForThreadInterception(UINT32 CurrentCoreIndex, CR3_TYPE /** * @brief Clearing hooks after resuming the process * @details this function should not be called in vmx-root - * - * @param AttachRequest - * @return BOOLEAN + * + * @param AttachRequest + * @return BOOLEAN */ BOOLEAN AttachingRemoveHooks(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS AttachRequest) @@ -1072,7 +1072,7 @@ AttachingRemoveHooks(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS AttachRequest) // // The unhooking operation was successful // - AttachRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + AttachRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } } @@ -1087,11 +1087,11 @@ AttachingRemoveHooks(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS AttachRequest) } /** - * @brief Pauses the target process + * @brief Pauses the target process * @details this function should not be called in vmx-root - * - * @param PauseRequest - * @return BOOLEAN + * + * @param PauseRequest + * @return BOOLEAN */ BOOLEAN AttachingPauseProcess(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS PauseRequest) @@ -1101,7 +1101,7 @@ AttachingPauseProcess(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS PauseRequest) // // The pausing operation was successful // - PauseRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + PauseRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } else @@ -1114,9 +1114,9 @@ AttachingPauseProcess(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS PauseRequest) /** * @brief Kill the target process from kernel-mode * @details this function should not be called in vmx-root - * - * @param KillRequest - * @return BOOLEAN + * + * @param KillRequest + * @return BOOLEAN */ BOOLEAN AttachingKillProcess(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS KillRequest) @@ -1181,16 +1181,16 @@ Success: // AttachingRemoveProcessDebuggingDetailsByToken(ProcessDebuggingDetail->Token); - KillRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + KillRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } /** * @brief Clearing hooks after resuming the process * @details this function should not be called in vmx-root - * - * @param DetachRequest - * @return BOOLEAN + * + * @param DetachRequest + * @return BOOLEAN */ BOOLEAN AttachingPerformDetach(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS DetachRequest) @@ -1242,15 +1242,15 @@ AttachingPerformDetach(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS DetachRequest) // AttachingRemoveProcessDebuggingDetailsByToken(ProcessDebuggingDetail->Token); - DetachRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + DetachRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } /** * @brief Switch to the target thread - * - * @param SwitchRequest - * @return BOOLEAN + * + * @param SwitchRequest + * @return BOOLEAN */ BOOLEAN AttachingSwitchProcess(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS SwitchRequest) @@ -1330,15 +1330,15 @@ AttachingSwitchProcess(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS SwitchRequest) SwitchRequest->Is32Bit = ProcessDebuggingDetail->Is32Bit; SwitchRequest->IsPaused = ThreadDebuggingDetail->IsPaused; - SwitchRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + SwitchRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } /** * @brief Query count of active debugging threads - * - * @param QueryCountOfDebugThreadsRequest - * @return BOOLEAN + * + * @param QueryCountOfDebugThreadsRequest + * @return BOOLEAN */ BOOLEAN AttachingQueryCountOfActiveDebuggingThreadsAndProcesses(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS QueryCountOfDebugThreadsRequest) @@ -1354,17 +1354,17 @@ AttachingQueryCountOfActiveDebuggingThreadsAndProcesses(PDEBUGGER_ATTACH_DETACH_ // Set the results // QueryCountOfDebugThreadsRequest->CountOfActiveDebuggingThreadsAndProcesses = CountOfProcessesAndThreads; - QueryCountOfDebugThreadsRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + QueryCountOfDebugThreadsRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } /** * @brief Query details of active debugging threads - * - * @param BufferToStoreDetails - * @param BufferSize - * @return BOOLEAN + * + * @param BufferToStoreDetails + * @param BufferSize + * @return BOOLEAN */ BOOLEAN AttachingQueryDetailsOfActiveDebuggingThreadsAndProcesses(PVOID BufferToStoreDetails, UINT32 BufferSize) @@ -1394,9 +1394,9 @@ AttachingQueryDetailsOfActiveDebuggingThreadsAndProcesses(PVOID BufferToStoreDet /** * @brief Dispatch and perform attaching tasks * @details this function should not be called in vmx-root - * - * @param AttachRequest - * @return VOID + * + * @param AttachRequest + * @return VOID */ VOID AttachingTargetProcess(PDEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS Request) diff --git a/hyperdbg/hprdbghv/code/debugger/user-level/UserAccess.c b/hyperdbg/hprdbghv/code/debugger/user-level/UserAccess.c index 58ef2084..5d798725 100644 --- a/hyperdbg/hprdbghv/code/debugger/user-level/UserAccess.c +++ b/hyperdbg/hprdbghv/code/debugger/user-level/UserAccess.c @@ -6,23 +6,23 @@ * * @version 0.1 * @date 2021-12-24 - * + * * @copyright This project is released under the GNU Public License v3. - * + * */ #include "pch.h" /** * @brief Get the image path from process Id * @details This function should be called in vmx non-root - * for size 512 is enough, if the size is not enough it + * for size 512 is enough, if the size is not enough it * returns FALSE * it's up to the user to deallocate ProcessImageName.Buffer - * - * @param ProcessId - * @param ProcessImageName - * @param SizeOfImageNameToBeAllocated - * @return BOOLEAN + * + * @param ProcessId + * @param ProcessImageName + * @param SizeOfImageNameToBeAllocated + * @return BOOLEAN */ BOOLEAN UserAccessAllocateAndGetImagePathFromProcessId(HANDLE ProcessId, @@ -163,10 +163,10 @@ UserAccessAllocateAndGetImagePathFromProcessId(HANDLE ProcessId, /** * @brief Get the process's PEB from process Id * @details This function should be called in vmx non-root - * - * @param ProcessId - * @param Peb - * @return BOOLEAN + * + * @param ProcessId + * @param Peb + * @return BOOLEAN */ BOOLEAN UserAccessGetPebFromProcessId(HANDLE ProcessId, PUINT64 Peb) @@ -234,12 +234,12 @@ UserAccessGetPebFromProcessId(HANDLE ProcessId, PUINT64 Peb) * @brief If the target process's main module is loaded, it fills * the Entrypoint and the BaseAddress * @details This function is safe to be called in vmx non-root - * - * @param PebAddress - * @param Is32Bit - * @param BaseAddress - * @param Entrypoint - * @return BOOLEAN + * + * @param PebAddress + * @param Is32Bit + * @param BaseAddress + * @param Entrypoint + * @return BOOLEAN */ BOOLEAN UserAccessGetBaseAndEntrypointOfMainModuleIfLoadedInVmxRoot(PPEB PebAddress, BOOLEAN Is32Bit, PUINT64 BaseAddress, PUINT64 Entrypoint) @@ -326,13 +326,13 @@ UserAccessGetBaseAndEntrypointOfMainModuleIfLoadedInVmxRoot(PPEB PebAddress, BOO /** * @brief Gets the loaded modules details from PEB * @details This function should be called in vmx non-root - * - * @param Proc - * @param OnlyCountModules - * @param ModulesCount - * @param ModulesList - * @param SizeOfBufferForModulesList - * @return BOOLEAN + * + * @param Proc + * @param OnlyCountModules + * @param ModulesCount + * @param ModulesList + * @param SizeOfBufferForModulesList + * @return BOOLEAN */ BOOLEAN UserAccessPrintLoadedModulesX64(PEPROCESS Proc, @@ -476,13 +476,13 @@ UserAccessPrintLoadedModulesX64(PEPROCESS Proc, /** * @brief Gets the loaded modules details from PEB (x86) * @details This function should be called in vmx non-root - * - * @param Proc - * @param OnlyCountModules - * @param ModulesCount - * @param ModulesList - * @param SizeOfBufferForModulesList - * @return BOOLEAN + * + * @param Proc + * @param OnlyCountModules + * @param ModulesCount + * @param ModulesList + * @param SizeOfBufferForModulesList + * @return BOOLEAN */ BOOLEAN UserAccessPrintLoadedModulesX86(PEPROCESS Proc, @@ -618,9 +618,9 @@ UserAccessPrintLoadedModulesX86(PEPROCESS Proc, /** * @brief Print loaded modules details from PEB * @details This function should be called in vmx non-root - * - * @param Proc - * @return BOOLEAN + * + * @param Proc + * @return BOOLEAN */ BOOLEAN UserAccessPrintLoadedModulesX86_2(PEPROCESS Proc) @@ -701,11 +701,11 @@ UserAccessPrintLoadedModulesX86_2(PEPROCESS Proc) /** * @brief Detects whether process is 32-bit or 64-bit * @details This function should be called in vmx non-root - * - * @param ProcessId - * @param Is32Bit - * - * @return BOOLEAN + * + * @param ProcessId + * @param Is32Bit + * + * @return BOOLEAN */ BOOLEAN UserAccessIsWow64Process(HANDLE ProcessId, PBOOLEAN Is32Bit) @@ -756,10 +756,10 @@ UserAccessIsWow64Process(HANDLE ProcessId, PBOOLEAN Is32Bit) /** * @brief Get details about loaded modules * @details This function should be called in vmx non-root - * + * * @param ProcessLoadedModuleRequest * @param BufferSize - * @return BOOLEAN + * @return BOOLEAN */ BOOLEAN UserAccessGetLoadedModules(PUSERMODE_LOADED_MODULE_DETAILS ProcessLoadedModuleRequest, UINT32 BufferSize) @@ -801,7 +801,7 @@ UserAccessGetLoadedModules(PUSERMODE_LOADED_MODULE_DETAILS ProcessLoadedModuleRe (UINT64)ProcessLoadedModuleRequest + sizeof(USERMODE_LOADED_MODULE_DETAILS), BufferSize - sizeof(USERMODE_LOADED_MODULE_DETAILS))) { - ProcessLoadedModuleRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + ProcessLoadedModuleRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } } @@ -816,7 +816,7 @@ UserAccessGetLoadedModules(PUSERMODE_LOADED_MODULE_DETAILS ProcessLoadedModuleRe (UINT64)ProcessLoadedModuleRequest + sizeof(USERMODE_LOADED_MODULE_DETAILS), BufferSize - sizeof(USERMODE_LOADED_MODULE_DETAILS))) { - ProcessLoadedModuleRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + ProcessLoadedModuleRequest->Result = DEBUGGER_OPERATION_WAS_SUCCESSFUL; return TRUE; } } @@ -827,8 +827,8 @@ UserAccessGetLoadedModules(PUSERMODE_LOADED_MODULE_DETAILS ProcessLoadedModuleRe /** * @brief Checks whether the loaded module is available or not - * - * @return BOOLEAN + * + * @return BOOLEAN */ BOOLEAN UserAccessCheckForLoadedModuleDetails() diff --git a/hyperdbg/hprdbghv/code/driver/Ioctl.c b/hyperdbg/hprdbghv/code/driver/Ioctl.c index 93abac99..59d4d727 100644 --- a/hyperdbg/hprdbghv/code/driver/Ioctl.c +++ b/hyperdbg/hprdbghv/code/driver/Ioctl.c @@ -1,23 +1,23 @@ /** * @file Ioctl.c * @author Sina Karvandi (sina@hyperdbg.org) - * @brief IOCTL Functions form user mode and other parts - * @details + * @brief IOCTL Functions form user mode and other parts + * @details * * @version 0.1 * @date 2020-06-01 - * + * * @copyright This project is released under the GNU Public License v3. - * + * */ #include "pch.h" /** * @brief Driver IOCTL Dispatcher - * - * @param DeviceObject - * @param Irp - * @return NTSTATUS + * + * @param DeviceObject + * @param Irp + * @return NTSTATUS */ NTSTATUS DrvDispatchIoControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) @@ -420,7 +420,7 @@ DrvDispatchIoControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) // // Set the status // - DebuggerHideAndUnhideRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFULL; + DebuggerHideAndUnhideRequest->KernelStatus = DEBUGGER_OPERATION_WAS_SUCCESSFUL; } else { diff --git a/hyperdbg/hprdbghv/code/vmm/ept/Ept.c b/hyperdbg/hprdbghv/code/vmm/ept/Ept.c index 76a03077..cf861cd7 100644 --- a/hyperdbg/hprdbghv/code/vmm/ept/Ept.c +++ b/hyperdbg/hprdbghv/code/vmm/ept/Ept.c @@ -228,7 +228,7 @@ EptGetPml2Entry(PVMM_EPT_PAGE_TABLE EptPageTable, SIZE_T PhysicalAddress) * @param PreAllocatedBuffer The address of pre-allocated buffer * @param PhysicalAddress Physical address of where we want to split * @param CoreIndex The index of core - * @return BOOLEAN Returns true if it was successfull or false if there was an error + * @return BOOLEAN Returns true if it was successful or false if there was an error */ BOOLEAN EptSplitLargePage(PVMM_EPT_PAGE_TABLE EptPageTable, diff --git a/hyperdbg/include/SDK/Headers/ErrorCodes.h b/hyperdbg/include/SDK/Headers/ErrorCodes.h index 9bb2e67b..2b20d562 100644 --- a/hyperdbg/include/SDK/Headers/ErrorCodes.h +++ b/hyperdbg/include/SDK/Headers/ErrorCodes.h @@ -20,7 +20,7 @@ * request was successful * */ -#define DEBUGGER_OPERATION_WAS_SUCCESSFULL 0xFFFFFFFF +#define DEBUGGER_OPERATION_WAS_SUCCESSFUL 0xFFFFFFFF ////////////////////////////////////////////////// // Error Codes // diff --git a/hyperdbg/include/SDK/Headers/RequestStructures.h b/hyperdbg/include/SDK/Headers/RequestStructures.h index 1a54fc12..5db97365 100644 --- a/hyperdbg/include/SDK/Headers/RequestStructures.h +++ b/hyperdbg/include/SDK/Headers/RequestStructures.h @@ -448,7 +448,7 @@ typedef struct _DEBUGGER_HIDE_AND_TRANSPARENT_DEBUGGER_MODE UINT32 LengthOfProcessName; // in the case of !hide name xxx, this parameter // shows the length of xxx - UINT64 KernelStatus; /* DEBUGGER_OPERATION_WAS_SUCCESSFULL , + UINT64 KernelStatus; /* DEBUGGER_OPERATION_WAS_SUCCESSFUL , DEBUGGER_ERROR_UNABLE_TO_HIDE_OR_UNHIDE_DEBUGGER */