How to intercept each trying to use API function in C#?

后端 未结 3 1136
你的背包
你的背包 2021-01-01 06:18

i need to block any screen capture software on the computer from taking screen shots. Since all of them are work on standard API-functions, i think i could monitor and block

3条回答
  •  -上瘾入骨i
    2021-01-01 06:34

    As Scott just posted it likely can be prevented with API hooks to see that paint events only go to desktop bound handles and not others, and refuse to paint otherwise. However, you need to consider the following scenarios and see if they're relevant threat to your approach or not:

    Your software may be running in a virtual machine like VMWare. Such software has capapbilities to capture screen that does so at "virtual hardware" level, and your API hooks will not be able to discern it - and this would be the easiest way approach if I wanted to bypass your protections.

    As a post suggests here, nothing also prevents someone to take monitor cable and plug it into another computer's capture card, and take screenshot that way. Again, your hooks will be helpless here.

    Bottom line, you can make it somewhat harder to do, but bypassing such protection may be pretty trivial thing to do.

    • My 2c.

提交回复
热议问题