Imagine malware that could react differently when a debugger is attached.
Imagine malware that could react differently when a debugger is attached.
that has been the case for a long time: simply timing some instructions is generally enough to tell you that you're running under a debugger. It's also helpful for copy protection.
Here's [1] the tip of the iceberg on this issue.
[1] antukh.com/blog/2015/01/19/malware-techniques-cheat-sheet/
Edit - Other commenters beet me to this point :-P
There are bugs that won't reproduce when you debug via JTAG; so what.
Simply pausing on a breakpoint can make a bug irreproducible.
Programs can infer that they are being debugged via timings, and various side channels.
I think you’re missing the point as to why programs would do this. Usually it’s to protect some sort of DRM scheme through obscurity.