Archive for the 'Mozilla' Category

LinuxWorld 2005 highlights

Tuesday, August 16th, 2005
  • Josh and Alex pulled me away from the Debian booth. I thought they were going to ask me to man the Mozilla booth, but it turned out they just wanted to introduce me to two Gentoo guys, who wanted to compliment me on Pornzilla.
  • I noticed that the Firefox bug Josh was playing with on his laptop was a security hole, and helped him file it as such.
  • I helped put up Firefox posters in a corner window of the convention building. Sadly, I wasn't there on Wednesday, when the posters were taken down.

Greasemonkey 0.4 pre-beta

Sunday, July 17th, 2005

Aaron Boodman posted Greasemonkey 0.4, attempt III today on the Greasemonkey mailing list. It is the first version of Greasemonkey that works in Deer Park alpha 2 and Firefox trunk builds. Earlier messages describe attempt I and new features, attempt 2, and the call for pre-beta testing.

Security holes in Google Desktop Search fixed

Sunday, July 17th, 2005

Google recently fixed several holes in Google Desktop Search that I found. This is the email I sent to security@google.com to report the holes:

This combination of security holes in mulitple products allows an attacker to read text files indexed and cached by Google Desktop Search. Its success rate is proportional to the amount of time the attacker can keep the victim on the attacker's site and the victim's CPU speed. I think all parts of this attack would work against both Firefox and Internet Explorer, but I've only tested part 1 and only in Firefox.

Recover the URL for the home page of Google Desktop Search

The URL for the front page of Google Desktop Search is http://127.0.0.1:4664/&s=nnnnnnnnnn for some 10-digit string nnnnnnnnnn. If the string is incorrect, GDS returns a page that says "Invalid Request". This seems to be a second line of defense against XSS and CSRF attacks.

Most browsers have information leaks that allow web scripts to determine whether a link is visited. The attacker assumes that the user has visited the GDS start page with the correct value for nnnnnnnnnn recently enough that the URL is in the browser's global history. Based on my experiments and calculations, it would take several days of CPU time for a script in an untrusted web page in Firefox to find out which of the 10^10 links of the form http://127.0.0.1:4664/&s=nnnnnnnnnn is visited. An attacker might try to keep a victim on a page for several days, or might try to keep a large number of users on his site for a shorter peroid of time. I don't know what algorithm generates the value nnnnnnnnnn, so I don't know if it has weaknesses that might allow the attacker's script to test fewer than 10^10 URLs.

Solutions: GDS could use a longer salt, to make iterating through every possible salt value harder. GDS could restrict salts to single use, but I think this would break too many things. Firefox (and other browsers) could plug the information leaks in global history.

References:

Perform a Princeton DNS attack

First, make gds.evil.com resolve to an IP under the control of the attacker, with a short TTL. Make the victim load http://gds.evil.com:4664/, which contains a script. Then make gds.evil.com resolve to 127.0.0.1. The script then creates an iframe that loads http://gds.evil.com:4664/&s=nnnnnnnnnnn and uses cross-frame scripting to control the page served by GDS.

You can check that GDS does not prevent this part of the attack by loading GDS and then replacing 127.0.0.1 in the URL with warez.squarefree.com (which resolves to 127.0.0.1).

Solutions: GDS could reject requests where the hostname is not "127.0.0.1" or "localhost" (IMO, the HTTP protocol requires it to do so). Firefox, Windows XP, the Windows XP firewall, or my ISP could prevent "external" DNS names from resolving to "internal" IP addresses.like 127.0.0.1.

References:

Combining the holes

Once the attacker has script access to http://gds.evil.com:4664/, has gds.evil.com resolving to 127.0.0.1, and knows the hash for the home page, he can search for text files and view cached text files. (The links to cached text files are absolute and have 127.0.0.1 as the hostname, but they continue to work when 127.0.0.1 is replaced by warez.squarefree.com, which resolves to 127.0.0.1.)

I sent this email on Feb 13, 2005. The first part was fixed in version 20050227 by making the salt longer. The second part was fixed in version 20050325 by making GDS reject requests with hostnames other than "127.0.0.1" and "localhost". Google started pushing the updated version to existing users on June 2, 2005, so most users should be upgraded by now. You can see what version of GDS you have by clicking "About".

