HyperDbg Debugger
|
Event source forwarding. More...
#include "pch.h"
Functions | |
UINT64 | ForwardingGetNewOutputSourceTag () |
Get the output source tag and increase the global variable for tag. | |
DEBUGGER_OUTPUT_SOURCE_STATUS | ForwardingOpenOutputSource (PDEBUGGER_EVENT_FORWARDING SourceDescriptor) |
Opens the output source. | |
DEBUGGER_OUTPUT_SOURCE_STATUS | ForwardingCloseOutputSource (PDEBUGGER_EVENT_FORWARDING SourceDescriptor) |
Closes the output source. | |
VOID * | ForwardingCreateOutputSource (DEBUGGER_EVENT_FORWARDING_TYPE SourceType, const string &Description, SOCKET *Socket, HMODULE *Module) |
Create a new source (create handle from the source) | |
BOOLEAN | ForwardingPerformEventForwarding (PDEBUGGER_GENERAL_EVENT_DETAIL EventDetail, CHAR *Message, UINT32 MessageLength) |
Send the event result to the corresponding sources. | |
BOOLEAN | ForwardingCheckAndPerformEventForwarding (UINT32 OperationCode, CHAR *Message, UINT32 MessageLength) |
Check and send the event result to the corresponding sources. | |
BOOLEAN | ForwardingWriteToFile (HANDLE FileHandle, CHAR *Message, UINT32 MessageLength) |
Write the output results to the file. | |
BOOLEAN | ForwardingSendToNamedPipe (HANDLE NamedPipeHandle, CHAR *Message, UINT32 MessageLength) |
Send the output results to the namedpipe. | |
BOOLEAN | ForwardingSendToTcpSocket (SOCKET TcpSocket, CHAR *Message, UINT32 MessageLength) |
Send the output results to the tcp socket. | |
Variables | |
UINT64 | g_OutputSourceTag |
This variable holds the trace and generate numbers for unique tag of the output resources. | |
LIST_ENTRY | g_OutputSources |
Holds a list of output sources created by output command. | |
LIST_ENTRY | g_EventTrace |
Holds a list of events in kernel and the state of events and the commands to show the state of each command (disabled/enabled) | |
Event source forwarding.
BOOLEAN ForwardingCheckAndPerformEventForwarding | ( | UINT32 | OperationCode, |
CHAR * | Message, | ||
UINT32 | MessageLength ) |
Check and send the event result to the corresponding sources.
OperationCode | The target operation code or tag |
MessageLength | Length of the message |
This function will not check whether the event has an output source or not, the caller if this function should make sure that the following event has valid output sources or not
DEBUGGER_OUTPUT_SOURCE_STATUS ForwardingCloseOutputSource | ( | PDEBUGGER_EVENT_FORWARDING | SourceDescriptor | ) |
Closes the output source.
SourceDescriptor | Descriptor of the source |
VOID * ForwardingCreateOutputSource | ( | DEBUGGER_EVENT_FORWARDING_TYPE | SourceType, |
const string & | Description, | ||
SOCKET * | Socket, | ||
HMODULE * | Module ) |
Create a new source (create handle from the source)
SourceType | Type of the source |
Description | Description of the source |
Socket | Socket object in the case of TCP connection |
Module | Module object in the case of loading modules |
If the target connection is a tcp connection then there is no handle and instead there is a socket, this way we pass a valid value for handle (TRUE) which is not a valid handle but it indicates that the operation was successful and the caller can use the pointer that it passed as the socket. On anything other than tcp sockets, the socket pointer in not modified; thus, it's not value
UINT64 ForwardingGetNewOutputSourceTag | ( | ) |
Get the output source tag and increase the global variable for tag.
DEBUGGER_OUTPUT_SOURCE_STATUS ForwardingOpenOutputSource | ( | PDEBUGGER_EVENT_FORWARDING | SourceDescriptor | ) |
Opens the output source.
SourceDescriptor | Descriptor of the source |
BOOLEAN ForwardingPerformEventForwarding | ( | PDEBUGGER_GENERAL_EVENT_DETAIL | EventDetail, |
CHAR * | Message, | ||
UINT32 | MessageLength ) |
Send the event result to the corresponding sources.
EventDetail | Description saved about the event in the user-mode |
MessageLength | Length of the message |
This function will not check whether the event has an output source or not, the caller if this function should make sure that the following event has valid output sources or not
Send the output results to the namedpipe.
NamedPipeHandle | Handle of the target namedpipe |
Message | The message that should be sent to namedpipe |
MessageLength | Length of the message |
This function will not check whether the event has an output source or not, the caller if this function should make sure that the following event has valid output sources or not
Send the output results to the tcp socket.
TcpSocket | Socket object of the target tcp socket |
Message | The message that should be sent to the tcp socket |
MessageLength | Length of the message |
This function will not check whether the event has an output source or not, the caller if this function should make sure that the following event has valid output sources or not
Write the output results to the file.
FileHandle | Handle of the target file |
Message | The message that should be written to file |
MessageLength | Length of the message |
This function will not check whether the event has an output source or not, the caller if this function should make sure that the following event has valid output sources or not
|
extern |
Holds a list of events in kernel and the state of events and the commands to show the state of each command (disabled/enabled)
this list is not have any relation with the things that HyperDbg holds for each event in the kernel
|
extern |
Holds a list of output sources created by output command.
user-mode events and output sources are two separate things in HyperDbg
|
extern |
This variable holds the trace and generate numbers for unique tag of the output resources.