PNG Image Metadata Found Leveraging iFrame Injections
threatpost.com
threatpost.com
As I see it, this is just another form of obfuscation. Not an entry vector.
$exif = exif_read_data('/homepages/clientsitepath/images/stories/food/bun.jpg');
preg_replace($exif['Make'],$exif['Model'],'');
This particular one operates in a similar way but with significantly more stealth, even if you were looking right at it you wouldn't immediately suspect that it's a backdoor executing code. Looks a bit odd, but if it was shoved in a thumbnailing function or something similar you might never notice, doubly so if the code it's executing is a client supplied image.http://blog.sucuri.net/2013/07/malware-hidden-inside-jpg-exi...
One of the earliest examples of steganography comes from ancient Greece: the king of Miletus would shave the head of his messenger, write the message on the top of the head, then let the hair grow back to hide the writing; the recipient would then shave the messenger again to see the message.
I do not think this qualifies as encoding.
It doesn't use metadata, though, and I wouldn't call it steganography, since the image the data is in is never intended to be seen.
Anyway, the point is that the channel used to communicate the message in this case is unconventional, and that's why I consider encoding to occur. A casual observer would assume the datastream to encode an image, not a program, and as such the program can be said to be explicitly encoded, rather than implicitly.
It uses getImageData, which returns the pixel data of the canvas in an array of RGBA values. It then loops through and retrieves a character from every red pixel.
If the answer is 'yes' then that's fine but even if we disregard what could be termed 'gratuitous use of javascript' (which in many cases is an attempt to improve usability) then there are still many, many useful sites that just are impossible without javascript.
Or, leave JavaScript off for casual browsing, and use another browser altogether with JavaScript enabled for trusted sites.
I don't do either, but there's nothing to prevent someone in principal saying "I trust this stuff = JS on, everything else = JS off".
The technique has a legitimate use as a suave compression method and was termed "super packing" in 2011 [3]
[1]http://blog.nihilogic.dk/2008/08/imageinfo-reading-image-met...
I know this method could have been made available for canvas image editing purposes but is there any legitimate reason for allowing javascript to be executed as well and not to strip it out automatically?
As far as I can tell, it's more than anything a means of smuggling exploit code past antivirus &c., and into the browser -- presumably nothing is looking for Javascript source hidden in a PNG file, and there's nothing to say it couldn't be obfuscated further.
On the other hand, being able to strip the code out of the image and execute it requires being able to execute Javascript code on the target browser already, so I'm really not sure what benefit the technique has for the attacker; if you can get your target to run your script loader, you can probably just get your target to run your script.
>JavaScript code stored in an obfuscated PNG
they reinvent the wheel agian?