HyperDbg Debugger
Loading...
Searching...
No Matches
HyperDbgLibImports.h
Go to the documentation of this file.
1
11#pragma once
12
13#ifdef HYPERDBG_LIBHYPERDBG
14# define IMPORT_EXPORT_LIBHYPERDBG __declspec(dllexport)
15#else
16# define IMPORT_EXPORT_LIBHYPERDBG __declspec(dllimport)
17#endif
18
19//
20// Header file of libhyperdbg
21// Imports
22//
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27//
28// Support Detection
29//
32
35
36//
37// VMM Module
38//
41
44
47
50
53
54//
55// General imports
56//
59
62
65
68
71
74
77
79hyperdbg_u_check_multiline_command(CHAR * current_command, BOOLEAN reset);
80
82hyperdbg_u_set_custom_driver_path(CHAR * driver_file_path, CHAR * driver_name);
83
86
87//
88// Connect to local or remote debugger
89// Exported functionality of the '.connect' command
90//
93
95hyperdbg_u_connect_remote_debugger(const CHAR * ip, const CHAR * port);
96
97//
98// Connect to the debugger in the Debugger Mode
99//
102
105
108
109//
110// Miscalenous functions
111//
114
115//
116// Reading memory
117//
119hyperdbg_u_read_memory(UINT64 target_address,
120 DEBUGGER_READ_MEMORY_TYPE memory_type,
121 DEBUGGER_READ_READING_TYPE reading_Type,
122 UINT32 pid,
123 UINT32 size,
124 BOOLEAN get_address_mode,
126 BYTE * target_buffer_to_store,
127 UINT32 * return_length);
128
131 UINT64 address,
132 DEBUGGER_READ_MEMORY_TYPE memory_type,
133 DEBUGGER_READ_READING_TYPE reading_type,
134 UINT32 pid,
135 UINT32 size,
137
138//
139// Writing memory
140//
142hyperdbg_u_write_memory(PVOID destination_address,
143 DEBUGGER_EDIT_MEMORY_TYPE memory_type,
144 UINT32 process_id,
145 PVOID source_address,
146 UINT32 number_of_bytes);
147
148//
149// Reading/Writing registers
150//
152hyperdbg_u_read_all_registers(GUEST_REGS * guest_registers, GUEST_EXTRA_REGISTERS * extra_registers);
153
155hyperdbg_u_read_target_register(REGS_ENUM register_id, UINT64 * target_register);
156
159
162
165
166//
167// Continue debuggee
168// Exported functionality of the 'g' command
169//
172
173//
174// Pause debuggee
175// Exported functionality of the 'pause' command or CTRL+C
176//
179
180//
181// Set breakpoint
182// Exported functionality of the 'bp' command
183//
184VOID
185hyperdbg_u_set_breakpoint(UINT64 address, UINT32 pid, UINT32 tid, UINT32 core_numer);
186
187//
188// Start a process
189// Exported functionality of the '.start' command
190//
192hyperdbg_u_start_process(const WCHAR * path);
193
195hyperdbg_u_start_process_with_args(const WCHAR * path, const WCHAR * arguments);
196
197#ifdef __cplusplus
198}
199#endif
UCHAR BOOLEAN
Definition BasicTypes.h:39
int INT
Definition BasicTypes.h:26
unsigned char BYTE
Definition BasicTypes.h:24
#define VOID
Definition BasicTypes.h:33
wchar_t WCHAR
Definition BasicTypes.h:32
unsigned __int64 UINT64
Definition BasicTypes.h:21
unsigned long DWORD
Definition BasicTypes.h:22
unsigned int UINT32
Definition BasicTypes.h:48
char CHAR
Definition BasicTypes.h:31
IMPORT_EXPORT_LIBHYPERDBG BOOLEAN hyperdbg_u_read_memory(UINT64 target_address, DEBUGGER_READ_MEMORY_TYPE memory_type, DEBUGGER_READ_READING_TYPE reading_Type, UINT32 pid, UINT32 size, BOOLEAN get_address_mode, DEBUGGER_READ_MEMORY_ADDRESS_MODE *address_mode, BYTE *target_buffer_to_store, UINT32 *return_length)
Read memory and disassembler.
Definition export.cpp:333
IMPORT_EXPORT_LIBHYPERDBG INT hyperdbg_u_script_read_file_and_execute_commandline(INT argc, CHAR *argv[])
Parsing the command line options for scripts.
Definition export.cpp:169
BOOLEAN hyperdbg_u_connect_remote_debugger_using_named_pipe(const CHAR *named_pipe)
Connect to the remote debugger using named pipe.
Definition export.cpp:486
BOOLEAN hyperdbg_u_connect_remote_debugger_using_com_port(const CHAR *port_name, DWORD baudrate)
Connect to the remote debugger using COM port.
Definition export.cpp:473
IMPORT_EXPORT_LIBHYPERDBG INT hyperdbg_u_unload_vmm()
Unload the VMM.
Definition export.cpp:61
IMPORT_EXPORT_LIBHYPERDBG BOOLEAN hyperdbg_u_continue_previous_command()
Some of commands like stepping commands (i, p, t) and etc. need to be repeated when the user press en...
Definition export.cpp:183
IMPORT_EXPORT_LIBHYPERDBG VOID hyperdbg_u_pause_debuggee()
Pause the debuggee (equal to the 'pause' command or CTRL+C)
Definition export.cpp:242
IMPORT_EXPORT_LIBHYPERDBG INT hyperdbg_u_stop_vmm_driver()
Stop the VMM driver.
Definition export.cpp:94
IMPORT_EXPORT_LIBHYPERDBG INT hyperdbg_u_load_vmm()
Load the VMM.
Definition export.cpp:50
IMPORT_EXPORT_LIBHYPERDBG VOID hyperdbg_u_show_signature()
Show the signature of the debugger.
Definition export.cpp:116
#define IMPORT_EXPORT_LIBHYPERDBG
Definition HyperDbgLibImports.h:16
IMPORT_EXPORT_LIBHYPERDBG UINT64 hyperdbg_u_get_kernel_base()
Get the kernel base.
Definition export.cpp:459
IMPORT_EXPORT_LIBHYPERDBG BOOLEAN hyperdbg_u_show_all_registers()
Show all registers.
Definition export.cpp:416
VOID hyperdbg_u_set_breakpoint(UINT64 address, UINT32 pid, UINT32 tid, UINT32 core_numer)
Set a breakpoint.
Definition export.cpp:257
IMPORT_EXPORT_LIBHYPERDBG VOID hyperdbg_u_unset_text_message_callback()
Unset the function callback that will be called if any message needs to be shown.
Definition export.cpp:156
IMPORT_EXPORT_LIBHYPERDBG BOOLEAN hyperdbg_u_write_target_register(REGS_ENUM register_id, UINT64 value)
Write target register.
Definition export.cpp:405
IMPORT_EXPORT_LIBHYPERDBG PVOID hyperdbg_u_set_text_message_callback_using_shared_buffer(PVOID handler)
Set the function callback that will be called if any message needs to be shown (using shared buffer m...
Definition export.cpp:144
IMPORT_EXPORT_LIBHYPERDBG INT hyperdbg_u_uninstall_vmm_driver()
Uninstall the VMM driver.
Definition export.cpp:83
IMPORT_EXPORT_LIBHYPERDBG VOID hyperdbg_u_show_memory_or_disassemble(DEBUGGER_SHOW_MEMORY_STYLE style, UINT64 address, DEBUGGER_READ_MEMORY_TYPE memory_type, DEBUGGER_READ_READING_TYPE reading_type, UINT32 pid, UINT32 size, PDEBUGGER_DT_COMMAND_OPTIONS dt_details)
Show memory or disassembler.
Definition export.cpp:360
IMPORT_EXPORT_LIBHYPERDBG BOOLEAN hyperdbg_u_check_multiline_command(CHAR *current_command, BOOLEAN reset)
Check if the command is a multiline command or not.
Definition export.cpp:196
IMPORT_EXPORT_LIBHYPERDBG BOOLEAN hyperdbg_u_write_memory(PVOID destination_address, DEBUGGER_EDIT_MEMORY_TYPE memory_type, UINT32 process_id, PVOID source_address, UINT32 number_of_bytes)
Write memory.
Definition export.cpp:444
IMPORT_EXPORT_LIBHYPERDBG BOOLEAN hyperdbg_u_read_target_register(REGS_ENUM register_id, UINT64 *target_register)
Read target register.
Definition export.cpp:392
IMPORT_EXPORT_LIBHYPERDBG BOOLEAN hyperdbg_u_start_process_with_args(const WCHAR *path, const WCHAR *arguments)
Start a new process.
Definition export.cpp:533
IMPORT_EXPORT_LIBHYPERDBG VOID hyperdbg_u_set_text_message_callback(PVOID handler)
Set the function callback that will be called if any message needs to be shown (by passing message as...
Definition export.cpp:130
IMPORT_EXPORT_LIBHYPERDBG INT hyperdbg_u_interpreter(CHAR *command)
Interprets the command.
Definition export.cpp:105
IMPORT_EXPORT_LIBHYPERDBG VOID hyperdbg_u_read_vendor_string(CHAR *)
Read the vendor string of the CPU.
Definition export.cpp:39
IMPORT_EXPORT_LIBHYPERDBG BOOLEAN hyperdbg_u_start_process(const WCHAR *path)
Start a new process.
Definition export.cpp:516
IMPORT_EXPORT_LIBHYPERDBG BOOLEAN hyperdbg_u_set_custom_driver_path(CHAR *driver_file_path, CHAR *driver_name)
Set custom driver path.
Definition export.cpp:271
IMPORT_EXPORT_LIBHYPERDBG INT hyperdbg_u_install_vmm_driver()
Install the VMM driver.
Definition export.cpp:72
IMPORT_EXPORT_LIBHYPERDBG VOID hyperdbg_u_connect_local_debugger()
Connect to the local debugger.
Definition export.cpp:207
IMPORT_EXPORT_LIBHYPERDBG BOOLEAN hyperdbg_u_detect_vmx_support()
Detects the support of VMX.
Definition export.cpp:27
IMPORT_EXPORT_LIBHYPERDBG VOID hyperdbg_u_continue_debuggee()
Continue the debuggee (equal to the 'g' command)
Definition export.cpp:231
IMPORT_EXPORT_LIBHYPERDBG BOOLEAN hyperdbg_u_read_all_registers(GUEST_REGS *guest_registers, GUEST_EXTRA_REGISTERS *extra_registers)
Read all registers.
Definition export.cpp:379
IMPORT_EXPORT_LIBHYPERDBG VOID hyperdbg_u_use_default_driver_path()
Use the default driver path.
Definition export.cpp:309
IMPORT_EXPORT_LIBHYPERDBG BOOLEAN hyperdbg_u_show_target_register(REGS_ENUM register_id)
Show target register.
Definition export.cpp:428
BOOLEAN hyperdbg_u_connect_current_debugger_using_com_port(const CHAR *port_name, DWORD baudrate)
Connect to the current debugger using COM port.
Definition export.cpp:503
IMPORT_EXPORT_LIBHYPERDBG BOOLEAN hyperdbg_u_connect_remote_debugger(const CHAR *ip, const CHAR *port)
Connect to the remote debugger.
Definition export.cpp:220
enum _DEBUGGER_SHOW_MEMORY_STYLE DEBUGGER_SHOW_MEMORY_STYLE
the way that debugger should show the details of memory or disassemble them
enum _DEBUGGER_READ_READING_TYPE DEBUGGER_READ_READING_TYPE
different types of reading memory
enum _DEBUGGER_EDIT_MEMORY_TYPE DEBUGGER_EDIT_MEMORY_TYPE
different type of addresses for editing memory
enum _DEBUGGER_READ_MEMORY_TYPE DEBUGGER_READ_MEMORY_TYPE
different type of addresses
enum _DEBUGGER_READ_MEMORY_ADDRESS_MODE DEBUGGER_READ_MEMORY_ADDRESS_MODE
different address mode
REGS_ENUM
Definition ScriptEngineCommonDefinitions.h:313
requests options for dt and struct command
Definition RequestStructures.h:135
struct for extra registers
Definition BasicTypes.h:103
Definition BasicTypes.h:70
char ** argv
Definition symbol-parser.h:46