13 ms·
Unredacter: Never use pixelation as a redaction technique
- fortran77 4y agoI always photoshop different text there and then pixelate it. So if someone takes the time to go do an attack like this they get a rude surprise.
- imiric 4y agoI just place white or black rectangles over the text (make selection > Delete). If it's secure enough for intelligence agencies, it's secure enough for me.
- Gigachad 4y agoThis works if done right but it's surprisingly easy to mess up. A lot of people have fallen in to the trap where the tool they use didn't put a perfectly black rectangle in and the text can be extracted out. And on PDFs you can very easily end up just adding a layer over the top which can be removed later.
- taneq 4y agoThe trick is to use dumber tools. Don't do it in Illustrator or whatever. Take a screenshot and mangle it in MS Paint.
- epgui 4y agoI think the animation makes it pretty clear how this works… But I do wonder how the baseline coordinates are established? In more realistic applications you’d have to deal with things like text that is not exactly aligned with pixel boundaries, and different anti-aliasing methods.
- kleiba 4y agoAnd different fonts.
- kamray23 4y agoWith such heavy pixellation being overcome, you'd have to have a seriously different font to avoid the general patterns arising from basic letter shapes. I think simply guessing "times" vs "helvetica" brings you close enough to guess the letters. Optimize score by shuffling the baselines around a bit and go through all the letters to find the right ones and you should be good. Work in blocks of 3-5 letters while shuffling them around and stretching the spacing, you might even have a fairly good guess.
- deleted 4y ago[deleted]
- _aavaa_ 4y agoI think the answer is the in most applications you’d have a much larger screenshot from which you can glean this information. E.g. a page to do fold recognition on, or even to figure out what software (e.g. Gmail) and to look up what font the software uses.
- gareth_untether 4y agoThere’s a lot of pixelated photos and documents on the net just waiting to be viewed with a fresh light.
- CyborgCabbage 4y agoPhotos won't work with this, it works here because text is discrete and provides a limited search space.
- teeray 4y ago“Attacks always get better, they never get worse“ —Bruce Schneier
- bawolff 4y agoYes, but that doesn't mean this particular attack is relavant to the problem space.
- zmgsabst 4y agoWhat makes it possible to search over font characters but not, eg, convolution tiles? Photo identification is done with a limited search space of “tiles” that the image is decomposed into, for convolutional NNs.
- weego 4y agoThe obvious problem is the relative scale of the pixelation to the underlying redacted material. The demo works because the scale encodes enough data of each character and its relationship to its neighbours. My guess would be even a 25% larger pixelation block would scrub too much for it to be at all reliable.
- kzrdude 4y agoThen you move to guessing by syllables or whole words. Probably an order of magnitude or larger brute force job that way, but it should be possible. Especially if you target common words in the sentence first.
- radarsat1 4y agoYou can just randomize the string and pixelize that, it should look roughly the same aesthetically without leaking any information.
- jahnu 4y agoOr write something funny/rude/misleading
- teaearlgraycold 4y agohunter2
- Murfalo 4y agoWhat is funny or rude about *******? Is this supposed to be some 7-letter curse word or something? I don't get it.
- icepat 4y agoHN automatically hides your password when you input it into the comments, like mine is ******, to me it shows up as ******, but to you you see ******.
- sircastor 4y agoDoes it do this predictively or intuitively somehow? How does it know your password? Is it keeping it as clear text on the client side?
- brokensegue 4y agoit hashes all the substrings you type to check for collisions.e.g. *****
- thedorkknight 4y ago
- poglet 4y agoI wonder if this could be used to reveal text that is too small or out of focus. Also the example seems to go through one letter at a time, once the pixels become larger it might be required to cycle through entire words.
- lucgommans 4y ago> once the pixels become larger it might be required to cycle through entire words. That's a clever idea for speeding up this process actually. Instead of guessing a-z for every position, only guess valid word completions. If it doesn't end up giving a good score or the human judges it to be nonsensical, it can fall back to a-z guessing for that word. A bit similar to my hangman solver (https://lucgommans.nl/p/hangman-solver/ https://lucgommans.nl/p/hangman-solver/), which looks for the only words still possible with the given letters already known, but simpler because you only need prefix matching. I know you meant it for very strong blurs, and there it is not actually an advantage because you need to go through thousands of words before guessing one (instead of 26×5≃130 guesses, assuming an average word length of ~5), but yeah there you'd have no other choice.
- crazygringo 4y agoFirst of all, very cool little tool. I always suspected you could do this but it's really neat to watch it go. But now just in response to the title... does anybody ever use pixelation as a redaction technique? I feel like I've only ever seen pixelation for censoring nudity or a brand name or face or something. Actual redaction of text truly meant to be kept secret, I've only ever seen as black bars. Are there notable cases where people have genuinely tried to redact something secret using pixelation?
- czx4f4bd 4y agoBear in mind that "redaction" just means any effort to protect sensitive information by obscuring text. I don't think I've seen pixelation used to redact text in any corporate/governmental context, but I've definitely seen people use it on sites like Reddit or Twitter to try to hide their name or other info. I've also seen people try to redact sensitive information by poorly scribbling it out using the pencil tool on their phone, leaving enough parts of letters visible to guess what was originally there, or try to "black out" text using a brush that wasn't fully opaque, allowing it to be revealed by adjusting the contrast. Basically, a lot of people don't know how to safely redact stuff. I don't think pixelation is commonly used because most people probably don't know how to use it, but my Samsung phone's built-in image editor also has a pixelation feature, so I honestly expect to see it pop up more often in the future.
- zmgsabst 4y agoThis is somewhere the simplicity of old MS paint and BMPs was great: A colored square is easy — and destructively removes what was there, by setting that part of the image to a chosen color.
- throwaway821909 4y agoI've seen once or twice people admitting to doing this deliberately to get around brigading/doxxing rules when they actually do want to share the username or whatever - not sure if it's allowed because "they tried" or because it's difficult enough to read that still stops most of the brigading (in many cases you can probably just search for the content to get the username anyway, if you care enough)
- danbruc 4y agoThis also seems like something a [convolutional] neural net should be able to learn pretty well and generating training data could be fully automated. Throw everything at it - different fonts, different sizes, bold, italic, different colors, different anti-aliasing methods, sub pixel offsets, pixelation sizes and offsets, JPEG noise, rotations, ... - and maybe also give it some language model to better reason about plausible letter combinations. I would love to see, how good this could be.
- buildbot 4y agoAlready been done! https://github.com/HypoX64/DeepMosaics https://github.com/HypoX64/DeepMosaics
- foota 4y agoImage models are pretty bad at text, generally, so I question how well it would work on text.
- buildbot 4y agoGreat point!
- mft_ 4y agoIt’s not, though. It seems to be a very shallow understanding of the subject (or just insufficient consideration?) stated confidently (as so often happens these days). As a sibling comment to yours also points out, there are plenty of examples to the contrary - models taught to recognise text from indistinct images. We’ve all been contributing to this for years via Captchas, and now we’ve got to the stage where our iPhones apply the concept locally to text found in our photo libraries.
- buildbot 4y agoIt was my understanding that anything trying to recover text is still hard to do well, but I could be wrong - I have not worked with image models in awhile. Classification and OCR is truly well solved though.
- dang 4y agoRelated: Don't use text pixelation to redact sensitive information - https://news.ycombinator.com/item?id=30350626 https://news.ycombinator.com/item?id=30350626 - Feb 2022 (163 comments)
- thomasqbrady 4y agoLooking closely, this only works if you know the font name, size, and weight used, or at least can guess it, manually, before feeding the pixelated version into the tool? Still quite fun, but not as scary as the headline made it sound...
- mmoskal 4y agoOften only parts of text are pixelated.
- if_by_whisky 4y agoGuessing is actually easy. For the kinds of files that end up as redacted pdfs (legal, government, etc), there's probably 5-8 font options that make up 98% of documents. Sizes and weights are immediately recognizable to the slightly trained eye. I'm pretty sure I could guess all 3 attributes at a glance.
- happyopossum 4y agoOr just look at the unredacted text around it and use that. Nobody is changing fonts on text before pixelation.
- taneq 4y agoIt's also a proof of concept. Slap a couple more for() loops in there to iterate through different font options and try a range of alignments and you could have it fully automatic.
- kevingadd 4y agoThere are lots of existing tools that can guess a font accurately if you feed them an image of enough text, so that's not a big obstacle.
- lelandfe 4y agoOr just use the rest of the document to build the corpus?
- JJMcJ 4y agoSpeaking of pixelation. If you're nearsighted taking your glasses off can blur the pixelation of a face so that you can get a pretty good idea of the person's appearance, especially if you are just trying to guess if it's really a specific person you are already familiar with.
- sircastor 4y agoI worry this often leads to a sort of observation bias, where people assign their expectation to the situation. If a video is blurry, it’s not hard to convince an audience that the face in the video is a particular person. Human brains are really great at filling in details, whether they’re accurate or not.
- ductsurprise 4y agoNo doubt... Now, pair that with a Prosopagnosia disorder... Right back where you started?
- matsemann 4y agoWe have this advent calendar at work where one person on the team posts a pixelated scene from a christmas movie and we guess which one it is. Very hard, but when they later post the non-pixelated version it looks so obvious. Then if I look at the pixelated version again I can now "clearly" see what it is.
- cylon13 4y agoMight be fun to use diffusion to make adversarial/false answers to the pixelated scenes, depending on how pixelated they are. If they're quite pixelated you could probably come up with some crazy alternatives.
- stubish 4y agoThat sort of observation bias exists anyway. It is how movies can replace actors with stunt performers in a wig.
- bscphil 4y agoYou could probably do the same for Guassian blur too, right? At least if you could get a reasonable guess for the parameters of the blur. Any case of obfuscation where plaintext and ciphertext characters have a 1:1 relationship should be trivial to undo. If you need redaction, black it out completely.
- jaclaz 4y agoThere are tools that can "correct" both Gaussian and motion blur, as an example a car plate from low resolution video stills, example (commercial): http://smartdeblur.net/ http://smartdeblur.net/ before the above the author made a version which was free (but old link is now dead): https://github.com/Y-Vladimir/SmartDeblur/downloads https://github.com/Y-Vladimir/SmartDeblur/downloads LEO's have access to a Commercial tool called Amped Five that is said to be very good at it: https://ampedsoftware.com/five https://ampedsoftware.com/five
- morpheuskafka 4y agoIs there any approach to guessing a single redacted word/phrase where the length of the word is revealed? (Such as in a PDF where the rectangle is automatically drawn around the characters.) I've wanted to build something that would if nothing else run through a list of guesses (assuming the font is the same as surrounding text) and see if any of them could match size-wise, but not sure of an easy way to deal with the PDF part of it.
- lucb1e 4y ago> not sure of an easy way to deal with the PDF part of it. If you aren't doing this so often that you need automation, you could sidestep that issue by just taking screenshots at 400% zoom or so and accurately measure how many pixels each letter (a-z) takes, as well as how many pixels a space is (the censored part might be into the spacing on each side of the word), and measure how many pixels the gap is between the words surrounding the censored part, then for word in wordlist do # Start by accounting for the spaces wordsize = charwidths[' '] * 2 for char in word do wordsize += charwidths[char] done if wordsize == gap_size then print("Possible word: " + word) endif done Probably want to do the gap_size +/- 1 or so, but that's how I'd approach this for a given document. A starting point for a wordlist on many linux systems could be `/usr/share/dict/words`.
- sly010 4y agoIs it just me or this should have been called "enhance"?
- pvorb 4y agoI don't get it, so it might be just you.
- nodja 4y agohttps://www.youtube.com/watch?v=hHwjceFcF2Q https://www.youtube.com/watch?v=hHwjceFcF2Q
- pvorb 4y agoOk, telling from the downvotes, everyone knows this scene from Blade Runner. So it's just me then, I guess.
- danuker 4y agoIt's a common trope in a lot of movies/series, as the other comments illustrated.
- roywiggins 4y agoIn that case, I have a tremendous supercut for you: https://www.youtube.com/watch?v=LhF_56SxrGk https://www.youtube.com/watch?v=LhF_56SxrGk
- Anarch157a 4y agoNothing beats this one: https://www.youtube.com/watch?v=6i3NWKbBaaU https://www.youtube.com/watch?v=6i3NWKbBaaU
- danuker 4y agoAmazing!
- TedDoesntTalk 4y agoCan the same be done to blurred text?
- d--b 4y agoI use pixelation, but replace the text with dirty words before pixelating. Just in case someone uses one of these tools.
- akiselev 4y agoI have a script to replace them with bits of H.P. Lovecraft so that anyone who unredacts the document can peer into the depths of madness.
- psd1 4y agoThey can do that with View Source
- Hamuko 4y agoSame. And since it's pixelated, you don't even need to match the font. Just pick the same color, make it roughly the correct size and pixelate. They'll be none the wiser.
- patcon 4y agobut if it's not using the same font, doesn't that make it almost impossible their tool will ever guess it? which provokes ye olde zen koan: if a joke is made in a pixelated font whose typeface will never be known, is it still funny? :)
- codetrotter 4y ago> if a joke is made in a pixelated font whose typeface will never be known, is it still funny? idk, is it? :^) https://imgur.com/1OvGeAF https://imgur.com/1OvGeAF
- Hamuko 4y agoThe primary goal is to redact. Someone wasting their time to discover that they're a fat knobhead is just a bonus.
- quickthrower2 4y agoLet’s say you redact with a pure black rectangle, on a JPEG. Is there enough information in the remaining compressed image to leak some information about what was redacted? I ask because what was there would have affected the original compression algorithm. So there might be some signal left.
- MintPaw 4y agoNo? If it were to be visible it would be because your editing software failed to blend the layers together properly during compositing and rasterization. JPEG encoding comes after this.
- cultureulterior 4y agoI think they mean the original compression of the original text file (if in jpeg) would have crafted specific DCT coefficients that reach across to the secret text. When that is later decoded to pixels and re-encoded, new DCTs are burned into the image, but only on top of the previous.
- thrdbndndn 4y agoThat's not how it works. it is "on top" of the previous, sure, but the same way as if I add 8 to 2 and give you 10, you can't possibly get the original number is 2.
- cultureulterior 4y agoYes, but you know what the bare DCTs of the square box should be, so if they differ from that, it must be from the original image
- laudecum 4y agoThis is it. Let’s say you’re covering a red pixel with a black pixel. There’s no way that red pixel will in any way “survive JPEG compression” because the compression happens on the raw pixel data; the raw pixel data no longer has a red pixel.
- c3534l 4y agoI've always thought something could be done with faces when you blur them out in video. The fact that the grid moves and the colors change make me intuitively feel as if I could guess their face. I bet the 3 letter agencies already have something like that.
- industriousthou 4y agoI read a blog post a while back about Japanese Adult Video enthusiasts doing some pretty ground breaking work on this.
- Xaiph_Rahci 4y agoIt is not the same. There are AI algorithms that 'enhance' blurred faces, however, the output 'looks' like real human face, but in all likelihood, different from the ground truth (i.e. the real face that got blurred). Therefore caution must be exercised in advocating such algorithms (e.g. in court of law) Whereas this algorithm is 'just' enumerating the text, generating blur and finding the closest match to the original blur.
- c3534l 4y agoSure, but you could create physical models, rotate those physical models on top of the video, and see if certain faces are a better match. Obviously it helps if there's more pixels and it doesn't need to be proof in a court of law to be useful in some way, or at the very least an interesting experiment. Maybe another algorithm could do the trick. It does seem like a lot of information about a face is leaked when you have multiple samples, a moving grid sampling different parts of the face, etc. I mean, just by watching certain pixels get extra dark when they pass over parts of the face you can figure out approximately where the eyes are. That's probably enough to narrow down a large pool of suspects to a small one.
- kqr 4y agoI don't have a link at hand but yes, I believe I've seen this done fairly well somewhat recently. Modeling the actual faces might give false positives as someone else said, but depending on how strongly the blurring/pixelation is performed, what the movement of the camera is, and how many frames you have access to, there's a lot of information in those blotches and you can reconstruct arbitrary images from underneath.
- mmwelt 4y agoHm. Pixelation may still work well with other languages, such as Chinese, though.
- kgeist 4y agoFrom the blog post: >One of the first things you might notice is that it has a curious bit of coloring in it. What gives? >I’m actually not 100% sure why this happens It's subpixel rendering which exploits the way pixels are laid out physically on a monitor (1 logical pixel is actually three physical subpixels: red, green, blue). It produces crisper texts. https://en.m.wikipedia.org/wiki/Subpixel_rendering https://en.m.wikipedia.org/wiki/Subpixel_rendering
- ChrisMarshallNY 4y agoI remember when they arrested Mr. Swirl[0]. He thought he was protected by the alterations, but they were able to deconstruct it. [0] https://en.wikipedia.org/wiki/Christopher_Paul_Neil https://en.wikipedia.org/wiki/Christopher_Paul_Neil
- Proven 4y ago
- usrbinbash 4y agoGot it. So from now on, I will overlay to-be-redacted text with a pixelated version of some different text. Labour intensive? Maybe. But just imagine the face of someone getting Rickrolled in this fashion.