Slashdot Log In
Recovering Blurred Text Using Photoshop and JavaScript
Posted by
timothy
on Wed Oct 08, 2008 06:31 PM
from the careful-how-you-hide-stuff dept.
from the careful-how-you-hide-stuff dept.
An anonymous reader writes "There's been a lot of talk about recovering blurred or pixelated text, but here's an actual implementation using nothing but Photoshop and a little JavaScript. Includes a Hollywood-esque video showing the uncovered letters slowly appearing."
Related Stories
[+]
Blurring Images Not So Secure 166 comments
An anonymous reader writes "Dheera Venkatraman explains in a webpage how an attacker might be able to extract personal information such as check or credit card numbers, from images blurred with a mosaic effect, potentially exposing the data behind hundreds of images of blurred checks found online, and provides a ficticious example.
While much needs to be developed to apply such an algorithm to real photographic images, he offers a simple, yet obvious solution: cover up the sensitive information, don't blur it."
Firehose:Recovering Censored Text Using Photoshop by Anonymous Coward
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
Interesting (Score:5, Funny)
From TFA:
Hey Timothy, are you trying to get the mac fans riled up?
I'd try this myself, but I stopped pirating PS at version 6. Be interesting to see what other Slashdotters make of this.
Re:Interesting (Score:5, Funny)
Parent
Re:Interesting (Score:5, Funny)
Parent
Oblig (Score:5, Funny)
Bwahahahaha.
Re:Oblig (Score:5, Funny)
I'm off to ebay to try it on all those XP serial numbers.
Parent
Just ovveride? (Score:5, Insightful)
drawing a big black rectangle is 10x faster and there is no way you can de-obfuscate that
Re:Just ovveride? (Score:5, Interesting)
Parent
Re:Just ovveride? (Score:5, Interesting)
Why not make a "secure" mosaic filter that does one or more of the following:
- Randomizes the pixel data before applying the mosaic (Keeping the original colors so the mosaic looks natural.)
- Applies noise to the area before applying the mosaic (Could use intensity noise rather than hue to retain the color scheme that is being obfuscated.)
- Requires the user to drag the smudge tool across the area by a pre-determined amount to randomize the data before the mosaic.
- Apply noise to the mosaic pixels, (1:1 with the mosaic size) after it has been applied.
These would all retain the look of the mosaic but would defeat the reverse engineering tactics displayed here.
Heck, forget the plugin, these would be pretty simple to automate these within Photoshop.
Parent
Re:Just ovveride? (Score:5, Funny)
Heck, forget the plugin, these would be pretty simple to automate these within Photoshop.
This is gimp country. On a quiet night, you can hear adobe squeal like a pig.
Parent
Re:Just ovveride? (Score:5, Insightful)
Parent
Re:Just ovveride? (Score:5, Funny)
Parent
Re:Just ovveride? (Score:5, Insightful)
Absolutely agree.
Plus TFA says the original image was blurred using the Photoshop "mosaic" filter. So this approach, while interesting for text blurred using that exact filter, is probably useless in most real-world approaches, such as trying to recover text obliterated with the rubber-stamp tool, or like you suggest, a black box.
Parent
Re:Just ovveride? (Score:5, Informative)
drawing a big black rectangle is 10x faster and there is no way you can de-obfuscate that
Just make sure you're not saving in a file format that has a preview, where the preview doesn't have the obfuscation updated. :)
Parent
Yes, you can de-obfuscate black rectangles. (Score:5, Interesting)
drawing a big black rectangle is 10x faster and there is no way you can de-obfuscate that
That's not entirely true. There was an article a couple years back about a technique for recovering redacted text with pretty high reliability.
It used the fact that most standard fonts have variable spacing, and that once you've determined the font you can model that only certain combinations of letters will actually fit in the space of the redacted word or words. Combined with a dictionary and bayesian matching based on nearby words, you can often figure out what words would have fit into a redacted rectangle. Or at least limit it to a fairly small pool of possibilities.
They demonstrated it on a redacted government document, and pulled out some places where the redacted words had to be "Iran" and "Ahmedinejad" etc., because nothing else both fit and made sense. If it's a monospaced font, you know the exact number of letters of the redacted text.
I can't find the original link, but here's a paper [lehigh.edu] that describes some of the techniques available for "cracking" blackout redaction. (some apply only to magic-marker-type redaction, but others apply even to electronic black-rectangle redaction).
Parent
General case != this (Score:5, Insightful)
Is it not the case that the reason this works is because you're running the -same blur algorithm- with the -same input- (the unblurred letters/pixels) and simply iterating through the letters and looking for equivalent output?
Presumably, the blur algorithm output could resolve such that multiple unblurred letters resolve to the same blurred pixels, but even if it is not this trivial to map the input state to output state, it still wouldn't seem to me to approach solving the general case of letters "blurred" by any arbitrary means, which is the real-world capability implied by the article.
What am I missing here?
Re:General case != this (Score:5, Informative)
You're not missing anything.
This guy tried to read some blurred text on his friend's site, so he decided to mess around in photoshop.
He got over zealous and did some javascript stuff in photoshop, based on blurring known text and attempting to reblur and match that text 1 letter at a time.
He was then disappointed that he couldn't use the thing to unblur assumed text of unknown font, font settings, color, language, character set, and blurring algorithm after unknown layers of image alteration after the text was rendered, and after unknown compression.
Parent
Ideal conditions (Score:5, Interesting)
Old tech (Score:5, Funny)
Jeez. Hasn't anyone seen CSI?
Re:Old tech (Score:5, Funny)
Parent
Failure (Score:5, Insightful)
"While my original goal of recovering the censored text on my friendâ(TM)s page was never achieved, the project was a success."
I wouldn't call that a success...
Good execution of a basic concept, but the fact remains that this shit is infeasible in practice. You have all the font issues (the typeface, the spacing, the color, the size, etc.), and you've got all the source issues - Are you sure that's text? Is it English? Was it obfuscated in other ways? Has the image been altered after the text was rendered? How has compression affected it?
The biggest fucking issue, of course, is that you're assuming the text was obfuscated using photoshop, or at least very similar blurring/pixelating algorithms.
It's a great project in terms of using javascript and photoshop to do something neat but basic in concept (essentially brute forcing, as the author says).
But unless you have inside info about how the text was rendered and obfuscated, you're better off taking a step back and squinting.
I think I see a duck.
Short version (Score:5, Interesting)
If you know the blur algorithm, you can run each character through it to produce the blurred output, then compare that result to the image you are trying to unscramble and pick the closest match.
This assumes the blurring doesn't cause pixels to overlap their neighbors too much, that the algorithm produces deterministic output (isn't random), and that there are few possible inputs resulting in the same blurred output.
If the letters overlap because the blur blends with its neighbors then it just becomes a computational complexity problem where you have to try words instead of letters. A lot harder, but not totally impossible.
A blurring algorithm that used some large mosaic effect prior to bluring or used randomized input would produce a similar looking blur effect, but without disclosing much about the input.
Personally, I'd prefer examining the blur area for the predominant background color and create a gradient/mosaic around that color to fill the area. Then there is absolutely no chance of recovering information, but the effect on video wouldn't be too horribly jarring (as a black box might be).
What about nipples? (Score:5, Insightful)
Re:Computer... magnify and enhace (Score:5, Funny)
BIG squares.
Parent
Re:OSX-style dock on website. (Score:4, Interesting)
Neat.
*takes picture*
I hate the dock, and I hate transparency.
I think it's even worse on a website.
But I'm half-tempted to look at the code.
Parent
Re:OR Japanese pr0n? (Score:5, Funny)
Parent