Censor sensitive information in screenshots
-
Is it possible to automatically detect when a user is about to take a screenshot of a webpage and blank out information that might be something the user doesn't want, or at least to detect a screenshot so the page can check whether any sensitive information is visible and warn the user if there is?
I'm not asking to completely block users from copying a website. I don't need this to protect the information, but rather to protect people from accidentally posting it. Regulars on this forum probably know what kinds of accidents I'm talking about.
-
@ben_lubar said in Censor sensitive information in screenshots:
Is it possible to automatically detect when a user is about to take a screenshot of a webpage
Where?
In the program that takes the screenshot? Most probably yes.
In the browser? If it is, thats a serious security flaw and should be fixed.@ben_lubar said in Censor sensitive information in screenshots:
to protect people from accidentally posting it.
So the best (only?) place to do that is in processing of uploaded images.
-
@Adynathos said in Censor sensitive information in screenshots:
@ben_lubar said in Censor sensitive information in screenshots:
to protect people from accidentally posting it.
So the best (only?) place to do that is in processing of uploaded images.
Some kind of
stenographysteganography?
-
@ben_lubar said in Censor sensitive information in screenshots:
Some kind of steganography?
Good idea, hard to go into details unless you say what the actual use-case is.
-
@Adynathos I know within the last few weeks, I've seen someone upload a screenshot of an email that had their real first name in it.
-
@Adynathos said in Censor sensitive information in screenshots:
@ben_lubar said in Censor sensitive information in screenshots:
Some kind of stenographysteganography?
Good idea, hard to go into details unless you say what the actual use-case is.
Basically, I want to prevent people from inadvertently posting screenshots of various categories on this forum that shouldn't be posted, like topic titles in the Staff forum or usernames in the Mafia Scum forum.
I'm thinking some kind of tiled pixel pattern that's invisible to human eyes but a plugin on the forum can detect and warn the user about.
-
@ben_lubar said in Censor sensitive information in screenshots:
I'm thinking some kind of tiled pixel pattern that's invisible to human eyes but a plugin on the forum can detect and warn the user about.
Clever! Sounds like you didn't need help after all.
-
@RaceProUK said in Censor sensitive information in screenshots:
@Adynathos I know within the last few weeks, I've seen someone upload a screenshot of an email that had their real first name in it.
And now the world knows his name is Dave.
You can OCR the image and check if it contains your name:
-
@Adynathos You'll have to give the forum your name for that to work, though.
-
@Adynathos said in Censor sensitive information in screenshots:
And now the world knows his name is Dave.
It wasn't actually me, but
@Adynathos said in Censor sensitive information in screenshots:
You can OCR the image and check if it contains your name
Two issues with using OCR software:
- OCR software never works: it's probably flag up 'Dave' as 'Stan' or 'Mildred' or something.
- I'm already equipped with a pair of far superior OCR devices that I've had my entire life ;)
-
Sounds like a job for Stack Overflow! http://stackoverflow.com/questions/31835095/keycode-for-print-screen-44-is-not-working
So, basically if you want to warn users about this you need a key up event on a key code that varies between oses. Afaik you can't view or modify the captured content (such a thing would mean having access to one's clipboard in JavaScript which would be all kinds of bad), so having a warning that reminds people about redacting stuff before posting it is your best bet.
Then you got mobile which is a whole other ball Of wax.
As in a recent front page article (submitted by yours truly) there's really no foolproof way though. Screenshot programs, and simply hitting print screen while the page is visible but not in an active window would likely fail to work as you want.
-
@RaceProUK said in Censor sensitive information in screenshots:
I'm already equipped with a pair of far superior OCR devices that I've had my entire life
Did it hurt?
-
@xaade said in Censor sensitive information in screenshots:
@RaceProUK said in Censor sensitive information in screenshots:
I'm already equipped with a pair of far superior OCR devices that I've had my entire life
Did it hurt?
No: I was born with them.
-
@ben_lubar said in Censor sensitive information in screenshots:
Is it possible to automatically detect when a user is about to take a screenshot of a webpage and blank out information that might be something the user doesn't want, or at least to detect a screenshot so the page can check whether any sensitive information is visible and warn the user if there is?
I'm not asking to completely block users from copying a website. I don't need this to protect the information, but rather to protect people from accidentally posting it. Regulars on this forum probably know what kinds of accidents I'm talking about.
No.
-
@RaceProUK Your poor mother...
-
@The_Quiet_One ok, capturing the
keyup
event of the Print Screen key is possible, but you can't modify the page before the screenshot is captured based on that event (I tried; it doesn't work).You could perhaps use some type of warning, but that puts the responsibility back on the users.
-
@anotherusername said in Censor sensitive information in screenshots:
@The_Quiet_One ok, capturing the
keyup
event of the Print Screen key is possible, but you can't modify the page before the screenshot is captured based on that event (I tried; it doesn't work).You could perhaps use some type of warning, but that puts the responsibility back on the users.
The steganography idea is probably going to work, but I need to figure out a way of finding the category a notification is for without doing a bunch of extra requests every time someone opens their notifications.
-
@anotherusername said in Censor sensitive information in screenshots:
You could perhaps use some type of warning, but that puts the responsibility back on the users.
That's where it should be - the idea is prevent the user from making easy-to-make mistakes.
-
@ben_lubar said in Censor sensitive information in screenshots:
Basically, I want to prevent people from inadvertently posting screenshots of various categories on this forum that shouldn't be posted, like topic titles in the Staff forum or usernames in the Mafia Scum forum.
I'm thinking some kind of tiled pixel pattern that's invisible to human eyes but a plugin on the forum can detect and warn the user about.
That... actually might be possible. But, different themes (and backgrounds) would probably play havoc with it. So would JPEG compression probably (although none of us would use JPEG for screenshots, right?). GIF almost definitely would.
-
@anotherusername said in Censor sensitive information in screenshots:
@ben_lubar said in Censor sensitive information in screenshots:
Basically, I want to prevent people from inadvertently posting screenshots of various categories on this forum that shouldn't be posted, like topic titles in the Staff forum or usernames in the Mafia Scum forum.
I'm thinking some kind of tiled pixel pattern that's invisible to human eyes but a plugin on the forum can detect and warn the user about.
That... actually might be possible. But, different themes (and backgrounds) would probably play havoc with it. So would JPEG compression probably (although none of us would use JPEG for screenshots, right?). GIF almost definitely would.
Most people just paste directly into their browser, and that's lossless. I'm thinking I'll make the steganography client-side so it renders the tiled background based on the actual computed color of the notifications list and forum list and so on.
Does anyone know of any skins where the background behind sensitive text is more than one color, or where the notifications background isn't the color set by
.dropdown-menu
?I might be able to make this work on image-background categories, but for now I'm focused on notifications and topic listings.
-
@anotherusername said in Censor sensitive information in screenshots:
@The_Quiet_One ok, capturing the
keyup
event of the Print Screen key is possible, but you can't modify the page before the screenshot is captured based on that event (I tried; it doesn't work).Umm, yeah. That's what I was inferring by the keyup event, and why I was talking about warning the user instead
-
@The_Quiet_One said in Censor sensitive information in screenshots:
@anotherusername said in Censor sensitive information in screenshots:
@The_Quiet_One ok, capturing the
keyup
event of the Print Screen key is possible, but you can't modify the page before the screenshot is captured based on that event (I tried; it doesn't work).Umm, yeah. That's what I was inferring by the keyup event, and why I was talking about warning the user instead
Even then it'd only work if the page had focus when they took the screenshot.
-
@ben_lubar A convolutional neural network could be trained to detect emails on screenshots with virtual perfection.
You can generate the training data in this case, it's much easier than detection of objects in photos, for example. And screenshots will have a limited set of fonts and no skew.
-
@ben_lubar as a test, I created a simple checkerboard image at 1/256 opacity, uploaded it, and changed the lounge background to add it:
[data-category-id="16"] body { background: url(/uploads/files/1458603503953-trans_15_qantas-first-class-lounge-sydney.png) center / cover fixed, url(https://what.thedailywtf.com/assets/uploads/files/1493252180674-upload-16878c0e-11de-4800-909c-41aa26d29cb6.png); }
The results looked like this:
...looks indistinguishable, right?
I duplicated the layer in GIMP, used the Posterize filter to reduce the top layer to 128 levels (effectively throwing away the least significant bit of color in each channel), and set the layer mode to Difference. Then I added a new layer on top, filled with solid
#010101
, with the mode set to Divide. The result looks like this:On the client side, I imagine the simplest would probably be to take the
value & 1
of each channel -- basically the reverse of the Posterize function -- to reduce each pixel to either a 1 or 0; if the checkerboard pattern is superimposed it should be evident.
-
-
@anotherusername said in Censor sensitive information in screenshots:
Even then it'd only work if the page had focus when they took the screenshot.
Yep. I covered that in my post as well. If you mention that there are Screenshot programs that can circumvent the button plus mobile devices you'll go 3 for 3.
-
@The_Quiet_One said in Censor sensitive information in screenshots:
@anotherusername said in Censor sensitive information in screenshots:
Even then it'd only work if the page had focus when they took the screenshot.
Yep. I covered that in my post as well. If you mention that there are Screenshot programs that can circumvent the button plus mobile devices you'll go 3 for 3.
My Chromebook doesn't even have a printscreen key.
-
@ben_lubar yes but it will be expensive.
-
@lucas1 said in Censor sensitive information in screenshots:
@ben_lubar yes but it will be expensive.
Are you proposing I hire someone to stand behind each forum user and warn them if they screenshot sensitive information?
-
@ben_lubar I don't think so.
It'd make more sense on the screenshot app's side. Do OCR of the screenshot, recognize what looks like emails, names, bank numbers etc. and offer one-click areas where you can censor them.
-
@cartman82 said in Censor sensitive information in screenshots:
@ben_lubar I don't think so.
It'd make more sense on the screenshot app's side. Do OCR of the screenshot, recognize what looks like emails, names, bank numbers etc. and offer one-click areas where you can censor them.
How would a screenshot app determine that Mafia faction threads are bad to post usernames from but Trolleybus Garage is ok?
-
@ben_lubar said in Censor sensitive information in screenshots:
I'm thinking some kind of tiled pixel pattern that's invisible to human eyes but a plugin on the forum can detect and warn the user about.
That will cover a very narrow use case. Won't help me with my screenshots of other peoples' computers.
-
@ben_lubar said in Censor sensitive information in screenshots:
How would a screenshot app determine that Mafia faction threads are bad to post usernames from but Trolleybus Garage is ok?
I don't know. Is that a big issue in Mafia land?
I guess the screenshot app would detect what looks like usernames and offer to blank them. It's up to the user whether they do it or not.
-
@cartman82 said in Censor sensitive information in screenshots:
I don't know. Is that a big issue in Mafia land?
It is, because if you post someone's username (or alternatively, post a notification, screenshot of a notification, etc) of someone's username, you publish the fact that they're on Team Mafia (or whatever team they're on). That's a bad thing since it basically ruins the game. I'm assuming this happened here, somehow? Ben's looking for a way to fix that issue...
-
@sloosecannon said in Censor sensitive information in screenshots:
It is, because if you post someone's username (or alternatively, post a notification, screenshot of a notification, etc) of someone's username, you publish the fact that they're on Team Mafia (or whatever team they're on). That's a bad thing since it basically ruins the game. I'm assuming this happened here, somehow? Ben's looking for a way to fix that issue...
Okay, then this is a much more narrow focused than I thought.
-
@cartman82 said in Censor sensitive information in screenshots:
@sloosecannon said in Censor sensitive information in screenshots:
It is, because if you post someone's username (or alternatively, post a notification, screenshot of a notification, etc) of someone's username, you publish the fact that they're on Team Mafia (or whatever team they're on). That's a bad thing since it basically ruins the game. I'm assuming this happened here, somehow? Ben's looking for a way to fix that issue...
Okay, then this is a much more narrow focused than I thought.
Yeah. It also extends to other stuff - mostly someone accidentally posting a screenshot of the Lounge or other stuff, since that actually has doxxy stuff that could ruin more than just an online text-based RPG...
-
Step 1 - contact those guys at Princeton and Stanford:
@dcon said in In other news today...:
Step 2 - add ads behind places with sensitive information.
-
If it's mainly about preventing accidents in the topic list, it may be sufficient to generate a notification "Warning: The screenshot you just took contains privileged information from the {...} category"
-
@RaceProUK said in Censor sensitive information in screenshots:
I'm already equipped with a pair of far superior OCR devices that I've had my entire life
I dunno. Obviously the hardware modules came with the unit, but I understand the drivers take a few months to fully update, and the actual OCR software rarely gets installed before age three or four.
-
@ben_lubar said in Censor sensitive information in screenshots:
How would a screenshot app determine that Mafia faction threads are bad to post usernames from but Trolleybus Garage is ok?
Easier workaround:
In mafia threads, instead of displaying people real usernames, replace them with goon1, goon2, goon3. Or something with a similar effect.
Send the codenames to the rolecards of anyone who is supposed to know their identities.
-
@ben_lubar did you use the stenography thing?
-
@cartman82 hire a cheap human to do the job?
-
@ben_lubar said in Censor sensitive information in screenshots:
Is it possible to automatically detect when a user is about to take a screenshot of a webpage and blank out information that might be something the user doesn't want, or at least to detect a screenshot so the page can check whether any sensitive information is visible and warn the user if there is?
I'm not asking to completely block users from copying a website. I don't need this to protect the information, but rather to protect people from accidentally posting it. Regulars on this forum probably know what kinds of accidents I'm talking about.
capturing the printscreen keyup is difficult as it varies cross platform but is doable, detecting the use of screen grabbing software like windows 10 snipping tool or others is impossible from withing a simple website, ditto for screen grab videos
you could try to do it on the upload side but that's never going to be guaranteed and even if you get the OCR working reliably or something would only be able to check against data that the software already knows about so would still only be able to work unreliably.
it's an neat idea but i just don't see it working out acceptably.
-
It's possible (at least on Windows) to react to the print screen key, and it's also possible to detect when the window has lost focus, which would protect against the snipping tool.
This still leaves things like starting a recording and then browsing the site, but if it's only to protect against accidental exposure rather than malicious attempts it shouldn't matter.
-
@coldandtired said in Censor sensitive information in screenshots:
it's also possible to detect when the window has lost focus, which would protect against the snipping tool.
No it won't:
-
@RaceProUK I even used it a few minutes' ago and all I noticed was that the Creators' Update added something
Still, if we're talking mods and admins I think they're unlikely to do that.
-
@ben_lubar said in Censor sensitive information in screenshots:
@lucas1 said in Censor sensitive information in screenshots:
@ben_lubar yes but it will be expensive.
Are you proposing I hire someone to stand behind each forum user and warn them if they screenshot sensitive information?
Don't give paranoid employers any ideas.
-
If you are worried about Mafia, could you obscure anything that you don't want unintentionally exposed and then reveal it on mouseover?
-
@Polygeekery That's a way better idea than trying to capture print screen or scanning every uploaded image for a tile pattern.
-
@ben_lubar said in Censor sensitive information in screenshots:
Neat, but how does it work? How can it tell?