<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>XSS abusing firefox password manager</title>
        <description>[url=http://ha.ckers.org/blog/20060821/stealing-user-information-via-automatic-form-filling/]As RSnake theorised[/url], XSS can indeed be made to steal the plaintext passwords, and just to be the first person to do it (afaik) I stayed up all night, going down a fair few dead ends, to complete it.

Have a read of this: http://www.criticalsecurity.net/index.php?s=&amp;showtopic=15791&amp;view=findpost&amp;p=92791

I didn't do it exactly like the blog post said. Firstly it logs the user out, so that the login form will appear for any further page loads. Then it adds an iframe to the current page. The src of this iframe is another page on the site that is vulnerable to xss (and since the user is logged out the login form appears on that page). The XSSed code on this page starts an interval to alert the contents of the passwords box.

The vulnerable site's admin has contacted me and we'll fix the flaw later today after I've explained how it worked.

The code is messy, but I don't care much.

Unrelated: While I was playing about with that code I made this file:
http://www.whiteacid.org/HTS/IE_bug.html
IE (6 and 7) both cause errors on that page and firefox diesn't display it correctly either. The textfield shouldn't be blank, and if it is blank then the text below the textfield should also be blank. Does anyone have any idea what's going on there?</description>
        <link>http://sla.ckers.org/forum/read.php?2,131,131#msg-131</link>
        <lastBuildDate>Tue, 18 Jun 2013 20:46:22 -0500</lastBuildDate>
        <generator>Phorum 5.2.15a</generator>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,6650#msg-6650</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,6650#msg-6650</link>
            <description><![CDATA[maluc Wrote:<br />
-------------------------------------------------------<br />
&gt; well in the process of trying to detect the<br />
&gt; password manager.. which my guess is that it's not<br />
&gt; possible .. i found what looks like a reliable<br />
&gt; firefox test.<br />
&gt; http://maluc.sitesled.com/fftest.html<br />
&gt; <br />
&gt; AFAIK you aren't able to change this behavior in<br />
&gt; firefox, and are unable to add an about:config<br />
&gt; file to a local proxy, invalid filename. A proxy<br />
&gt; could filter it obviously though, and<br />
&gt; greasemonkey.<br />
&gt; <br />
&gt; Should make a thread of all reliable browser and<br />
&gt; version tests, when i compile them together.<br />
&gt; <br />
&gt; -maluc<br />
<br />
I had an idea and did my own test just for fun:<br />
http://hannil.freehostia.com/check/check.html]]></description>
            <dc:creator>hasse</dc:creator>
            <category>XSS Info</category>
            <pubDate>Sat, 10 Feb 2007 01:36:07 -0600</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,6601#msg-6601</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,6601#msg-6601</link>
            <description><![CDATA[Nice, I hadn't thought of that.]]></description>
            <dc:creator>WhiteAcid</dc:creator>
            <category>XSS Info</category>
            <pubDate>Fri, 09 Feb 2007 06:38:46 -0600</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,6597#msg-6597</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,6597#msg-6597</link>
            <description><![CDATA[maluc Wrote:<br />
-------------------------------------------------------<br />
&gt; i agree, but i'm not sure if there is a way to<br />
&gt; determine ahead of time, whether or not they use a<br />
&gt; manager .. so you would still have to logout those<br />
&gt; without managers atleast once<br />
&gt; <br />
&gt; <br />
&gt; -maluc<br />
I was rereading this thread and suddenly this popped into my head.<br />
Prior to the script injection, add a form and input named user_name or similar. <br />
<br />
&lt;form name=&quot;logtest&quot;&gt;&lt;input type=&quot;text&quot; name=&quot;username&quot;&gt;&lt;/form&gt;&lt;script blah blah<br />
<br />
The html will be loaded into the DOM, then with the script, prior to logging them out, you can check if the form logtest.username was populated by firefox/opera(If you can get them to execute the wand, or SE them into using a button like this http://operawiki.info/PowerButtons#retrievewand)/etc.]]></description>
            <dc:creator>Kyran</dc:creator>
            <category>XSS Info</category>
            <pubDate>Fri, 09 Feb 2007 00:16:44 -0600</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,2534#msg-2534</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,2534#msg-2534</link>
            <description><![CDATA[Keep in mind that xmlhttp requests can only go to pages within the same domain.]]></description>
            <dc:creator>WhiteAcid</dc:creator>
            <category>XSS Info</category>
            <pubDate>Mon, 06 Nov 2006 15:18:47 -0600</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,2533#msg-2533</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,2533#msg-2533</link>
            <description><![CDATA[@Girzi<br />
<br />
After that: Can't u just call a new xmlhttp request in the iframe to a remote php file and send the userinput?]]></description>
            <dc:creator>jungsonn</dc:creator>
            <category>XSS Info</category>
            <pubDate>Mon, 06 Nov 2006 14:04:54 -0600</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,1461#msg-1461</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,1461#msg-1461</link>
            <description><![CDATA[The buildnumber is rather useless except for personal debugging, but the version works no matter what your Opera is masked as. &quot;Identify as IE&quot; etc.]]></description>
            <dc:creator>Kyran</dc:creator>
            <category>XSS Info</category>
            <pubDate>Thu, 05 Oct 2006 10:28:13 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,1460#msg-1460</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,1460#msg-1460</link>
            <description><![CDATA[That's cute...  Well if you have any Opera specific exploits that only work in a specific version I guess we now know how to accurately figure out which is which.]]></description>
            <dc:creator>rsnake</dc:creator>
            <category>XSS Info</category>
            <pubDate>Thu, 05 Oct 2006 10:06:09 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,1448#msg-1448</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,1448#msg-1448</link>
            <description><![CDATA[Open this in Opera. <br />
http://opera.freehostia.com/versioncheck.html<br />
Should work with Opera 7.6+]]></description>
            <dc:creator>Kyran</dc:creator>
            <category>XSS Info</category>
            <pubDate>Thu, 05 Oct 2006 01:53:51 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,580#msg-580</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,580#msg-580</link>
            <description><![CDATA[Google doesn't tend to pull embedded style sheet or JavaScript at all.  Apparently it has on occation, but that's a rarity, and it doesn't act on the JavaScript even if it does pull it.]]></description>
            <dc:creator>rsnake</dc:creator>
            <category>XSS Info</category>
            <pubDate>Mon, 18 Sep 2006 10:15:39 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,579#msg-579</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,579#msg-579</link>
            <description><![CDATA[With all the support Google has given Mozilla and how occasionally a google-bots user agent appears to be firefox.. I'd say there is a good chance at least a few(we all know google is a million tiny projects thus inconsistent) of the spiders used by google are modified Firefox browsers with a custom extension.<br />
<br />
Any thoughts?]]></description>
            <dc:creator>Kyran</dc:creator>
            <category>XSS Info</category>
            <pubDate>Mon, 18 Sep 2006 01:17:29 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,574#msg-574</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,574#msg-574</link>
            <description><![CDATA[Kyran, I think you're on to something... by detecting specific extentions that are only supported by certain browsers you can really know a lot more about the user.  This is also an interesting way to detect robots that lie about what OS they are.  ;)]]></description>
            <dc:creator>rsnake</dc:creator>
            <category>XSS Info</category>
            <pubDate>Sun, 17 Sep 2006 13:27:56 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,564#msg-564</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,564#msg-564</link>
            <description><![CDATA[reliable browser testing makes me cry.. http://maluc.sitesled.com/headache.jpg<br />
<br />
not to mention safari.. although when the likes of opera/netscape/safari/etc each only have 1% of the market share, its often not worth the trouble..<br />
<br />
-maluc]]></description>
            <dc:creator>maluc</dc:creator>
            <category>XSS Info</category>
            <pubDate>Sun, 17 Sep 2006 08:12:39 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,553#msg-553</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,553#msg-553</link>
            <description><![CDATA[so perhaps the extension detection will help further define between the Gecko browsers.]]></description>
            <dc:creator>Kyran</dc:creator>
            <category>XSS Info</category>
            <pubDate>Sat, 16 Sep 2006 15:33:32 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,552#msg-552</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,552#msg-552</link>
            <description><![CDATA[Well i checked with Opera v9 and it does give a false positive.. while v8.54 does not. So might come in handy for version testing, combined with other signatures..<br />
<br />
it also is a false positive for the newest netscape alteast .. i'll try to refine it later today. On a side note, netscape also seems to support the chrome:// protocol, whereas opera does not.<br />
<br />
-maluc]]></description>
            <dc:creator>maluc</dc:creator>
            <category>XSS Info</category>
            <pubDate>Sat, 16 Sep 2006 14:40:11 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,551#msg-551</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,551#msg-551</link>
            <description><![CDATA[hrm, i tested it with opera as well, on XP SP2 version 8.54 .. maybe its since changed with version 9.<br />
<br />
what version and OS did you run it on?<br />
<br />
-maluc]]></description>
            <dc:creator>maluc</dc:creator>
            <category>XSS Info</category>
            <pubDate>Sat, 16 Sep 2006 14:17:36 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,550#msg-550</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,550#msg-550</link>
            <description><![CDATA[Opera is somewhat based off of Gecko and it gives a false positive.]]></description>
            <dc:creator>Kyran</dc:creator>
            <category>XSS Info</category>
            <pubDate>Sat, 16 Sep 2006 12:46:22 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,549#msg-549</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,549#msg-549</link>
            <description><![CDATA[Yah, I agree, that's excellent!  I hadn't thought about that one, and it's pretty definitive too.  Have you tried this under Netscape though?  It might only detect the Gecko rendering engine - not the browser itself.  I don't have Netscape installed on this machine that I'm on at the moment or I'd check myself.]]></description>
            <dc:creator>rsnake</dc:creator>
            <category>XSS Info</category>
            <pubDate>Sat, 16 Sep 2006 11:57:56 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,544#msg-544</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,544#msg-544</link>
            <description><![CDATA[That's using a similair technique to detecting IE using the res:// (ie res://C:\WINDOWS\system32\shdoclc.dll/dnserror.htm) urls that rsnake wrote about, can't find a link though. Nice one though.<br />
<br />
Good work though.]]></description>
            <dc:creator>WhiteAcid</dc:creator>
            <category>XSS Info</category>
            <pubDate>Sat, 16 Sep 2006 04:23:03 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,543#msg-543</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,543#msg-543</link>
            <description><![CDATA[well in the process of trying to detect the password manager.. which my guess is that it's not possible .. i found what looks like a reliable firefox test. http://maluc.sitesled.com/fftest.html<br />
<br />
AFAIK you aren't able to change this behavior in firefox, and are unable to add an about:config file to a local proxy, invalid filename. A proxy could filter it obviously though, and greasemonkey.<br />
<br />
Should make a thread of all reliable browser and version tests, when i compile them together.<br />
<br />
-maluc]]></description>
            <dc:creator>maluc</dc:creator>
            <category>XSS Info</category>
            <pubDate>Sat, 16 Sep 2006 02:54:11 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,537#msg-537</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,537#msg-537</link>
            <description><![CDATA[That may or may not be possible with certain versions...  one easy way to detect it is to see if the username gets popuplated or not (but that doesn't help much since I think the main problem is wether to ask the user or not at all).  One of the most popuplar password managers is google's toolbar.  Almost everyone has it installed, despite it being spyware, so it's hard to detect if they are using it or not, because lots of people have it.  So maybe there is some other way I'm not thinking of...]]></description>
            <dc:creator>rsnake</dc:creator>
            <category>XSS Info</category>
            <pubDate>Fri, 15 Sep 2006 15:46:41 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,534#msg-534</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,534#msg-534</link>
            <description><![CDATA[Perhaps there is a way to simply detect if they are using a password manager, specifically the one in Firefox(since it seems to be the main target of this) then simply not log them out if they aren't. <br />
<br />
In regards to O.P., The textbox renders correctly for me in Opera.]]></description>
            <dc:creator>Kyran</dc:creator>
            <category>XSS Info</category>
            <pubDate>Fri, 15 Sep 2006 14:35:06 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,432#msg-432</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,432#msg-432</link>
            <description><![CDATA[Ah, now I see why you are saying you wanted to log them out... you are probably right...  That would definitely speed things up.]]></description>
            <dc:creator>rsnake</dc:creator>
            <category>XSS Info</category>
            <pubDate>Sun, 03 Sep 2006 20:59:05 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,431#msg-431</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,431#msg-431</link>
            <description><![CDATA[i agree, but i'm not sure if there is a way to determine ahead of time, whether or not they use a manager .. so you would still have to logout those without managers atleast once<br />
<br />
for sites that allow auto-login via cookies, you're right that it's easy to just record their cookies and reset them afterwards to the logged-in values. So this should work well for sites like forums .. where an attacker would otherwise have to delete the cookies of a user, in order to force them to use the login form + form stealer once.<br />
<br />
-maluc]]></description>
            <dc:creator>maluc</dc:creator>
            <category>XSS Info</category>
            <pubDate>Sun, 03 Sep 2006 20:41:12 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,427#msg-427</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,427#msg-427</link>
            <description><![CDATA[You could always drop a cookie or otherwise watch their session to avoid logging them out over and over again.  There are ways around it.  ;)]]></description>
            <dc:creator>rsnake</dc:creator>
            <category>XSS Info</category>
            <pubDate>Sun, 03 Sep 2006 18:57:00 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,425#msg-425</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,425#msg-425</link>
            <description><![CDATA[Correction - This does have one benefit over form stealers .. in that for those using the password manager, you can use an invisible iframe to log them out, record their plaintext and log them back in without any user interaction (may require session fixation or updating their cookies, depending on the site) .. and the user should nevar notice she was evar logged out.  <br />
<br />
But applying that to all users.. you also succeed in repeatedly logging out those without the managers, everytime they view the XSSed page.. so the stealthiness is questionable<br />
<br />
-maluc]]></description>
            <dc:creator>maluc</dc:creator>
            <category>XSS Info</category>
            <pubDate>Sun, 03 Sep 2006 17:29:11 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,424#msg-424</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,424#msg-424</link>
            <description><![CDATA[as for preventing the password managers from storing passwords, i don't think any browsers store them for logins built with flash .. that's still probably sniffable, but that's nothing new.<br />
<br />
i dont speak ActiveScript as a second language, but i'd assume you would have to hash the name and pass with a sessionid/salt to prevent an XSS from reading it in the redirect.<br />
<br />
However, it's far easier to read the plaintext upon submission, by making a form stealer using the DOM - something i wrote last month to get the plaintext from the login of Invision PowerBoards (the SQL database only stores the md5 hash, which won't help you log into AdminPanel without bruteforcing the hash)<br />
<br />
..but i always love to learn more ways to skin my neighbors cat ^^<br />
-maluc]]></description>
            <dc:creator>maluc</dc:creator>
            <category>XSS Info</category>
            <pubDate>Sun, 03 Sep 2006 17:06:36 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,329#msg-329</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,329#msg-329</link>
            <description><![CDATA[I aim to please. ;)<br />
<br />
But to be clear, my intention definitely is not to pave the way towards any new attacks, but rather to explain the already existing holes and how they can be applied.  I'm not out creating holes (writing hole ridden software) nor am I writing attack/scanning software for the same reason.  Explaining the issue, however, is critical to fixing the holes, which is why demo software is key.  You'll notice that not a single one of the vectors on the XSS Cheat Sheet actually steal cookies or otherwise.  That part is not interesting to me.  How the vectors bypass filters definitely is, though.]]></description>
            <dc:creator>rsnake</dc:creator>
            <category>XSS Info</category>
            <pubDate>Tue, 29 Aug 2006 10:38:36 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,326#msg-326</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,326#msg-326</link>
            <description><![CDATA[hmmm, even though i had saw this earlier, the implications of this type of attack where not apparent to me...until now. <br />
<br />
Basically this technique allows you to target any website from any xss hole, not just the site with the vunerability. This means site A can be used to target site b without site C (the attackers) IP never accessing site B or even site A for that matter, and it doesn't just extend to firefox. it can be used anywhere where there is a remember my details feature.<br />
<br />
Also supposing you can ammend the source Site B at runtime, what it to stop you from injecting a cookie stealer into the source of that. so, even it their login credentials aren't present, should they be already logged in you can captcha that data as well. Or even if you can't get their user details in clear text automatically submitting the form and then stealing the cookie.<br />
<br />
@WhiteAcid and Rsnake - good work but i think you might have paved the way for a whole new phishing industry.]]></description>
            <dc:creator>digi7al64</dc:creator>
            <category>XSS Info</category>
            <pubDate>Mon, 28 Aug 2006 23:17:14 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,294#msg-294</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,294#msg-294</link>
            <description><![CDATA[Thx for the information !]]></description>
            <dc:creator>Girzi</dc:creator>
            <category>XSS Info</category>
            <pubDate>Mon, 28 Aug 2006 07:22:41 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?2,131,293#msg-293</guid>
            <title>Re: XSS abusing firefox password manager</title>
            <link>http://sla.ckers.org/forum/read.php?2,131,293#msg-293</link>
            <description><![CDATA[Ah yes, that will not work because the .js file is on a different domain to that which it is reading. Instead of injecting the code to call the .js file you're going to have to inject the code within the .js file.<br />
<br />
Let's say I was trying to insert:<br />
<pre class="bbcode">&lt;script src=&quot;http://example.com/file.js&quot;&gt;&lt;/script&gt;</pre> which contained<pre class="bbcode">alert('xss')</pre>I would instead inject<pre class="bbcode">&lt;script&gt;alert('xss')&lt;/script&gt;</pre>That way there is no problem about different domains.]]></description>
            <dc:creator>WhiteAcid</dc:creator>
            <category>XSS Info</category>
            <pubDate>Mon, 28 Aug 2006 07:10:57 -0500</pubDate>
        </item>
    </channel>
</rss>
