malcomvetter / AntiDebug

PoC: Prevent a debugger from attaching to managed .NET processes via a watcher process code pattern.
32 stars 15 forks source link

Visual Studio 2019 with .Net Framework 3.5 can still debug #2

Open bezzad opened 4 years ago

bezzad commented 4 years ago

Hi,

I tested that in VS2019 v16.6 and it debugged without any preventing. But when the .Net version increased to v4.0 or later version then the IsDebuggerPresent method gets true and detected debugging!

See debugging which breakpoint is in WaitForDebugger() method:

image