|
|
Log in / Subscribe / Register

Security

Greasemonkey gets into trouble

July 27, 2005

This article was contributed by Joe 'Zonker' Brockmeier.

The ability to add extensions to Firefox has proven to be a popular feature. One of the most popular extensions for Firefox, inspiring countless user scripts, is the Greasemonkey extension, which allows users change the behavior of web sites.

A serious vulnerability was found in Greasemonkey last week by Mark Pilgrim, author of the upcoming book "Greasemonkey Hacks," and Dive Into Greasemonkey. Pilgrim discovered that a combination of two flaws in Greasemonkey could allow user data to be transmitted to virtually any site.

We spoke to Pilgrim about the vulnerabilities, and the security of Greasemonkey in general. According to Pilgrim, Greasemonkey's first flaw would allow a web page access to the APIs to call remote pages. A page with an exploit for this vulnerability would allow the exploit to call code from other sites without the user being aware of it. This could include posting data to another site.

The second exploit allowed pages to access file URLs, which could allow a remote site to browse the content of a user's hard drive. In conjunction with the first vulnerability, "remote pages could access any file on your system... [they could] recurse through the entire hard drive and post it anywhere in the world, really. And that's bad."

These vulnerabilities are fixed in the 3.5 version of Greasemonkey, though it is a "neutered" version that lacks the Greasemonkey APIs. Pilgrim said that a beta had been released that should retain functionality and clear up the security holes that he had found.

The new version disables file URLs altogether for that API function, so even user scripts are not allowed to do that anymore, and second of all, closes the hole that allows remote page you're browsing to trap the API call. The pages you browse now no longer have access to any of the Greasemonkey internals. User scripts can still use it... but the page you're browsing can't steal access to those pages.

Even though the vulnerability has been closed in the latest versions of Greasemonkey, Pilgrim said that users could still be vulnerable to malicious user scripts. "Greasemonkey is very powerful, and people need to be aware what they're installing". Indeed, there does seem to be a level of concern that the problems with Greasemonkey are in its features, not its vulnerabilities. The concept of allowing users to run scripts in the browser developed by third parties, who may not have the users' best interests in mind, opens up some scary possibilities.

Since Firefox and Greasemonkey are becoming increasingly popular with less technical users, we asked Pilgrim how those users could verify that the scripts they install were safe, and if there was any way for the Greasemonkey team to protect those users.

Basically, there's no technical solution to that, Greasemonkey allows you so much power, that you can't stop people from writing malicious scripts...without making Greasemonkey useless.

We also asked Chris Hofmann, director of engineering for Mozilla, about the Greasemonkey vulnerability and whether the Mozilla developers could do anything to make extensions safer for users. Hofmann also said that much of the responsibility lies with the user to verify the source and function of extensions. "Users should take caution for any extensions they download, and to authenticate the source of the extension." He also explained that the default operation of the browser was to warn users before installing any software, to prevent any extensions or scripts from being installed without the user's knowledge.

It's worth noting that Firefox is not unique in allowing extensions or add-ons like Greasemonkey. Pilgrim noted that Turnabout for Internet Explorer performed the same function for IE, by allowing users to run scripts to change the function of websites. Just as with Firefox, Turnabout users could easily run malicious scripts if they're not careful about where they acquire them.

There's really nothing unique about the Greasemonkey situation, though. Spyware and adware have propagated in large part because users have been willing to download and install software without questioning the source of the software or any possible side-effects. The best that the Greasemonkey team can do is ensure that their software is not subject to vulnerabilities like the two that Pilgrim discovered. Beyond that, the responsibility will remain with the user to verify that extensions, scripts and other software is suitable for use.

Comments (4 posted)

New vulnerabilities

ClamAntiVirus: integer overflows

Package(s):clamav CVE #(s):CAN-2005-2450
Created:July 26, 2005 Updated:August 16, 2005
Description: Clam AntiVirus versions < 0.86.2 is vulnerable to integer overflows when handling the TNEF, CHM and FSG file formats. By sending a specially-crafted file an attacker could execute arbitrary code with the permissions of the user running Clam AntiVirus.
Alerts:
Debian DSA-776-1 clamav 2005-08-16
Mandriva MDKSA-2005:125 clamav 2005-07-27
Gentoo 200507-25 clamav 2005-07-26

