detect_managed_anti_debug
Scans .NET assemblies for managed anti-debug primitives such as IsDebuggerPresent and Debugger.IsAttached, returning method locations and evidence offsets per hit.
Instructions
Scan IL method bodies for managed anti-debug primitives.
Looks for IsDebuggerPresent, Debugger.IsAttached,
Debug.Assert, Debugger.Break, and the curated
indirect-check set (timing traps, process-name blacklists,
registry probes). Returns {method_fqn, primitive,
evidence_il_offset} per hit. The category is
"managed-anti-debug"; no vendor is named.
Args: path: path to a .NET assembly max_per_method: cap per method (default 500; a single method with 500+ anti-debug calls is itself a signal — the cap is for safety, not for normality)
Returns::
{
"path": "...",
"hits": [{"method_fqn": "...", "primitive": "...",
"evidence_il_offset": N}, ...],
"by_primitive": {"IsDebuggerPresent": 4, ...}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| max_per_method | No |