A Photo That Can Steal Your Online Credentials?
TedSamsonIW writes "InfoWorld reports on a new potential ploy for stealing Web user's private information: Researcher has found that by placing a new type of hybrid file on Web sites that let users upload their own images, they can circumvent security systems and take over Web surfers' accounts. 'They call this type of file a GIFAR, a contraction of GIF (graphics interchange format) and JAR (Java Archive), the two file-types that are mixed. At Black Hat, researchers will show attendees how to create the GIFAR while omitting a few key details to prevent it from being used immediately in any widespread attack.'"
Just imagine - something as innocent as lolcats could be a potential minefield. God only knows what goatse would do.
I'll pirate your account with my Gif-Yarr!
I warned you all! I've known for years the bad guy from Aladdin would eventually tire of stealing stuff from mysterious caves and start breaking into computers!
"A witty saying proves nothing." - Voltaire
...won't someone think of the PORN!?
The "cue the foo posts in 3, 2, 1..." posts will commence with no subsequent foo posts in 3, 2, 1...
As if tub girl wasn't insidious enough... Now she's going to steal my accounts?
What a roadblock to all those brialliant, anti-social types who won't ever be able to put the last pieces to together as they spend 23 hours a day in front of their "command centers". Sounds like security through obscurity, except they forgot to obscure it.
So, I, for the life of me, cannot figure out what point an (essentially) "executable" image would have. To me, it seems like this mixing of concerns is a very bad idea. It's either data (an image) or an executable (application). Not both.
Can anybody explain the thought process behind this?
We might say the same about you. Try to be considerate and civil, it makes you look like less of a tool.
For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
Things like a properly constructed white-list for Noscript, not allowing Java by default, etc. will all protect you from this.
It's a shame that security tools that can help mitigate some of these attacks are difficult to understand and use for many users.
"Upgrade to a hybrid today and get 20% more mileage on your phishing messages"
The mime type says "GIF", but if it looks executable, try to run it anyway. Or maybe it is just Windows. TFA didn't mention which software does this (other than "the browser"). At one point they blame Sun. Huh? Does the GIF have an applet tag? Or does this attack involve running a malicious applet at evil.com, which then loads a JAR from facebook.com (which was uploaded as a GIF) and the JRE runs it as if it came from facebook. *That* would be a Sun problem (and not a "browser" problem).
Well, this proves it again, by making Java so hard to install, Linux avoided yet another threat.
Taxation is legalized theft, no more, no less.
It looks like it's just crafting a java applet so that it fools web sites into thinking its a gif image and allows it to be uploaded, whereas they usually wouldn't allow java applets, thus anyone who then tries to view this file, their browser would try to open it with the JVM.
The first thing is that Java uses a strong sandbox model, so you really couldn't do much with it. Secondly, if you don't have Java installed, or have it turned off by default using AdBlock or NoScript, the file wouldn't run.
What site doesn't resize the uploaded image for display? That wouldn't result in "compressed code" it would just be an image.
If i'm reading this correctly, it is a java applet, which if you don't have the runtime installed, or turned off, you'd be ok, but for the millions of users who have no clue about java, they'd be nailed. If you didn't have java will it prompt you to get it, thus assisting the attack? Even a javascript attack would be vicious, as the script would appear to be coming from the site itself, so if I was allowing scripts from facebook, this nasty little bugger could still get through...
I am very curious whether some similar type of exploit could be used on YouTube uploads. Well, I guess we'll know soon.
http://www.infoworld.com/archives/emailPrint.jsp?R=printThis&A=/article/08/08/01/A_photo_that_can_steal_your_online_credentials_1.html
Java is the epitome of bad programming, despite all that you can do with it. It's just a terrible implementation of a great capability. I loathe its insurgence into the mainstream.
OK, so this attack can allow bad guys to put java applets in web pages which appear to be GIF images. So what? You can already put a java applet directly in a web page.
And aren't java applets run in a sandbox? It seems you need another hole to get out of the sandbox.
Thank you, thank you, come again.
Or Jafar
Jafar's name seems to be derived from a character named Jafar or Giafar in tales of the Arabian Nights, who is the Vizier to the 9th century Abbasid Caliph Harun al-Rashid; this character in turn was based on a real-life vizier, Ja'far bin Yahya Barmaki. Harun and Giafar were the protagonists of many stories in Arabian Nights, but Giafar was never presented as a villain. Harun did have the real Ja'far bin Yahya Barmaki beheaded after a dispute arising from allegations that Ja'far had engaged in an affair with the Caliph's sister. The original tale of Aladdin, a Syrian story not originally attached to the Arabian Nights, features two characters who correspond to Disney's Jafar. One is an unnamed vizier who is jealous of Aladdin but does not serve as a real villain; the other is the major antagonist, an evil magician from the Maghreb in North Africa who introduces Aladdin to his magical lamp.
...
He is shown to be scholarly and learned in arcane lore, his secret chamber filled with strange devices and stacks of tomes, and, as such, he operates more on the level of an alchemist throughout the film's duration than an actual magician. Instead of casting spells, he relies on previously prepared potions capable of producing magical phenomena...
He's not wrong, you know. Java was pretty much Pascal for the nineties.
Christopher S. 'coldacid' Charabaruk -- coldacid.net
It is true, java is great big stack of Fail.
This sounds like those tricks where someone writes a code module that compiles in both a C++ compiler and a Pascal compiler, by playing with anomolies in the syntax of the language. Only someone has made a JAR file that looks like a valid GIF file.
I fail to see how this will work though. Even if I could craft such a file, it will have .GIF extension which will make it serve-up as image/gif MIME type so it won't be loaded by the JVM. Now we know that older versions of Internet Explorer will look at the file content not the MIME type - do they still do that? If so, I guess IE might see the file as a JAR not a GIF, but nothing else would. Also - won't that GIF file be in an tag? Surely even IE won't run the JVM for something that isn't in an tag right?
I can put a Java file on my MySpace page anyway, so disguising it as a GIF doesn't really change things. I guess the benefit to the hacker here is that they could do it on sites that normally don't serve Java. And since Java can do basically the same things that Javascript can, it's another XSS attack vector.
Overall, this isn't anything I'm too worried about. Although I'll be very impressed if someone can get a JAR to run from an tag. Also, Kudos to anybody who can make a GIF appear as a JAR. They get points for being inventive.
Jafar?
No... Jew?
First off, what idiot mod'ed you "Troll"?
Secondly, if the user whitelists FaceBook then that would PROBABLY also whitelist the picture/jar that is the exploit which would be downloaded from FaceBook.
Yeah, the security is an issue. At least for right now. It might take a major re-write to kill this exploit. Probably a sandbox where EVERYTHING from a web page would be temporarily stored, then analyzed to see what it was and what the web page reported it as. Probably by digging into the headers of each file and having a setup similar to Apple's for identifying the app that should run a given file.
* resize the image
* crop the image 1x1 pixel smaller
* convert the GIF(ar) to PNG or JPG
* optimize the GIF file
* shrink/reorder the color palette
* edit the comments
Gosh.. really, anything that affects the actual data package, but doesn't visibly hamper valid pictures.
Support FSF: Stop thinking with your wallet, and think with your imagination. (cc/non-commercial)
I've got this photograph in my wallet... and it's gauging my money on a daily basis :/
When you shoot a mime, do you use a silencer?
There are websites still using Java applets? I thought those died years ago.
TFA says that a user needs to be logged in for this attack to work. This sounds as if the mechanism is the same as or similar to a cross-site request forgery. Shouldn't it be possible to stop the attack with similar countermeasures, such as tokens that need to be submitted along with the request for sensitive information?
.. but just think about how many people happily forward links to all their friends? Who then happily click on the links. Granted, your average Slashdot reader might be too IT literate to fall for this, but Joe Public certainly isn't.
I uninstalled java from my machines years ago.
Does anybody honestly still use it for anthing useful on a webpage?
JAR files are just ZIP archives. ZIP archives are based on the end of the file, where the central directory is located (this is also why you can often unzip a self-extracting exe using a normal unzip application). GIF files, like most other files, are based on the beginning of the file. ZIPs don't care if you shove data in front of them. GIFs don't care if you shove data after them.
$ cat file.gif file.zip > file.gizip .gif or .zip. Both work. You can also substitute JPG instead of the GIF, or any other file type that ignores trailing garbage.
Rename the result to
I'm not sure if there's some kind of trick that is needed for the exploit to work, but the fact that you can make a file that works both as a zip and as almost any other file type has been known for ages.
It is true, java is great big stack of Fail.
With slathering of WTF poured on top.
Why is it so hard to only have politicians for a few years, then have them go away?
Uh... anyone forget that you can create PHP files that pretend to be JPG's? I used to have a signature on a forum that would tell users their IP, Browser, OS and generate a random quote... I wouldn't find it hard at all to hack into someones myspace account using the same concept... The only news to me is that they are doing this with JAVA.
Uhhh... You mean that 99.9999% of the world doesn't validate images properly on upload and only checks the file extension if that? Wow. You mean a file extension doesn't guarantee MIME type? Thanks for the breaking news.
In other breaking news (circa 1998)....
Drumroll please....
The sandbox for applets prevents them from doing anything malicious, like accessing the file system, opening a socket, or accessing cookies, unless explicitly enabled by the user through the altering of a security policy.
Unlike scripting in IE and Flash, you can't even access the system clip board in Java applets without explicit user permission.
Perhaps this article should have been titled: Everyone on slashdot is retarded, so you'll buy whatever we tell you.
goatse guy is appropriate. But, I guess that just me.
NEVER EVER TRUST ANY DATA THE USER SUBMITS!
MMO Quests are like orgasms:
You may solo them, I prefer them in a group.
Anyone who knows much about web browser security will almost certainly have enough to replicate this attack very quickly. The recent DNS flaw was replicated based only on the knowledge that there was a DNS spoofing flaw, some rumours and a few patches.
It would be much better to go with full disclosure, so that at least everyone has access to the same info and can take steps to prevent the attack. It would be impossible to try and inform every affected software developer, including open source projects, and anywhere there is no guarantee that they wouldn't just sell the info on the exploit market anyway.
const int one = 65536; (Silvermoon, Texture.cs)
SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
The technique is new, but the concept and prctice of it has been around for years. Does anyone remember the days of javascript embedded gifs? NO? ... Hmmm. I think it's odd that people are just now starting to realize that more things on a site can hold code, besides an applet or widget.
Even if Facebook is whitelisted, the applet wouldn't run because it's hosted on a different site.
NoScript checks both the embedding site and the embedded (Java) object against the whitelist to determine if it can be run.
There's a browser safer than Firefox, it is Firefox, with NoScript
When a web server deals with image files, it transmits the contents, it doesn't parse them. This is not an attack against servers, but against other end users.
There ya go! That was much better, and I almost agree with you now ;)
For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
"Jif" would be a better combo, imo. No, I didn't RTFA.
Moderation: +1 pwnage
Sounds familiar...
In the book, Snow Crash, a hacker causes people in their virtual world to "crash" by looking at an animation that works like an executable.
Of course, they have to give it a cutesy, buzzworthy name.
-dZ.
Carol vs. Ghost
Java is the epitome of bad programming, despite all that you can do with it. It's just a terrible implementation of a great capability. I loathe its insurgence into the mainstream.
Regardless of whether that's true or not... the irony here is that on its launch, Java's use in web browsers- via Applets- was the main thing it was hyped for to the user in the street. And it totally *failed* to achieve mainstream success in that area. Seriously, how often do you see Java applets?
Flash- which used to be a tool for creating lightweight vector-based multimedia- somehow rose to become the tool for embedded apps in web pages. The exact niche that Java was supposed- and failed- to occupy.
I wouldn't even say Flash out-competed or usurped Java Applets. By the time Flash started growing up, Applets had been around for years and had clearly failed to be the success they were supposed to be.
"Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
Just more reason not to use GIFs.
So if they combine two Java archives together, we get the other iconically ridiculed movie? Someone make a "Gifar"/JarJar YouTube mashup!
My first Journal Entry ever, in 8 years! http://slashdot.org/journal/365947/aphelion-scifi-fantasy-horror-poetry-webzine
... and can't get java to work.
the only "tool" here is forced morality.
"You can kill the revolutionary, but you can't kill the revolution."-- Fred Hampton
I've done it with cat and had zero problems unzipping it. I've also done it today with a .gif and a .jar containing an applet and had the applet run. Try it yourself.
Jeez - if you don't understand the joke then just don't mod it. Here - I'll clue you in...
Jeet?
No, jew?
Translation...
Did you eat?
No, did you?
See how that works? Now someone please give the AC the funny mod they should have gotten to start with. This is why I browse +6 on flamebait/troll/offtopic (and -6 on insightful).
Both the server and the browser should check that the content and the extension are consistent. Furthermore, the server should enforce consistency on both upload and download.
Files masquerading as one type, then another type is nothing new at all.
Yes, the internet is broken.
So was windows media player.
Any moronic application chain that allows you to upload a *picture*, and then present it to the browser *without a picture content-type*, and any browser that *will run it* as an applet because it looks like java-code.
Wow. So, very, very broken.
Fix is obvious: write correct code in the first place...
An interesting way to do amateur steganography... (Think teens on MySpace posting messages in pictures...)
The society for a thought-free internet welcomes you.
The article doesn't say this explicitly, but the flaw doesn't lie in Java at all. The problem is that some browsers, most notably Internet Explorer, in some scenarios ignore the filetype as sent by the server but try to guess the filetype themselves. So there's no problem in Java's security model, nor even in that of the website. The website just serves it as an image, but then the browser says 'hm... what would happen if I were to execute this as a Java applet instead?' based on the ZIP header at the end of the file, thereby bypassing the website's security and running an untrusted applet in the context of the website. I don't see why Sun should be expected to fix this, the blame and shame lies squarely on the browser vendor's shoulders as far as I'm concerned.
What would be good is what I proposed _years_ ago:
http://osdir.com/ml/mozilla.security/2002-10/msg00029.html
Then even if someone manages to slip in javascript or other html naughties into an allowed content-type=text/html that's uploaded or emailed to the site, it still won't work on the target's browser.
(if the browser supports the feature, and the website encloses all stuff that _should_ be "plain old harmless stuff" with such tags).
Basically when the browser sees such tags, it will go "Ah, between these tags, I behave as a browser with the fancy stuff disabled". So java, activeX, javascript AND _NEW_STUFF_ that people think up that slips through the upload checks would still be disabled.
That's right, even fancy new stuff that people are thinking of, could be disabled without the website having to keep up with the latest and greatest way to pwn you that the browser or w3c have decided to bless the world with.
It's been 7 years already and everyone seems to be happy to create new "foot guns" for the world but nobody seems interested in making a "foot gun safety".
I have an image BBS system called an Oekaki that accepts image uploads much like the channel boards do. For years, I've had a file type identifier in my code that inspects the file and makes sure it is what it's supposed to be.
Since it's a forum specifically designed for artists, I did this primarily to keep BMP files, Photoshop images, and corrupt PNG files off the board. It's effective at keeping code attacks like this from happening, though.
Turning off Java is a bit of a problem, because Oekaki involves using a Java applet to draw pictures. Perhaps web developers should simply apply the principle of filtering everything that is uploaded. It's not that hard to check image headers and the position of end markers, since (unlike many text formats) today's bitmap image formats still have proper binary headers.
I'm not looking forward to the day when image formats use markup instead of binary headers. There's a lot of opportunity for bad things to hide in there, as any web developer who has had to deal with XSS attacks and intrusive banner ads can tell you.
I believe the way it works is the front of the file is a valid image, and the exploit is hidden at the tail end of the GIF. So you would see a picture, AND run the code.
Wordpress has some themes where when people comment, their web avatar can be used next to their comment. Is this a liability as well? If so, what would be the fix? Thanks,
But it just isn't very funny.
The article wasn't clear if this was something specific to the GIF format. Could it be used with PNG, the supposed GIF replacement?
The article implies that the GIF/JAR file has to be from the site you are logged into. Could it come from a third party ad hosted by the site? If not, then servers that upload image files could just convert the images to some standard format (png,jpeg) before serving them out again.
That may be true. But not being funny doesn't make it flamebait.
Clever
The server obviously doesn't do a magic check or it would see that it's an applet.
A "magic check" is probably the problem in the first place. GIF files typically start with the string "GIF89a", and have nothing consistent at the end. JAR files (which are ZIP files) aren't required to have anything special at the beginning, but instead have their "signature" near the end of the file (this allows stuff like self-extracting archives to work).
So, your "magic" file could have two different entries:
Depending on the order that these tests are performed, you'll get different results. Where the same file can be interpreted different ways, there is an avenue for attack.
The UTF-7 autodetection bug caused the same kind of problem. If the past couple of years have taught us anything, it's that we need to preserve datatypes along with the data itself, rather than trying to autodetect it later.
http://outcampaign.org/
lord this is prolly just a rar/zip[ file renamed to .gif with the magic cookie in it - u're browser a views an uncompressed (compressed) file (a gif) and runs a browser viewer
This has been true for years and continues to be true regardless of code-signing or sandbox techniques.
Did you ever wake up in the morning, with a Zombie Woof behind your eyes? -- FZ