Comments (none posted)

fetchmail: buffer overflow

Package(s):fetchmail CVE #(s):CAN-2005-2335
Created:July 21, 2005 Updated:August 12, 2005
Description: The fetchmail POP3 client has an arbitrary code execution vulnerability that may be triggered by a malicious POP server. See this advisory for more information.
Alerts:
Debian DSA-774-1 fetchmail 2005-08-12
Mandriva MDKSA-2005:126 fetchmail 2005-07-28
OpenPKG OpenPKG-SA-2005.016 fetchmail 2005-07-28
Ubuntu USN-153-1 fetchmail 2005-07-26
Gentoo 200507-21 fetchmail 2005-07-25
Red Hat RHSA-2005:640-01 fetchmail 2005-07-25
Slackware SSA:2005-203-05 fetchmail 2005-07-23
Fedora FEDORA-2005-614 fetchmail 2005-07-21
Fedora FEDORA-2005-613 fetchmail 2005-07-21

Comments (none posted)

httpd: off-by-one overflow and cross-site scripting

Package(s):apache httpd CVE #(s):CAN-2005-1268 CAN-2005-2088
Created:July 25, 2005 Updated:November 7, 2005
Description: Watchfire reported a flaw that occurred when using the Apache server as an HTTP proxy. A remote attacker could send an HTTP request with both a "Transfer-Encoding: chunked" header and a "Content-Length" header. This caused Apache to incorrectly handle and forward the body of the request in a way that the receiving server processes it as a separate HTTP request. This could allow the bypass of Web application firewall protection or lead to cross-site scripting (XSS) attacks.

Marc Stern reported an off-by-one overflow in the mod_ssl CRL verification callback. In order to exploit this issue the Apache server would need to be configured to use a malicious certificate revocation list (CRL).

Alerts:
Slackware SSA:2005-310-04 apache 2005-11-07
Debian DSA-803-1 apache 2005-09-08
Ubuntu USN-160-2 apache 2005-09-07
SuSE SUSE-SA:2005:046 apache,apache2 2005-08-16
Fedora-Legacy FLSA:157701 Apache 2005-08-10
Ubuntu USN-160-1 apache2 2005-08-04
Mandriva MDKSA-2005:130 apache 2005-08-03
Mandriva MDKSA-2005:129 apache2 2005-08-03
Fedora FEDORA-2005-638 httpd 2005-08-02
Fedora FEDORA-2005-639 httpd 2005-08-02
Trustix TSLSA-2005-0038 multi 2005-07-29
SuSE SUSE-SR:2005:018 multi 2005-07-28
Red Hat RHSA-2005:582-01 apache httpd 2005-07-25

Comments (none posted)

libgadu: integer overflows

Package(s):libgadu CVE #(s):CAN-2005-1852
Created:July 22, 2005 Updated:July 27, 2005
Description: libgadu, a library implementing the Gadu messaging protocol, suffers from a set of integer overflow vulnerabilities. This vulnerability affects a number of other packages; see, for example, this KDE advisory for kdenetwork and Kopete.
Alerts:
Gentoo 200507-26 gnugadu 2005-07-27
Debian DSA-767-1 ekg 2005-07-27
Gentoo 200507-23 kopete 2005-07-25
Slackware SSA:2005-203-02 kdenetwork 2005-07-22
Fedora FEDORA-2005-623 kdenetwork 2005-07-22
Fedora FEDORA-2005-624 kdenetwork 2005-07-22
Red Hat RHSA-2005:639-01 kdenetwork 2005-07-21

Comments (none posted)

movemail: arbitrary code execution

Package(s):movemail CVE #(s):
Created:July 21, 2005 Updated:July 27, 2005
Description: The emacs movemail POP utility has an arbitrary code execution vulnerability that can be activated by connecting to a malicious POP server.
Alerts:
Slackware SSA:2005-201-02 emacs 2005-07-21

Comments (none posted)

phpbb2: cross-site scripting

Package(s):phpbb2 CVE #(s):CAN-2005-2161
Created:July 27, 2005 Updated:July 27, 2005
Description: The phpbb2 package suffers from a cross-site scripting vulnerability.
Alerts:
Debian DSA-768-1 phpbb2 2005-07-27