This is not the same as the hole found by Rice students (Slashdot article), which had been fixed previously.

Mac bugs

Sunday, July 17th, 2005

The Mozilla Foundation is letting me use a Mac laptop during my internship. Firefox (trunk) seems buggier on Mac than on Windows, although to be fair, I am used to Firefox's bugs under Windows. I spent a lot of last week filing, testcasing, and voting for bugs as I ran into them. One Mac-specific bug I ran into is a potential security hole in addition to being annoying.

In Mountain View again

Saturday, July 16th, 2005

I'm in Mountain View for another summer of working on Mozilla, this time as an intern at the Mozilla Foundation. Thanks to Ishani for helping me move into my new apartment.

Searcher browser stats

Saturday, May 28th, 2005

Even though the majority of visitors to squarefree.com use Gecko browsers, I can get a rough idea of general browser usage by looking at what browsers visitors are using when they find my site by searching for certain terms. Stats for some search terms that drove many users to my site between April 23 and May 27, sorted by percent Gecko:

Engine Search phrase Hits IE Gecko KHTML Opera Other
Googlepornzilla34916%90%2%2%0%
Googleburning edge87211%82%6%2%0%
Googlefirefox nightly64911%80%6%2%1%
Googlebookmarklets121922%67%4%6%0%
Googledreamhost19624%61%10%4%0%
Googlejesse35755%40%3%1%0%
Yahoopornzilla13264%36%0%0%1%
Googletontie14267%30%1%2%0%
Googlecrashreport.wmv15473%22%4%1%0%
Yahoo videoterry tate26294%5%1%0%0%
MSNtiava24298%2%0%0%0%
MSNfree porn1341297%2%0%0%0%

I did something similar last July.

Tools used: Analog to identify popular searches, search-uas.bat, make-search-ua-table.html, "View Selection Source" feature in Firefox, "sort table" bookmarklet.

Banks and https

Saturday, May 28th, 2005

Here's what happens when you go to the web pages of some large US banks, and what happens when you try changing the homepage URL from "http" to "https" or vice versa.

Bank http https
Bank One Insecure login form. Works.
Wells Fargo Insecure login form. Works.
Wachovia Insecure login form. Works.
Bank of America Insecure login form. Redirects to http.
Washington Mutual Insecure login form. Redirects to http.
US Bank Insecure login form. Error: Connection closed.
Citibank Link to secure login form at "web.da-us.citibank.com". Error: 404.
HSBC Link to secure login form at "www.ebank.us.hsbc.com". Certificate hostname mismatch.
Suntrust Redirects to https. Works.

Most of these banks make Critical SSL/TLS Mistake #1, having the login form be http and only submit to https. This protects against passive attacks, but does not protect against man-in-the-middle attacks. An attacker who can mount a passive attack can usually mount a man-in-the-middle attack with only a little more work, so these banks are barely more secure than sites that do not use https at all.

Of the banks that use https login forms at all, many make two smaller mistakes: their main page is http, which invites http links and bookmarks, and their login forms have long hostnames like "web.da-us.citibank.com", which are harder for users to verify than e.g. "www.citibank.com" or "citibank.com".

Many of the largest targets for financial fraud in the US are only defending themselves against passive attacks. Do they believe authenticated encryption isn't important in the US? Aren't these the same banks that blackmailed Mozilla developers into adding two of its most-hated features, "autocomplete=off" and "Cache-Control: no-store", claiming that any browser without these features was not secure enough for use on their sites? Banks in the US are heavily regulated, so why aren't they mandated to use https correctly?

Users either don't look for the lock icon at all, or can be tricked by the combination of a lock image and a statement in the page like "The moment you click Sign In and before your ID and passcode leave your computer, we encrypt them using Secure Sockets Layer (SSL) technology." Why is that? What can be done? What should be done?

Bash.org Instant Voting user script

Wednesday, May 25th, 2005

Bash.org Instant Voting makes the vote links on bash.org submit your vote without taking you to another page. If the server accepts your vote, the script shows the item's new score, assuming nobody else has voted on the item since you loaded the page.