_    _   _ _____ ___        _    _   _    _    _  __   _______ ___ ____
   / \  | \ | |_   _|_ _|      / \  | \ | |  / \  | | \ \ / / _____|_ _/ ___|
  / _ \ |  \| | | |  | |_____ / _ \ |  \| | / _ \ | |  \ V /\___ \ | |\___ \
 / ___ \| |\  | | |  | |_____/ ___ \| |\  |/ ___ \| |___| |  ___) || | ___) |
/_/   \_\_| \_| |_| |___|   /_/   \_\_| \_/_/   \_\_____|_| |____/___|____/
[ ANTI-ANALYSIS TECHNIQUE COLLECTION ]
- 47 techniques for the curious mind -
47
TECHNIQUES
39
ANTI-DEBUG
8
ANTI-SANDBOX
> ABOUT
A collection of real-world anti-analysis techniques discovered during malware research and reverse engineering. Each technique is implemented as a standalone proof-of-concept in C with source code, build instructions, and documentation.

Purpose: Educational resource for security researchers, malware analysts, and reverse engineers.
Platform: Windows | Language: C | License: MIT
/!\ FOR EDUCATIONAL AND RESEARCH PURPOSES ONLY /!\
Do not use these techniques for malicious purposes.

cat techniques/anti-sandbox.db

ANTI-SANDBOX :: 8 techniques

ANTI-SANDBOX
IDTechniqueDescription
AS001SetErrorModeDetects sandbox by inspecting SetErrorMode behavior for hooks
AS002ForcedRaceConditionSleepForces race condition to detect changes in sleep() behavior
AS003CheckProcessListScans process list for known analysis tool names
AS004CheckLoadedModulesDetects injected DLLs from analysis tools in current process
AS005CheckRegistryKeysSearches Windows Registry for VM-related device names
AS006CopyOfNtdllLoads clean ntdll.dll copy to bypass hooked functions
AS007EnumWindowsProcSearches for windows with known analysis tool names
AS008BlockInputDetects API hooking by analyzing BlockInput behavior

cat techniques/anti-debugger.db

ANTI-DEBUGGER :: 39 techniques

ANTI-DEBUGGER
IDTechniqueDescription
--- PEB & Process Info ---
AD001CheckProcessDebugPortQueries ProcessDebugPort via NtQueryInformationProcess
AD002IsDebuggerPresentChecks PEB debug flag using IsDebuggerPresent API
AD003CheckRemoteDebuggerPresentDetects debugger attached to specific process
AD004ProcessDebugObjectHandleQueries ProcessDebugObjectHandle to detect debugging
AD005CheckPEBDirectly inspects debug flags in PEB structure
AD015NtQueryObjectEnumerates object types looking for DebugObject
--- Exception-Based ---
AD006SetUnhandledExceptionFilterDetects debugger takeover of exception handling chain
AD007CloseHandleChecks if CloseHandle raises exception on invalid handle
AD008SetHandleInformationAbuses HANDLE_FLAG_PROTECT_FROM_CLOSE to detect debugger
AD011DbgPrintDetects debugger via DbgPrint exception behavior
AD016RaiseExceptionRaises DBG_CONTROL_C to detect exception interception
AD023INT3Uses vectored exception handler with INT3 instruction
AD024INT3 Long FormUses long form of INT3 (0xCD03) for detection
AD025INT 2DKernel debugger interrupt for detection
AD026INT1 ICEBPUses ICEBP instruction (0xF1) for detection
AD027INT1 Long FormTwo-byte form of INT 1 (0xCD01) for detection
AD028POPFD Trap FlagManipulates Trap Flag via POPFD to trigger single-step
AD029INT1 with PrefixesUses instruction prefixes before ICEBP
--- Memory & Breakpoints ---
AD012GetWriteWatchMonitors protected memory for debugger modifications
AD017SoftwareBreakpointScans function memory for breakpoints (0xCC)
AD018AntiStepOverChecks for breakpoint at function return address
AD019MemoryBreakpointUses guard page exception to detect debugger
AD020NtQueryVirtualMemoryChecks working set page attributes for modifications
--- Self-Protection ---
AD014NtSetInformationThreadHides thread from debugger using ThreadHideFromDebugger
AD021DbgBreakPoint PatchPatches DbgBreakPoint to prevent debugger attachment
AD022DbgUiRemoteBreakin HookPatches DbgUiRemoteBreakin to block debugger attachment
AD030Self-DebuggingAttempts to debug itself to detect existing debugger
AD034SwitchDesktopHides process from debugger by switching to a new desktop
--- Timing-Based ---
AD035GetLocalTimeDetects debugger by measuring elapsed time of a workload
AD036GetSystemTimeDetects debugger via UTC timing analysis of a workload
AD037GetTickCountDetects debugger by comparing millisecond tick counts
AD038QueryPerformanceCounterDetects debugger using high-resolution performance counter
AD039timeGetTimeDetects debugger using multimedia timer elapsed time
--- Other Detection ---
AD009RtlQueryProcessHeapInformationDetects debugger by examining heap flags
AD010RtlQueryProcessDebugInformationChecks heap flags via RtlQueryProcessDebugInformation
AD013GetThreadContextInspects hardware breakpoint registers (Dr0-Dr7)
AD031GenerateConsoleCtrlEventDetects debugger by checking console control event handling
AD032GetShellWindowCompares parent PID against Explorer to detect abnormal exec
AD033FindWindowDetects debuggers by searching for known window class names

cat /etc/motd

> RESOURCES

> CheckPoint Anti-Debug Techniques
> Al-Khaser Anti-Malware Scanner
> Unprotect Project
> Microsoft Win32 API Documentation
> Undocumented NT Internals


YOU ARE VISITOR #000000 SINCE 1997

[ GITHUB ]  |  [ CONTACT ]

<-- BEST VIEWED IN NETSCAPE NAVIGATOR 4.0 AT 800x600 -->