Skip to content

Add .NET Environment.TickCount timing anti-debug rule#1137

Open
aryanyk wants to merge 2 commits intomandiant:masterfrom
aryanyk:rule-dotnet-tickcount-antidebug
Open

Add .NET Environment.TickCount timing anti-debug rule#1137
aryanyk wants to merge 2 commits intomandiant:masterfrom
aryanyk:rule-dotnet-tickcount-antidebug

Conversation

@aryanyk
Copy link

@aryanyk aryanyk commented Mar 12, 2026

This PR adds a rule to detect timing-based anti-debug checks in .NET binaries that rely on repeated reads of Environment.TickCount around Thread.Sleep.

Issue #596

The technique appears in the .NET-Anti-Debug project. A minimal sample implementing the behavior was compiled, features were inspected using scripts/show-features.py, and the rule was verified to trigger correctly with capa.

Example detection:

  • md5: e842958188274d5ffee7fbeffb803b2e
  • function: 0x6000001

Additional rules for other techniques in the same project (e.g., WMI-based VM detection and process enumeration) will be submitted in follow-up PRs after validating samples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant