6

I am building an app that displays very sensitive information and as such, I want to be able to either

  • Disable the ability to capture the screen
  • Redact the portion of my app that is on the screen during capture
  • Detect that a screen capture was made via an event, hook, log etc

Are any of the above even possible in Windows? if so, how?

UPDATE I have tried checking the windows event log for screen captures. I have searched for all over the web and I could not find any windows hooks that could do that. Any ideas would be highly appreciated

Context: There are two entities. An regular user (User A) who wants to use my app and a third party (User B) who has access to the machine before User A uses it. The intention of User B is steal the sensitive information using screen capture software during User A's session. So using VMs or anything that requires the current user's explicit action is not included

Ody
  • 187
  • 1
  • 1
  • 8
  • 2
    [Sharing your research helps everyone](http://meta.programmers.stackexchange.com/questions/6559/why-is-research-important). Tell us what you've tried and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Also see [ask] – gnat Nov 18 '14 at 09:44
  • 6
    No: http://upload.wikimedia.org/wikipedia/commons/1/1c/Canon_EOS_5D_Mark_II_with_50mm_1.4.jpg – Jörg W Mittag Nov 18 '14 at 09:52
  • Find out how to hook the Windows screen capture event & take it from there – Mawg says reinstate Monica Nov 18 '14 at 10:13
  • But it looks unlikely, according to this question http://stackoverflow.com/questions/774925/detect-when-users-take-screenshots-of-my-program – Mawg says reinstate Monica Nov 18 '14 at 10:14
  • 7
    There are dozens of ways to capture the screen without Windows (or even the computer it's running on) being involved. If the information is so sensitive that someone capturing it is a bad thing, don't display it. – Blrfl Nov 18 '14 at 14:11
  • Thanks alot.. Installing a VM is out of the question for my app because it would be easy to spot. – Ody Nov 18 '14 at 14:14
  • 3
    There are lots of systems where the data is sensitive but I think time would be better spent trying to head off social engineering routes e.g. getting people to lock their screens, restricting access to apps/offices etc. Whatever you do (or believe you can do) in the app, it can be circumnavigated. – Robbie Dee Nov 18 '14 at 16:02
  • 4
    I am inclined to say "no" as well given my understanding of Windows development. However, I know for a fact that some programs do this. For example, PowerDVD shows a black box when taking a screen capture while it is playing content protected by HDCP. This is true even when taking a screen shot using the API directly and not using the Print Screen key. –  Nov 18 '14 at 18:00
  • @snowman has an interesting point. Windows has a protected channel for displaying drm-protected media that involves content remaining encrypted until it reaches the monitor. Assuming you don't expect hardware to be compromised, this ought to be able to achieve what you want. Only problem is, I'm not sure how you'd go about using it. – Jules Nov 18 '14 at 18:32
  • 1
    So essentially, if there is a way I can tell windows that my Window handle contains DRM content, it will do the redaction automatically. I will have to investigate further.. Thanks – Ody Nov 19 '14 at 07:08
  • 1
    possible duplicate of [How to prevent code from leaking outside work?](http://programmers.stackexchange.com/questions/170246/how-to-prevent-code-from-leaking-outside-work) – Arseni Mourzenko May 04 '15 at 14:04
  • 4
    It is impossible! When you show the information of your screen, User B can take a digital camera or its phone and physically snap the screen. You will bypass even Protected Media Path! Then it will send this to his friends over Facebook and you are screwed. Go ahead. Do something creative. This task has NO solution. – Петър Петров Oct 10 '16 at 10:28
  • You can make it harder to (accidentally) capture information using IRM. See: https://blogs.msdn.microsoft.com/oldnewthing/20130603-00/?p=4193. – Andrew Feb 06 '17 at 18:47
  • If you ever display the information you cannot strictly prevent image/screen capture. Sure, people can use cameras. But what is far easier is to just intercept the "pixel stream" that is bound for the display/monitor. Once the pixel stream leaves your computer/OS there is nothing you can do to prevent some other hardware/software from cloning that pixel stream. – Ivan Feb 07 '17 at 14:50
  • The only way, is to validate current threads running on the PC A, then there is a thread you dont trust kill it, in fact windows does contain such policies i think since windows XP, but its rarely used for locked down systems its the most strict security policy; to only exucute allowed programs. – Peter Mar 24 '17 at 17:30
  • I'd like to know how to do this in Linux. – user15740 Apr 04 '20 at 16:36
  • Search for Spatial Psycho-Visual Modulation (SPVM). Basically, use flickering, blurring, motion, noise, and other means, so that a human is able to "perceive" the information, while rendering the information in a digitally garbled manner such that a screen-capture software will have trouble reconstructing the information that was perceived by the human unless the reconstruction tries to emulate every psychovisual aspect of the human visual system. – rwong Nov 24 '20 at 00:54

4 Answers4

6

I read a blog post on this a while ago: http://www.patrick-wied.at/blog/image-protection-on-the-web

His approach is to use interlacing images instead of single, still-standing images. You'd split up the image into several fractions, for example in the form of stripes, and display them alternating very fast. That way, if you try to cap the screen, you will only get a - possibly unreadable, depending on your algorithm - fraction of the original picture.

On windows, I'd attempt to overlay my application with several pictures with transparent stripes. Perhaps you could only overlay the text boxes, or make them alternate between visible/invisible...

To circumvent this, you'd have to painstakingly take repeated screencaps and puzzle them together, or, as noted by Jörg W Mittag, use a DSLR with a slow shutter speed.

I'm not really sure if this is actually a practical solution for your problem, but I find the approach ingenious.

zuiqo
  • 927
  • 8
  • 15
2

Perhaps you could intercept the screen capture windows message and disable screen at that time.

Here is one possible solution.

lennon310
  • 3,132
  • 6
  • 16
  • 33
Clay Nichols
  • 341
  • 1
  • 3
  • 11
0

There is a way to do this, and you should not necessarily give up based on the other answers.

I use an app that has limited "prints" of data, and to prevent users simply screen-grabbing, the screen goes dark when using screenshot apps.

I can of course use a camera, however that's really a pain and probably enough to prevent users violating the terms for IP.

If it's about data theft, such as identity theft, or account hacking, a camera photo is probably enough.

wcndave
  • 125
  • 1
  • That's really close to what I want.. How did you achieve that? – Ody Feb 06 '17 at 16:39
  • 3
    *to prevent users simply screen-grabbing, the screen goes dark when using screenshot apps* But that's exatly what the OP is asking: How do you do that? You are not answering the question. – Jan Doggen Feb 06 '17 at 21:01
  • Not sure why I am marked down. I don't know how. I am only saying that it IS possible, because an App I use does this, so don't give up. Other answers say not possible, I was clarifying that it is. Also I was noting that this does not prevent stealing screen data through say the use of a camera. – wcndave Mar 22 '17 at 16:47
  • @wcndave mind sharing the name of this app? – Geza Kerecsenyi Mar 22 '20 at 12:00
  • @GezaKerecsenyi The app I was referring to is Musicnotes, which is a windows store app. You can buy sheet music, however only print it once. But you can look at it on screen as much as you like. If I try to capture with any software, or just prntscreen, it goes dark. I can take a photo of course, but the technology does clearly exist to achieve OP question. – wcndave Mar 23 '20 at 16:47
-1

I believe your best option is to permanently disconnect that particular computer from the Internet.

That way, even if a program did capture your screen of log your keyboard, then it will not be able to send it anywhere as there's no connection.

Of course, you should also disconnect from the network as well unless it's necessary to be connected and you are sure that all the computers on the network are disconnected from the Internet at all times.

This is the safest way so far.

P.S. If you need to access the Internet, then acccess from on a computer that has no sensitive information on it.

  • 1
    This too is tricky because the application runs in a corporate network behind firewalls so they can't connect to the Internet however the system needs to be connected to the network – Ody Feb 06 '17 at 19:33