HyperDbg Debugger
|
Headers for event source forwarding. More...
Go to the source code of this file.
Classes | |
struct | _DEBUGGER_EVENT_FORWARDING |
structures hold the detail of event forwarding More... | |
Macros | |
#define | MAXIMUM_CHARACTERS_FOR_EVENT_FORWARDING_NAME 50 |
maximum characters for event forwarding source names | |
Typedefs | |
typedef void(* | hyperdbg_event_forwarding_t) (const char *, unsigned int) |
maximum characters for event forwarding source names | |
typedef enum _DEBUGGER_EVENT_FORWARDING_TYPE | DEBUGGER_EVENT_FORWARDING_TYPE |
event forwarding type | |
typedef enum _DEBUGGER_EVENT_FORWARDING_STATE | DEBUGGER_EVENT_FORWARDING_STATE |
event forwarding states | |
typedef enum _DEBUGGER_OUTPUT_SOURCE_STATUS | DEBUGGER_OUTPUT_SOURCE_STATUS |
output source status | |
typedef struct _DEBUGGER_EVENT_FORWARDING | DEBUGGER_EVENT_FORWARDING |
structures hold the detail of event forwarding | |
typedef struct _DEBUGGER_EVENT_FORWARDING * | PDEBUGGER_EVENT_FORWARDING |
Enumerations | |
enum | _DEBUGGER_EVENT_FORWARDING_TYPE { EVENT_FORWARDING_NAMEDPIPE , EVENT_FORWARDING_FILE , EVENT_FORWARDING_TCP , EVENT_FORWARDING_MODULE } |
event forwarding type More... | |
enum | _DEBUGGER_EVENT_FORWARDING_STATE { EVENT_FORWARDING_STATE_NOT_OPENED , EVENT_FORWARDING_STATE_OPENED , EVENT_FORWARDING_CLOSED } |
event forwarding states More... | |
enum | _DEBUGGER_OUTPUT_SOURCE_STATUS { DEBUGGER_OUTPUT_SOURCE_STATUS_SUCCESSFULLY_OPENED , DEBUGGER_OUTPUT_SOURCE_STATUS_SUCCESSFULLY_CLOSED , DEBUGGER_OUTPUT_SOURCE_STATUS_ALREADY_OPENED , DEBUGGER_OUTPUT_SOURCE_STATUS_ALREADY_CLOSED , DEBUGGER_OUTPUT_SOURCE_STATUS_UNKNOWN_ERROR } |
output source status More... | |
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. | |
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. | |
VOID * | ForwardingCreateOutputSource (DEBUGGER_EVENT_FORWARDING_TYPE SourceType, const string &Description, SOCKET *Socket, HMODULE *Module) |
Create a new source (create handle from the source) | |
Headers for event source forwarding.
#define MAXIMUM_CHARACTERS_FOR_EVENT_FORWARDING_NAME 50 |
maximum characters for event forwarding source names
typedef struct _DEBUGGER_EVENT_FORWARDING DEBUGGER_EVENT_FORWARDING |
structures hold the detail of event forwarding
event forwarding states
event forwarding type
output source status
this enum is used as the result returned from the functions that work with opening and closing sources
typedef void(* hyperdbg_event_forwarding_t) (const char *, unsigned int) |
maximum characters for event forwarding source names
typedef struct _DEBUGGER_EVENT_FORWARDING * PDEBUGGER_EVENT_FORWARDING |
output source status
this enum is used as the result returned from the functions that work with opening and closing sources
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 |
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