1 00:00:00,000 --> 00:00:03,200 So this is about the Google toolbar and the midget porn. So 2 00:00:03,200 --> 00:00:04,920 if you're into either one of those two things, you should 3 00:00:04,920 --> 00:00:08,400 stick around. If you're not, well, actually, there's, we're 4 00:00:08,400 --> 00:00:12,520 talking about XML and bash and sending some code to Google as 5 00:00:12,520 --> 00:00:16,100 well. So all right, so midget porn, Google toolbar, XML, bash, 6 00:00:16,260 --> 00:00:18,740 Python. If any of those things interest you, then this is the 7 00:00:18,740 --> 00:00:23,520 right place. Okay, so the Google, right? What would we 8 00:00:23,520 --> 00:00:26,100 ever do without these guys? What did we do before we had 9 00:00:26,100 --> 00:00:30,280 Google? The Google toolbar specifically, what problem does 10 00:00:30,280 --> 00:00:34,200 this thing solve for us? So if you're a geek, if you've got a 11 00:00:34,200 --> 00:00:36,120 computer in front of you, you probably have a million 12 00:00:36,120 --> 00:00:38,560 bookmarks, right? And you have a million at home, you have a 13 00:00:38,560 --> 00:00:41,280 million at work. They're the geek tool. So they're everywhere 14 00:00:41,280 --> 00:00:44,060 on the go. So Google toolbar sure seems like the solution, 15 00:00:44,260 --> 00:00:47,340 right? Or as we're going to talk about here, is it really 16 00:00:47,340 --> 00:00:52,240 just a tease? You probably think, or probably like most 17 00:00:52,240 --> 00:00:54,300 people, that of course it's good, right? It's free. You can 18 00:00:54,720 --> 00:00:56,080 download it with Adobe. It's free. You can download it with 19 00:00:56,100 --> 00:00:59,380 Adobe. There's no problem. It just installed, showed my 20 00:00:59,380 --> 00:01:02,800 browser. I can start using it. No big deal, right? So of course 21 00:01:02,800 --> 00:01:05,620 it's good. Install is easy. It stores all your bookmarks. You 22 00:01:05,620 --> 00:01:08,000 can access them wherever you want, whenever you want. No 23 00:01:08,000 --> 00:01:10,720 more lost bookmarks, right? Some days they just store it better 24 00:01:10,720 --> 00:01:15,920 than others. So time passes if you're like an ordinary person 25 00:01:15,920 --> 00:01:18,900 and you discover things out on the Internet or elsewhere and 26 00:01:18,900 --> 00:01:21,620 you bookmark your discoveries and of course now you're happy, 27 00:01:21,740 --> 00:01:25,860 right? And if you're like this guy, you may accidentally 28 00:01:25,860 --> 00:01:30,820 or on purpose put on your special shirt and have a special 29 00:01:30,820 --> 00:01:39,500 night all to yourself. So the specific function of my talk 30 00:01:39,500 --> 00:01:41,700 here is to make you aware of some things you may not be 31 00:01:41,700 --> 00:01:45,860 aware of if that is your lifestyle of choice. And what 32 00:01:45,860 --> 00:01:50,500 the corporate side of this may look like to you. So the next 33 00:01:50,500 --> 00:01:53,440 day at work after your special night, you get in and you log 34 00:01:53,440 --> 00:01:55,820 into Google, of course, and use your toolbar with all your 35 00:01:55,860 --> 00:02:00,320 handy bookmark links. Now, if you're like most organizations, 36 00:02:00,540 --> 00:02:03,260 you probably have a computer security department. And if 37 00:02:03,260 --> 00:02:07,060 you're like most organizations, that department probably watches 38 00:02:07,060 --> 00:02:10,920 what you do or at least what they think you're doing or your 39 00:02:10,920 --> 00:02:13,940 computer is doing and they associate that with you. Now, 40 00:02:14,640 --> 00:02:18,460 they may watch you very closely. They may have web 41 00:02:18,460 --> 00:02:21,020 proxies in place. They may have web filtering. They may have 42 00:02:21,020 --> 00:02:25,840 web reporting in place. Depending on how much you're 43 00:02:25,840 --> 00:02:27,500 doing, how much diligence they apply to their web reporting, 44 00:02:29,180 --> 00:02:31,420 they may actually let your manager take a look at your 45 00:02:31,420 --> 00:02:34,520 usage and how technically proficient do you really think 46 00:02:34,520 --> 00:02:37,400 your manager is in looking at usage and figuring out whether 47 00:02:37,400 --> 00:02:39,600 it was you or whether it was your computer or whether it was 48 00:02:39,600 --> 00:02:45,840 something else. So I'm going to temp fade again and change some 49 00:02:45,840 --> 00:02:49,260 screens around and see if we can do, see what happens when we 50 00:02:49,260 --> 00:02:55,820 actually access the Google toolbar. So I'm going to 51 00:02:55,840 --> 00:02:58,300 go ahead and do that. Okay. So, hey, this is working finally. 52 00:02:58,520 --> 00:03:03,140 Okay. So here we have a Windows box, just a VM on my station and 53 00:03:03,140 --> 00:03:07,820 then we've got our little my box here that's going to be our 54 00:03:07,820 --> 00:03:14,380 attacker. So let's show you what I'm going to run. So I'm just 55 00:03:14,380 --> 00:03:19,640 going to run a quick little T shark command to grab traffic on 56 00:03:20,190 --> 00:03:24,280 this interface that this guy happens to be listening to. And 57 00:03:24,280 --> 00:03:25,820 then we're going to go out and access the, you know, the 58 00:03:25,840 --> 00:03:30,740 Google toolbar. Hopefully you can see some of this stuff. If 59 00:03:30,740 --> 00:03:33,000 you can't, if you're really interested, come see me after 60 00:03:33,000 --> 00:03:36,620 this and I'll show you in person. So we're going to log 61 00:03:36,620 --> 00:03:39,900 in to Google in the Google toolbar. I'm going to choose 62 00:03:39,900 --> 00:03:43,080 stay signed in. If you watch down here on the bottom, 63 00:03:43,260 --> 00:03:46,960 hopefully you can see this. If you're in the back, you're 64 00:03:46,960 --> 00:03:48,760 probably going to have some trouble. So move up front 65 00:03:48,760 --> 00:03:52,140 because there's lots of spaces. So we're going to go out and 66 00:03:52,140 --> 00:03:54,680 access the bookmarks. So here's three bookmarks that I've got 67 00:03:54,680 --> 00:03:55,820 for DEF CON. FreakyMaker, FreakyMaker, FreakyMaker, FreakyMaker, 68 00:03:55,840 --> 00:03:56,080 FreakyMakers. So you can see right now it's a lot of 69 00:03:56,080 --> 00:03:59,800 different images. That's what I like. Not really. Just the 70 00:03:59,800 --> 00:04:02,860 research for this, you'd wouldn't want to be with me when I had to 71 00:04:02,860 --> 00:04:06,600 do it. Anyway, and Yahoo, right? You don't see any traffic 72 00:04:06,600 --> 00:04:09,660 down on the bottom so far and we also don't have any, in this 73 00:04:09,660 --> 00:04:12,500 case we're looking for favorite icon hits. So we don't have any 74 00:04:12,500 --> 00:04:15,200 right now. And as a user we're going to go what's wrong with 75 00:04:15,200 --> 00:04:22,060 that? Maybe oops. Let's do it again here. Do refresh is what I 76 00:04:22,060 --> 00:04:24,580 meant to hit. Refresh, we still don't see anything down the 77 00:04:24,580 --> 00:04:25,820 bottom. When you do a third click it will go up. When you do the 78 00:04:25,840 --> 00:04:31,160 third refresh, then you start to see the favorite icon hits down 79 00:04:31,160 --> 00:04:34,740 in the browser below. So this is, you haven't actually hit 80 00:04:34,740 --> 00:04:38,280 anything from any website yet and the Google toolbar is going 81 00:04:38,280 --> 00:04:41,060 out on your behalf and retrieving the favorite icons 82 00:04:41,060 --> 00:04:43,980 for all the sites in your list no matter where you have them in 83 00:04:43,980 --> 00:04:54,100 your list. All right. So again what we saw, I put this in here 84 00:04:54,100 --> 00:04:57,280 just in case my demo didn't work. So for every UR, every 85 00:04:57,280 --> 00:05:00,400 bookmark you've got, the Google toolbar attempts to hit to the 86 00:05:00,400 --> 00:05:05,420 favorite icon.gif or favorite icon.url file. Why does it do 87 00:05:05,420 --> 00:05:09,040 this? There's an XML structure that we'll look at in just a 88 00:05:09,040 --> 00:05:11,420 little bit associated with the bookmarks. See I told you there 89 00:05:11,420 --> 00:05:14,860 was more than midget porn, there's XML. If you look into 90 00:05:14,860 --> 00:05:17,980 the XML structure on here, you can see there's an attribute for 91 00:05:17,980 --> 00:05:21,860 the favorite icon itself. Where is it down here? In this case 92 00:05:21,860 --> 00:05:24,080 it's freaky midgets favicon.icons. 93 00:05:24,100 --> 00:05:28,520 So the toolbar knows that you've got this at one point in 94 00:05:28,520 --> 00:05:30,760 time and it's going to go out there and try to retrieve it for 95 00:05:30,760 --> 00:05:34,060 you again. And at this point in the talk you're probably saying 96 00:05:34,060 --> 00:05:36,720 well that's fascinating. Of course that's what it does. Why 97 00:05:36,720 --> 00:05:40,560 is that of any interest at all? So back to the corporate 98 00:05:40,560 --> 00:05:43,320 security department that we've got. Remember they're watching 99 00:05:43,320 --> 00:05:47,780 you. So in the case where you have bookmarks at your home that 100 00:05:47,780 --> 00:05:50,320 you may not want anyone to know about at your corporate 101 00:05:51,880 --> 00:05:54,080 environment, the Google toolbar is still there. So 102 00:05:54,080 --> 00:05:56,540 you're still letting everyone know just even via the favorite 103 00:05:56,540 --> 00:05:58,720 icons and we'll look at some other ways to let people know. 104 00:05:59,400 --> 00:06:01,720 All the sites that you've got bookmarked in there. And I've 105 00:06:01,720 --> 00:06:04,640 seen this in investigations which is what led me to this 106 00:06:04,640 --> 00:06:07,500 talk where you investigate someone and you go why is this 107 00:06:07,500 --> 00:06:10,700 guy looking at porn? It happens every, you know, there's a 108 00:06:10,700 --> 00:06:13,900 timed refresh associated with this. It happens every X number 109 00:06:13,900 --> 00:06:16,920 of hours. I forget the exact interval. All of a sudden 110 00:06:16,920 --> 00:06:20,120 there's all these favorite icon hits to a variety of porn sites 111 00:06:20,560 --> 00:06:23,060 in there. And you go this then why? 112 00:06:25,340 --> 00:06:27,600 So when they say why, what's the next thing they're going to 113 00:06:27,600 --> 00:06:30,400 do? They're going to go investigate you. And let's take 114 00:06:30,400 --> 00:06:33,880 a look at what they'll see. So if they have a blue code proxy 115 00:06:33,880 --> 00:06:37,040 in place, they may run this little one liner. I just put 116 00:06:37,040 --> 00:06:38,660 this in there in case you didn't already know about this. And you 117 00:06:38,660 --> 00:06:42,240 have a blue code proxy, you can use this to get at traffic. And 118 00:06:42,240 --> 00:06:45,760 for index.dat files, we won't actually see anything because 119 00:06:45,760 --> 00:06:48,800 it's not the Internet Explorer that generated it. It's the 120 00:06:48,800 --> 00:06:52,740 Google toolbar itself as you can see in the user agent down here 121 00:06:52,740 --> 00:06:52,960 below. 122 00:06:54,300 --> 00:06:56,860 So are there workarounds for this situation? Well, there are 123 00:06:56,860 --> 00:07:00,340 some Firefox plug-ins that seem like they'd be helpful. There's a 124 00:07:00,920 --> 00:07:03,800 places pack from Andy Halford. Sync places, check places, sort 125 00:07:03,800 --> 00:07:08,040 places. And they allow you to send bookmarks to different 126 00:07:08,040 --> 00:07:12,300 places, package them up, ship them out over HTTP, HTTPS, all 127 00:07:12,300 --> 00:07:14,680 that in a variety of formats. And they look like they'd be 128 00:07:14,680 --> 00:07:17,560 useful because they seem to solve this favorite icon issue 129 00:07:18,040 --> 00:07:20,700 and storing it actually in binary in part of the JSON file. 130 00:07:22,120 --> 00:07:24,060 But the gotcha here is that, you know, if you don't have a 131 00:07:24,080 --> 00:07:24,620 Google tool bar, you can't see it. So it's a little bit 132 00:07:24,620 --> 00:07:26,620 complicated. But any time you import bookmarks, especially I 133 00:07:26,620 --> 00:07:30,720 tested this in Firefox, it still does exactly the same thing. It 134 00:07:30,720 --> 00:07:33,500 still tries to retrieve all the favorite icons just like the 135 00:07:33,500 --> 00:07:37,460 Google tool bar. So what do you do? Duh, stop looking at porn. 136 00:07:38,020 --> 00:07:40,320 Or go back to the good old days when you can carry it around in 137 00:07:40,320 --> 00:07:46,700 your floppy disks. Or if you're just determined to have it, you 138 00:07:46,700 --> 00:07:49,000 can straighten up the JSON, you can get it all neat and remove 139 00:07:49,000 --> 00:07:52,920 the bookmarks that you may not want someone else to see. And 140 00:07:52,920 --> 00:07:54,060 then write some script. You know, the computer is going to be 141 00:07:54,080 --> 00:07:56,940 carrying it back and forth. So enough about that. What else can 142 00:07:56,940 --> 00:08:00,640 we do with all this information? Well, here's a normal user agent 143 00:08:00,640 --> 00:08:05,260 from a browser, right? You see it's Mozilla 4, IE 6, and even 144 00:08:05,260 --> 00:08:08,980 says Google tool bar 6.4. But let's look at a user agent from 145 00:08:08,980 --> 00:08:13,420 the Google tool bar itself. Google tool bar 6.4.13211731. 146 00:08:13,660 --> 00:08:15,820 It also tells you the exact version of Microsoft Internet 147 00:08:15,820 --> 00:08:18,480 Explorer. So obviously once you know a little bit more 148 00:08:18,480 --> 00:08:20,720 information, you can start to figure out what vulnerabilities 149 00:08:20,720 --> 00:08:23,980 that guy's got on him. And what else can we do with this? 150 00:08:24,680 --> 00:08:27,900 If you can actually get at the XML, I thought to myself, you 151 00:08:27,900 --> 00:08:31,360 could do some tag cloud bookmarking if you're just 152 00:08:31,360 --> 00:08:34,800 sitting on your copy shop Wi-Fi and looking at that. So I took 153 00:08:34,800 --> 00:08:38,200 some time with Python and created a new tool to see what I 154 00:08:38,200 --> 00:08:50,340 could get out of that. So here I got a bunch of PCAP files and I'm 155 00:08:50,340 --> 00:08:52,920 going to run this tool against those. Let me do it over here. 156 00:08:54,080 --> 00:08:59,860 Since for some reason I have multiple million screens. And 157 00:09:12,120 --> 00:09:14,900 so there's this G2 bar snoop that I wrote that's in the 158 00:09:14,900 --> 00:09:17,540 DEF CON CD. I'll post this as an updated version of it. 159 00:09:17,600 --> 00:09:22,200 Actually, I'll post it on my website, ponelabs.com after the 160 00:09:22,200 --> 00:09:24,060 talk. So you just give the name of the file. And then you're 161 00:09:24,080 --> 00:09:25,040 going to go ahead and select the file. In this case, I'm going 162 00:09:25,040 --> 00:09:28,960 to choose a pre-prepared, just one I captured as I happen to be 163 00:09:28,960 --> 00:09:33,360 accessing the bookmarks. And you can tell what you want to dig 164 00:09:33,360 --> 00:09:35,600 out of it. We'll go right for the money here and pull out the 165 00:09:35,600 --> 00:09:37,820 XML structure of the bookmarks that happen to be transferred 166 00:09:37,820 --> 00:09:40,780 back and forth on that. You can give it other things you want 167 00:09:40,780 --> 00:09:44,140 also. There's an e-mail address associated with it. So in this 168 00:09:44,140 --> 00:09:48,020 case, you can see I added DEF CON 18 at ponelabs.com. That's in 169 00:09:48,020 --> 00:09:53,420 there. You can just pull out favorite icons. Oops. That's 170 00:09:53,420 --> 00:09:54,060 actually icons. And then you can see what you want to do. And 171 00:09:54,060 --> 00:09:55,700 then you can see what I have as icons. I think I would know 172 00:09:55,700 --> 00:10:05,320 that. And one more thing you can do with this, let's say in this 173 00:10:05,320 --> 00:10:12,120 case we have one without any bookmarks. So none in there. It 174 00:10:12,120 --> 00:10:15,640 turns out if you can gather the cookies associated with this 175 00:10:17,380 --> 00:10:19,440 traffic on there, you can just send those cookies back to 176 00:10:19,440 --> 00:10:22,240 Google and they'll cough up the bookmarks associated with it. So 177 00:10:22,240 --> 00:10:24,040 I wrote a module for this. I'll show you that. And then you can 178 00:10:24,060 --> 00:10:28,420 I call it the cookie missile. In this case, like I showed you, 179 00:10:28,440 --> 00:10:31,060 there aren't really any bookmarks in this file. But I do 180 00:10:31,060 --> 00:10:35,260 have the cookie. Hopefully this works. Yes. We get the XML back 181 00:10:35,260 --> 00:10:38,260 from Google. Here's a PCAP file. No bookmarks in it. All I have 182 00:10:38,260 --> 00:10:41,580 is cookies and user agent headers. Send that back to 183 00:10:41,580 --> 00:10:44,200 Google and they cough up the user's bookmarks associated with 184 00:10:44,200 --> 00:10:46,900 that. So you can find out what someone's got in their 185 00:10:46,900 --> 00:10:52,620 bookmarks. That was the demo. What else happens to be in 186 00:10:52,620 --> 00:10:57,300 here? See if I've got some more time. I think I do. There's 187 00:10:57,300 --> 00:11:00,720 deleted bookmarks. So let's look at an allocated bookmark. In 188 00:11:00,720 --> 00:11:03,360 this case, this is the URL structure for it. If you look at 189 00:11:03,360 --> 00:11:06,340 a deleted bookmark structure, it has what I call this special K 190 00:11:06,340 --> 00:11:10,080 label. Because I don't know what else to call it. Labels are what 191 00:11:10,080 --> 00:11:13,600 they give to things for, like, if you made a not safe for work 192 00:11:13,600 --> 00:11:16,000 folder, they would call that a label. In this case, this 193 00:11:16,620 --> 00:11:21,080 bookmark has a special K label assigned to it. And then they 194 00:11:21,080 --> 00:11:22,600 also have a favorite icon. I don't know if you've seen that. 195 00:11:22,600 --> 00:11:26,880 This is just a UNIX epic time time stamp. You can throw this 196 00:11:26,880 --> 00:11:31,660 into awk or whatever and pull out just the time when that was 197 00:11:31,660 --> 00:11:33,860 actually allocated. So if you're a forensic guy and you want to 198 00:11:33,860 --> 00:11:36,200 know when someone last accessed something, you can pull out 199 00:11:36,200 --> 00:11:39,140 their XML. You can just find a cookie, send it up to Google. 200 00:11:39,260 --> 00:11:41,400 They'll send you back all the deleted bookmarks and the last 201 00:11:41,400 --> 00:11:46,720 time the guy accessed it. So depending on how you use the 202 00:11:46,720 --> 00:11:51,980 Google toolbar and your work life home balance habits and 203 00:11:51,980 --> 00:11:55,320 your corporate environment, this may be shocking to you. This 204 00:11:55,320 --> 00:11:59,200 may be sad. You may have to give up some sites or your use of the 205 00:11:59,200 --> 00:12:03,560 Google toolbar. Or you may choose to not use the Google 206 00:12:03,560 --> 00:12:07,020 toolbar anymore. Or you may choose to give up porn. I don't 207 00:12:07,020 --> 00:12:11,380 know. The point of it is to make you aware of some issues with 208 00:12:11,380 --> 00:12:13,640 the Google toolbar, especially the privacy issues associated 209 00:12:13,640 --> 00:12:16,380 with it. If you weren't aware before, because I can tell you 210 00:12:16,380 --> 00:12:18,760 from experience that some people who use it aren't aware and they 211 00:12:18,760 --> 00:12:21,960 end up getting themselves in some embarrassing situations. So 212 00:12:23,460 --> 00:12:26,160 be in the Q&A section if you have anything later. Just get a 213 00:12:26,160 --> 00:12:28,940 beer and talk about it if you want. No midgets were harmed in 214 00:12:28,940 --> 00:12:31,540 this presentation. And enjoy the rest of your time at DEF CON. 215 00:12:31,700 --> 00:12:31,960 Thanks.