Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BaumFX/cpp-anti-debug
/ functions
Functions
27 in github.com/BaumFX/cpp-anti-debug
⨍
Functions
27
◇
Types & classes
1
Method
being_debugged_peb
checks the process environment block (peb) for a "beingdebugged" field (gets set if process is launched in a debugger) possible bypass: once the peb b
anti_debug.cpp:61
Method
check_cpuid
anti_debug.cpp:584
Method
check_registry
anti_debug.cpp:602
Method
check_security
anti_debug.cpp:774
Method
check_window_name
checks if certain windows are present (not the name that can be easily changed but the window_class_name) possible bypass: set a breakpoint before thi
anti_debug.cpp:93
Method
close_handle_exception
will throw an exception when trying to close an invalid handle (only when debugged) so if we pass an invalid handle and get the exception, we know tha
anti_debug.cpp:338
Method
debug_active_process
anti_debug.cpp:189
Method
debug_string
checks whether a debugger is present by attempting to output a string to the debugger (helper functions for debugging applications) if no debugger is
anti_debug.cpp:456
Method
get_string
returns strings for the check_window_name() function this combined with the xoring of strings is to prevent static analysis / make it harder
anti_debug.cpp:42
Method
get_tick_count
same as above
anti_debug.cpp:526
Method
hardware_debug_registers
anti_debug.cpp:550
Method
int_2d
2d is a kernel interrupt (opcode 0x2D), when it gets executed, windows will use the extended instruction pointer register value as the exception addre
anti_debug.cpp:408
Method
int_3
i3 is a standard software breakcode (opcode 0xCC), when you set a breakpoint the debugger replaces the opcode under the breakpoint location with 0xCC
anti_debug.cpp:381
Method
is_debugger_present
another check for the peb flag, this time by the function from winapi.h possible bypass: set a breakpoint before this gets called, single step, set th
anti_debug.cpp:105
Method
mov_ss
single stepping check
anti_debug.cpp:564
Method
nt_global_flag_peb
looks for process environment block references they usually start with FS:[0x30h]. fs = frame segment, indicates reference to the programs internal he
anti_debug.cpp:114
Method
nt_query_information_process
two checks here, 1. xxx, 2. NoDebugInherit
anti_debug.cpp:131
Method
nt_set_information_thread
hides the thread from any debugger, any attempt to control the process after this call ends the debugging session
anti_debug.cpp:167
Method
prefix_hop
anti_debug.cpp:437
Method
query_performance_counter
checks how much time passes between the two query performance counters if more than X (here 30ms) pass, a debugger is slowing execution down (manual b
anti_debug.cpp:501
Method
rdtsc
anti_debug.cpp:463
Method
remote_debugger_present
checks if a debugger is running (in another system/process) possible bypass: set a breakpoint before this gets called, single step, set the return val
anti_debug.cpp:77
Method
single_step_exception
we force an exception to occur, if it occurs outside of a debugger the __except() handler is called, if it's inside a debugger it will not be called
anti_debug.cpp:356
Method
to_lower
anti_debug.cpp:33
Method
vm
anti_debug.cpp:609
Method
vm_handler
anti_debug.cpp:26
Method
write_buffer
thanks to LordNoteworthy/al-khaser for the idea
anti_debug.cpp:260