Comments (none posted)

sandbox: insecure temporary file handling

Package(s):sandbox CVE #(s):
Created:July 25, 2005 Updated:July 27, 2005
Description: The Gentoo Linux Security Audit Team discovered that the sandbox utility was vulnerable to multiple TOCTOU (Time of Check, Time of Use) file creation race conditions. Local users may be able to create or overwrite arbitrary files with the permissions of the root user.
Alerts:
Gentoo 200507-22 sandbox 2005-07-25

Comments (none posted)

shorewall: rule bypass vulnerability

Package(s):shorewall CVE #(s):CAN-2005-2317
Created:July 21, 2005 Updated:October 10, 2005
Description: Shorewall has a vulnerability in which a client that is accepted by MAC address filtering can bypass other rules, allowing access to all open services on the firewall.
Alerts:
Ubuntu USN-197-1 shorewall 2005-10-10
Debian DSA-849-1 shorewall 2005-10-08
Gentoo 200507-20:02 Shorewall 2005-07-22
Gentoo 200507-20 Shorewall 2005-07-22
Mandriva MDKSA-2005:123 shorewall 2005-07-20

Comments (none posted)

vim: arbitrary command execution

Package(s):vim CVE #(s):CAN-2005-2368
Created:July 26, 2005 Updated:August 23, 2005
Description: Georgi Guninski discovered that it was possible to construct Vim 6.3 modelines that execute arbitrary shell commands by wrapping them in glob() or expand() function calls. If an attacker tricked an user to open a file with a specially crafted modeline, he could exploit this to execute arbitrary commands with the user's privileges.
Alerts:
Mandriva MDKSA-2005:148 vim 2005-08-22
Red Hat RHSA-2005:745-01 vim 2005-08-22
Fedora FEDORA-2005-741 vim 2005-08-15
Fedora FEDORA-2005-738 vim 2005-08-10
Fedora FEDORA-2005-737 vim 2005-08-10
Ubuntu USN-154-1 vim 2005-07-26

Comments (1 posted)

webcalendar: information disclosure

Package(s):webcalendar CVE #(s):CAN-2005-2320
Created:July 27, 2005 Updated:July 27, 2005
Description: The webcalendar utility suffers from an information disclosure vulnerability.
Alerts:
Debian DSA-766-1 webcalendar 2005-07-26

Comments (none posted)

zlib: buffer overflow

Package(s):zlib CVE #(s):CAN-2005-1849
Created:July 21, 2005 Updated:April 11, 2006
Description: zlib has a vulnerability that can cause code that executes it to crash if a corrupted file is opened.
Alerts:
Mandriva MDKSA-2006:070 sash 2006-04-10
Debian DSA-1026-1 sash 2006-04-06
Gentoo 200603-18 pngcrush 2006-03-21
Ubuntu USN-151-4 rpm 2005-11-09
Ubuntu USN-151-3 aide 2005-10-28
Fedora-Legacy FLSA:162680 Zlib 2005-09-14
Debian DSA-797-1 zsync 2005-09-01
Gentoo 200508-01 Compress-Zlib 2005-08-01
Gentoo 200507-28 AMD64 x86 emulation base libraries 2005-07-30
SuSE SUSE-SA:2005:043 zlib 2005-07-28
OpenPKG OpenPKG-SA-2005.014 zlib 2005-07-28
Mandriva MDKSA-2005:124 zlib 2005-07-22
Slackware SSA:2005-203-03 zlib 2005-07-23
Ubuntu USN-151-2 dpkg, ia32-libs, amd64-libs 2005-07-22
Fedora FEDORA-2005-626 zlib 2005-07-22
Fedora FEDORA-2005-625 zlib 2005-07-22
Gentoo 200507-19 zlib 2005-07-22
Red Hat RHSA-2005:584-01 zlib 2005-07-21
Ubuntu USN-151-1 zlib 2005-07-21
Debian DSA-763-1 zlib 2005-07-20

Comments (none posted)

Page editor: Jonathan Corbet
Next page: Kernel development>>


Copyright © 2005, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds