So this is about the Google toolbar and the midget porn. So if you're into either one of those two things, you should stick around. If you're not, well, actually, there's, we're talking about XML and bash and sending some code to Google as well. So all right, so midget porn, Google toolbar, XML, bash, Python. If any of those things interest you, then this is the right place. Okay, so the Google, right? What would we ever do without these guys? What did we do before we had Google? The Google toolbar specifically, what problem does this thing solve for us? So if you're a geek, if you've got a computer in front of you, you probably have a million bookmarks, right? And you have a million at home, you have a million at work. They're the geek tool. So they're everywhere on the go. So Google toolbar sure seems like the solution, right? Or as we're going to talk about here, is it really just a tease? You probably think, or probably like most people, that of course it's good, right? It's free. You can download it with Adobe. It's free. You can download it with Adobe. There's no problem. It just installed, showed my browser. I can start using it. No big deal, right? So of course it's good. Install is easy. It stores all your bookmarks. You can access them wherever you want, whenever you want. No more lost bookmarks, right? Some days they just store it better than others. So time passes if you're like an ordinary person and you discover things out on the Internet or elsewhere and you bookmark your discoveries and of course now you're happy, right? And if you're like this guy, you may accidentally or on purpose put on your special shirt and have a special night all to yourself. So the specific function of my talk here is to make you aware of some things you may not be aware of if that is your lifestyle of choice. And what the corporate side of this may look like to you. So the next day at work after your special night, you get in and you log into Google, of course, and use your toolbar with all your handy bookmark links. Now, if you're like most organizations, you probably have a computer security department. And if you're like most organizations, that department probably watches what you do or at least what they think you're doing or your computer is doing and they associate that with you. Now, they may watch you very closely. They may have web proxies in place. They may have web filtering. They may have web reporting in place. Depending on how much you're doing, how much diligence they apply to their web reporting, they may actually let your manager take a look at your usage and how technically proficient do you really think your manager is in looking at usage and figuring out whether it was you or whether it was your computer or whether it was something else. So I'm going to temp fade again and change some screens around and see if we can do, see what happens when we actually access the Google toolbar. So I'm going to go ahead and do that. Okay. So, hey, this is working finally. Okay. So here we have a Windows box, just a VM on my station and then we've got our little my box here that's going to be our attacker. So let's show you what I'm going to run. So I'm just going to run a quick little T shark command to grab traffic on this interface that this guy happens to be listening to. And then we're going to go out and access the, you know, the Google toolbar. Hopefully you can see some of this stuff. If you can't, if you're really interested, come see me after this and I'll show you in person. So we're going to log in to Google in the Google toolbar. I'm going to choose stay signed in. If you watch down here on the bottom, hopefully you can see this. If you're in the back, you're probably going to have some trouble. So move up front because there's lots of spaces. So we're going to go out and access the bookmarks. So here's three bookmarks that I've got for DEF CON. FreakyMaker, FreakyMaker, FreakyMaker, FreakyMaker, FreakyMakers. So you can see right now it's a lot of different images. That's what I like. Not really. Just the research for this, you'd wouldn't want to be with me when I had to do it. Anyway, and Yahoo, right? You don't see any traffic down on the bottom so far and we also don't have any, in this case we're looking for favorite icon hits. So we don't have any right now. And as a user we're going to go what's wrong with that? Maybe oops. Let's do it again here. Do refresh is what I meant to hit. Refresh, we still don't see anything down the bottom. When you do a third click it will go up. When you do the third refresh, then you start to see the favorite icon hits down in the browser below. So this is, you haven't actually hit anything from any website yet and the Google toolbar is going out on your behalf and retrieving the favorite icons for all the sites in your list no matter where you have them in your list. All right. So again what we saw, I put this in here just in case my demo didn't work. So for every UR, every bookmark you've got, the Google toolbar attempts to hit to the favorite icon.gif or favorite icon.url file. Why does it do this? There's an XML structure that we'll look at in just a little bit associated with the bookmarks. See I told you there was more than midget porn, there's XML. If you look into the XML structure on here, you can see there's an attribute for the favorite icon itself. Where is it down here? In this case it's freaky midgets favicon.icons. So the toolbar knows that you've got this at one point in time and it's going to go out there and try to retrieve it for you again. And at this point in the talk you're probably saying well that's fascinating. Of course that's what it does. Why is that of any interest at all? So back to the corporate security department that we've got. Remember they're watching you. So in the case where you have bookmarks at your home that you may not want anyone to know about at your corporate environment, the Google toolbar is still there. So you're still letting everyone know just even via the favorite icons and we'll look at some other ways to let people know. All the sites that you've got bookmarked in there. And I've seen this in investigations which is what led me to this talk where you investigate someone and you go why is this guy looking at porn? It happens every, you know, there's a timed refresh associated with this. It happens every X number of hours. I forget the exact interval. All of a sudden there's all these favorite icon hits to a variety of porn sites in there. And you go this then why? So when they say why, what's the next thing they're going to do? They're going to go investigate you. And let's take a look at what they'll see. So if they have a blue code proxy in place, they may run this little one liner. I just put this in there in case you didn't already know about this. And you have a blue code proxy, you can use this to get at traffic. And for index.dat files, we won't actually see anything because it's not the Internet Explorer that generated it. It's the Google toolbar itself as you can see in the user agent down here below. So are there workarounds for this situation? Well, there are some Firefox plug-ins that seem like they'd be helpful. There's a places pack from Andy Halford. Sync places, check places, sort places. And they allow you to send bookmarks to different places, package them up, ship them out over HTTP, HTTPS, all that in a variety of formats. And they look like they'd be useful because they seem to solve this favorite icon issue and storing it actually in binary in part of the JSON file. But the gotcha here is that, you know, if you don't have a Google tool bar, you can't see it. So it's a little bit complicated. But any time you import bookmarks, especially I tested this in Firefox, it still does exactly the same thing. It still tries to retrieve all the favorite icons just like the Google tool bar. So what do you do? Duh, stop looking at porn. Or go back to the good old days when you can carry it around in your floppy disks. Or if you're just determined to have it, you can straighten up the JSON, you can get it all neat and remove the bookmarks that you may not want someone else to see. And then write some script. You know, the computer is going to be carrying it back and forth. So enough about that. What else can we do with all this information? Well, here's a normal user agent from a browser, right? You see it's Mozilla 4, IE 6, and even says Google tool bar 6.4. But let's look at a user agent from the Google tool bar itself. Google tool bar 6.4.13211731. It also tells you the exact version of Microsoft Internet Explorer. So obviously once you know a little bit more information, you can start to figure out what vulnerabilities that guy's got on him. And what else can we do with this? If you can actually get at the XML, I thought to myself, you could do some tag cloud bookmarking if you're just sitting on your copy shop Wi-Fi and looking at that. So I took some time with Python and created a new tool to see what I could get out of that. So here I got a bunch of PCAP files and I'm going to run this tool against those. Let me do it over here. Since for some reason I have multiple million screens. And so there's this G2 bar snoop that I wrote that's in the DEF CON CD. I'll post this as an updated version of it. Actually, I'll post it on my website, ponelabs.com after the talk. So you just give the name of the file. And then you're going to go ahead and select the file. In this case, I'm going to choose a pre-prepared, just one I captured as I happen to be accessing the bookmarks. And you can tell what you want to dig out of it. We'll go right for the money here and pull out the XML structure of the bookmarks that happen to be transferred back and forth on that. You can give it other things you want also. There's an e-mail address associated with it. So in this case, you can see I added DEF CON 18 at ponelabs.com. That's in there. You can just pull out favorite icons. Oops. That's actually icons. And then you can see what you want to do. And then you can see what I have as icons. I think I would know that. And one more thing you can do with this, let's say in this case we have one without any bookmarks. So none in there. It turns out if you can gather the cookies associated with this traffic on there, you can just send those cookies back to Google and they'll cough up the bookmarks associated with it. So I wrote a module for this. I'll show you that. And then you can I call it the cookie missile. In this case, like I showed you, there aren't really any bookmarks in this file. But I do have the cookie. Hopefully this works. Yes. We get the XML back from Google. Here's a PCAP file. No bookmarks in it. All I have is cookies and user agent headers. Send that back to Google and they cough up the user's bookmarks associated with that. So you can find out what someone's got in their bookmarks. That was the demo. What else happens to be in here? See if I've got some more time. I think I do. There's deleted bookmarks. So let's look at an allocated bookmark. In this case, this is the URL structure for it. If you look at a deleted bookmark structure, it has what I call this special K label. Because I don't know what else to call it. Labels are what they give to things for, like, if you made a not safe for work folder, they would call that a label. In this case, this bookmark has a special K label assigned to it. And then they also have a favorite icon. I don't know if you've seen that. This is just a UNIX epic time time stamp. You can throw this into awk or whatever and pull out just the time when that was actually allocated. So if you're a forensic guy and you want to know when someone last accessed something, you can pull out their XML. You can just find a cookie, send it up to Google. They'll send you back all the deleted bookmarks and the last time the guy accessed it. So depending on how you use the Google toolbar and your work life home balance habits and your corporate environment, this may be shocking to you. This may be sad. You may have to give up some sites or your use of the Google toolbar. Or you may choose to not use the Google toolbar anymore. Or you may choose to give up porn. I don't know. The point of it is to make you aware of some issues with the Google toolbar, especially the privacy issues associated with it. If you weren't aware before, because I can tell you from experience that some people who use it aren't aware and they end up getting themselves in some embarrassing situations. So be in the Q&A section if you have anything later. Just get a beer and talk about it if you want. No midgets were harmed in this presentation. And enjoy the rest of your time at DEF CON. Thanks.