开发者

A service that would track and catch whenever someone is trying to take a screenshot

开发者 https://www.devze.com 2023-04-13 07:22 出处:网络
Is it possible to write a service program that would catch an event of someone trying to take a screen capture? Not that of pressing a printscreen button or any other key combination, though, but of t

Is it possible to write a service program that would catch an event of someone trying to take a screen capture? Not that of pressing a printscreen button or any other key combination, though, but of the event itse开发者_JAVA百科lf, even if it is done by some external tool?


You can't realistically, because anyone could write a simple application that can take a screenshot.

The command being, GetDC(NULL) (msdn GetDC).

Hooking this function also wouldn't work since apps can make use of this for legitimate reasons so you'd have to try and filter out false positives.

Also, you've only prevented one class of problem, what if the user emails the file to someone? What if the user copies the text rather than uses a screen shot? What if the user takes a photo using their mobile phone?

If you have sensitive information that must be protected the only real option is to educate users and/or restrict their access. E.g. machines with sensitive information are not connected to a public network, USB drives are disabled and user's are not allowed to bring anything with a camera or data storage near the machines.

If it's just to avoid silly mistakes, then you could hook the keyboard and look for the print screen key. This however will not detect applications (such as Snipping Tool).


This could be done via a clentscript and using AJAX to send a message back to your servers, however you cannot guarantee the user wont have javascript turned off, or the user gets around this by running through a proxy or vm environment.

In short you could do this but there is no way to 100% guarantee its effectiveness.

0

精彩评论

暂无评论...
验证码 换一张
取 消