1 00:00:16,700 --> 00:00:17,440 How about now? 2 00:00:21,460 --> 00:00:27,240 There we go. 3 00:00:27,320 --> 00:00:28,120 I think this will work. 4 00:00:32,480 --> 00:00:36,340 What we're going to talk about here is online corporate intelligence. 5 00:00:37,720 --> 00:00:39,900 This is something that's been in the news lately. 6 00:00:40,840 --> 00:00:45,440 How many of you, if you can see a show of hands, how many people have heard of the policy analysis market? 7 00:00:47,660 --> 00:00:48,600 Just a few of you. 8 00:00:48,640 --> 00:00:50,060 This has been in the news lately. 9 00:00:52,380 --> 00:00:56,720 What the policy analysis market is, it's actually a DARPA program. 10 00:00:57,580 --> 00:00:59,980 And what they intended on doing, for the sake of... 11 00:01:00,000 --> 00:01:10,900 For the sake of collecting intelligence, was to have a website where people could basically place futures on things like assassinations of foreign heads of state. 12 00:01:12,440 --> 00:01:13,440 Yeah, seriously. 13 00:01:14,020 --> 00:01:15,020 Read the paper. 14 00:01:15,160 --> 00:01:15,500 It's in there. 15 00:01:17,920 --> 00:01:19,340 It did get dropped, right. 16 00:01:19,520 --> 00:01:21,240 But basically, it was a futures market. 17 00:01:21,460 --> 00:01:29,640 It was basically the Pentagon having a booking service, or a bookie service, where you could place a bet on... 18 00:01:30,220 --> 00:01:37,240 You know, when the next terrorist attack was going to be, and what it would be, you know, who's the next assassination, that kind of thing. 19 00:01:39,620 --> 00:01:40,540 It's kind of interesting. 20 00:01:40,660 --> 00:01:43,140 Congress got this information two months ago. 21 00:01:43,220 --> 00:01:45,680 They just got excited about it, what, three days ago. 22 00:01:46,140 --> 00:01:51,040 But the idea here is that they were planning on using this as an intelligence source. 23 00:01:51,680 --> 00:01:54,980 And if you think about it, I think there's some credence to this. 24 00:01:55,040 --> 00:01:55,680 I think it would work. 25 00:01:56,080 --> 00:01:59,980 Unfortunately, they can't do it now because they showed their hand, and everybody knows what they're doing. 26 00:02:00,000 --> 00:02:00,560 I don't know what it is now. 27 00:02:01,440 --> 00:02:06,940 But there's another group called the Iowa Electronic Market that's been doing very similar things, 28 00:02:07,220 --> 00:02:13,860 where basically people are making book on elections, and they're taking out bids on who's going to win whatever election. 29 00:02:15,060 --> 00:02:16,600 And it's accurate. 30 00:02:17,160 --> 00:02:20,300 They're able to predict elections within 2%. 31 00:02:20,960 --> 00:02:23,180 Now, you ask yourself, why is this happening? 32 00:02:24,020 --> 00:02:26,540 Why can you get such good intelligence this way? 33 00:02:26,660 --> 00:02:27,120 Why? 34 00:02:28,800 --> 00:02:29,360 Because... 35 00:02:30,000 --> 00:02:35,220 The reason for it is, if you're doing just a generalized poll, you're asking a very broad... 36 00:02:35,220 --> 00:02:37,220 You want your group to be as broad as possible, right? 37 00:02:37,400 --> 00:02:42,320 If you're doing something like this, you're asking the specialists what's going to happen. 38 00:02:42,540 --> 00:02:44,600 And that was the government's idea as well. 39 00:02:44,900 --> 00:02:46,980 One other reason why I think this kind of thing could work. 40 00:02:47,840 --> 00:02:49,180 There's another online service. 41 00:02:49,280 --> 00:02:50,320 I can't think of the name right now. 42 00:02:50,360 --> 00:02:56,420 But basically, you can go online, and you can bet on football games or how many hurricanes we're going to get in a season, that kind of stuff. 43 00:02:57,600 --> 00:02:59,840 One of the bets they had on... 44 00:03:00,480 --> 00:03:09,940 This came up probably about five weeks into the last season of Survivor, which is a show that I follow very closely. 45 00:03:11,820 --> 00:03:15,260 Basically, people were starting to bet on who the two final survivors would be. 46 00:03:15,380 --> 00:03:16,680 And it was Matt and Jenna. 47 00:03:17,200 --> 00:03:22,480 And anyone who followed Survivor knows that Matt and Jenna were like, there's no way they're going to win. 48 00:03:22,880 --> 00:03:29,620 But there was an incredible number of people that were betting on Matt and Jenna to win and be the finalists. 49 00:03:30,000 --> 00:03:34,240 Well, the people who were running this bookmaking service said, gee, this is really odd. 50 00:03:34,500 --> 00:03:35,640 I mean, this is really odd. 51 00:03:36,080 --> 00:03:38,020 So they started to investigate it a little bit. 52 00:03:38,100 --> 00:03:42,380 And it turned out it was CBS employees who actually knew who the two finalists were going to be. 53 00:03:44,320 --> 00:03:47,620 So don't underestimate the power of collecting intelligence away. 54 00:03:47,700 --> 00:03:50,600 I think it's actually pretty clever that the military figured that one out. 55 00:03:53,060 --> 00:03:54,060 Here's what we're going to cover. 56 00:03:54,300 --> 00:03:59,980 We're going to talk about how online intelligence gathering is different from traditional intelligence gathering. 57 00:04:01,280 --> 00:04:03,860 We're going to talk about the difference between intelligence and espionage. 58 00:04:04,880 --> 00:04:08,160 We'll talk just briefly about corporate dashboards and their importance. 59 00:04:09,140 --> 00:04:11,520 I'll give you lots of tips from the field. 60 00:04:13,120 --> 00:04:16,820 I've been writing spiders and bots since about 97. 61 00:04:16,980 --> 00:04:18,240 So what is that, like six years? 62 00:04:18,820 --> 00:04:22,960 And about two years ago, I realized that what I'm really doing is corporate intelligence. 63 00:04:22,980 --> 00:04:26,460 So I can give you a few ideas of how I do some things. 64 00:04:27,780 --> 00:04:29,460 The other thing I think you should all consider. 65 00:04:30,000 --> 00:04:31,480 Especially if you're software developers. 66 00:04:31,700 --> 00:04:33,580 Is that there's an opportunity here for you. 67 00:04:36,680 --> 00:04:38,840 Those of you who are still software developers. 68 00:04:39,240 --> 00:04:40,600 After the dot-com bust. 69 00:04:40,920 --> 00:04:43,400 Should prepare yourself for the next bust. 70 00:04:45,540 --> 00:04:48,820 I spend an increasing amount of my time as a developer. 71 00:04:48,920 --> 00:04:55,780 Not developing, but managing projects that are going on in India, Romania, around the world. 72 00:04:56,400 --> 00:04:59,020 And that's a growing trend. 73 00:04:59,180 --> 00:04:59,920 So if you're a U.S. 74 00:05:00,000 --> 00:05:04,800 developer, you've got to take advantage of your market, being close to your market. 75 00:05:05,000 --> 00:05:11,920 If you're not doing that, and if you're just somebody who writes shell scripts, or you do back ends for e-commerce services. 76 00:05:13,440 --> 00:05:17,320 You're very apt to be outsourced by somebody who's charging $5 an hour. 77 00:05:17,500 --> 00:05:19,560 And every bit as competent as you are. 78 00:05:20,340 --> 00:05:21,820 I don't have a problem with that. 79 00:05:21,940 --> 00:05:28,220 I'm in favor of global economies and I have no problem with somebody in Vietnam getting paid to program. 80 00:05:28,540 --> 00:05:29,980 But it's something we all need to be able to do. 81 00:05:29,980 --> 00:05:30,560 So just be aware of that. 82 00:05:30,640 --> 00:05:32,000 The economy is changing here. 83 00:05:32,160 --> 00:05:38,320 So, there is an opportunity here because this is one area that it's very important that you're close to your market. 84 00:05:40,340 --> 00:05:41,020 Who am I? 85 00:05:41,200 --> 00:05:42,300 There's my email address. 86 00:05:43,780 --> 00:05:45,360 I've got a little consulting company. 87 00:05:45,500 --> 00:05:46,000 There's a URL. 88 00:05:46,420 --> 00:05:48,760 I write web bots and spiders for corporate clients. 89 00:05:49,960 --> 00:05:53,020 I've been kind of a DEF CON regular since DEF CON 5. 90 00:05:53,880 --> 00:05:56,480 DEF CON 5 actually covered for Computer World Magazine. 91 00:05:56,920 --> 00:05:59,200 Last year I was here and I did a. 92 00:05:59,740 --> 00:06:01,300 session on Introduction to Writing 93 00:06:01,300 --> 00:06:03,200 Spreaders and Web Agents, and 94 00:06:03,200 --> 00:06:05,320 the last time I looked, that entire session 95 00:06:05,320 --> 00:06:06,720 is online and streaming audio 96 00:06:07,460 --> 00:06:09,260 or streaming video if you go on 97 00:06:09,260 --> 00:06:10,960 the archives, DEF CON archives. 98 00:06:11,500 --> 00:06:13,240 I also write, I speak, 99 00:06:13,420 --> 00:06:14,940 and I do a little bit of teaching at some 100 00:06:14,940 --> 00:06:16,160 colleges around Minneapolis. 101 00:06:17,580 --> 00:06:17,980 Okay. 102 00:06:19,820 --> 00:06:21,200 Intelligence is information. In a 103 00:06:21,200 --> 00:06:22,540 business sense, you want to know 104 00:06:23,100 --> 00:06:25,200 what you can learn about your competition. You want 105 00:06:25,200 --> 00:06:27,020 to learn about what people know about you. 106 00:06:27,480 --> 00:06:29,060 You want to find out if people are stealing 107 00:06:29,060 --> 00:06:31,000 from you. But the most important thing 108 00:06:31,000 --> 00:06:32,920 you want to know is those 109 00:06:32,920 --> 00:06:35,000 things that you can predict. Things that haven't 110 00:06:35,000 --> 00:06:37,060 happened yet. And this is key 111 00:06:37,060 --> 00:06:38,820 here. What you need to do in order to do that 112 00:06:38,820 --> 00:06:40,880 is you need to collect a library of 113 00:06:40,880 --> 00:06:42,740 information and then look for 114 00:06:43,580 --> 00:06:44,940 anomalies. You want to look for trends. 115 00:06:45,080 --> 00:06:46,940 You want to look for changes. That's the most 116 00:06:46,940 --> 00:06:47,520 important thing. 117 00:06:49,860 --> 00:06:50,780 I like to make a few 118 00:06:50,780 --> 00:06:51,220 definitions. 119 00:06:53,380 --> 00:06:54,560 Intelligence is not necessarily 120 00:06:55,220 --> 00:06:55,580 espionage. 121 00:06:56,160 --> 00:06:57,680 You know, launching Trojans, 122 00:06:57,680 --> 00:06:59,520 that kind of stuff. It's not 123 00:06:59,520 --> 00:07:01,360 necessarily taking covert actions either, 124 00:07:01,880 --> 00:07:03,540 which is tampering with a situation 125 00:07:03,540 --> 00:07:05,540 to affect the outcome. 126 00:07:07,300 --> 00:07:07,820 I think 127 00:07:07,820 --> 00:07:09,540 it's kind of important if you're going to do this kind of stuff, 128 00:07:09,560 --> 00:07:11,380 you need to somehow set some boundaries on yourself. 129 00:07:12,000 --> 00:07:13,640 The other thing is that you don't have 130 00:07:13,640 --> 00:07:15,620 to do this stuff. You don't have to do 131 00:07:15,620 --> 00:07:17,660 espionage or covert actions to get into trouble. 132 00:07:18,080 --> 00:07:19,320 Who was it? Sean 133 00:07:19,320 --> 00:07:21,320 Gorman, I think his name was. He's a 134 00:07:21,780 --> 00:07:23,380 PhD candidate at George Mason 135 00:07:23,380 --> 00:07:23,860 University. 136 00:07:25,580 --> 00:07:27,400 He started out doing a paper where he 137 00:07:27,400 --> 00:07:29,320 looked at, he wanted to map 138 00:07:29,320 --> 00:07:31,100 the internet and see 139 00:07:32,900 --> 00:07:33,300 economically 140 00:07:33,300 --> 00:07:35,300 how areas were served or not 141 00:07:35,300 --> 00:07:37,360 served by the internet and do his thesis on that. 142 00:07:37,600 --> 00:07:39,140 What he ended up doing was 143 00:07:39,140 --> 00:07:41,280 mapping the entire fiber optic network 144 00:07:41,280 --> 00:07:43,360 in the United States, which 145 00:07:43,360 --> 00:07:45,540 became a very controversial 146 00:07:45,540 --> 00:07:47,520 thing. Not only did CEOs want to get a hold 147 00:07:47,520 --> 00:07:49,460 of it, but so did the federal government, because 148 00:07:49,460 --> 00:07:51,420 it showed a lot of vulnerabilities and it became 149 00:07:51,420 --> 00:07:53,280 a matter, they say, of national 150 00:07:53,280 --> 00:07:55,260 security. There's a lot of 151 00:07:55,580 --> 00:07:57,160 information you can get out there just by using 152 00:07:57,160 --> 00:07:58,620 traditional online methods. 153 00:08:00,580 --> 00:08:01,420 Okay, what are some 154 00:08:01,420 --> 00:08:03,200 traditional sources for collecting corporate 155 00:08:03,200 --> 00:08:04,800 intelligence? Well, you can go to conferences. 156 00:08:05,200 --> 00:08:07,300 You can go to your competition's 157 00:08:07,300 --> 00:08:09,440 booth. You can talk to people at the bar, 158 00:08:09,500 --> 00:08:11,360 that kind of stuff. You can hire your 159 00:08:11,360 --> 00:08:13,440 competition's employees, which is a very 160 00:08:13,440 --> 00:08:14,260 popular thing to do. 161 00:08:15,980 --> 00:08:17,400 Usually, any market 162 00:08:17,400 --> 00:08:19,460 will have two or three major competitors 163 00:08:19,460 --> 00:08:20,040 within it. 164 00:08:21,420 --> 00:08:23,280 Off the top of my head, I'm thinking 165 00:08:23,280 --> 00:08:25,240 Nike and Adidas are both in Portland. 166 00:08:25,580 --> 00:08:27,560 That kind of stuff. You can look up 167 00:08:27,560 --> 00:08:29,380 patent records, but that's really after 168 00:08:29,380 --> 00:08:30,540 the fact, because that means 169 00:08:31,320 --> 00:08:33,400 it's at least two years after it was filed. 170 00:08:34,260 --> 00:08:35,800 You can use secret shoppers. 171 00:08:35,820 --> 00:08:37,520 You can have people go out and look for 172 00:08:37,520 --> 00:08:38,960 price comparisons, that kind of stuff. 173 00:08:40,000 --> 00:08:41,500 You can study help-wanted ads. 174 00:08:41,740 --> 00:08:43,120 You can read trade publications. 175 00:08:43,440 --> 00:08:45,200 You can talk to vendors are a good source. 176 00:08:47,180 --> 00:08:47,660 Disadvantages 177 00:08:47,660 --> 00:08:49,620 of the traditional 178 00:08:49,620 --> 00:08:51,640 methods is that the information you're getting 179 00:08:51,640 --> 00:08:53,160 is mostly after the fact. 180 00:08:53,640 --> 00:08:55,200 These are things that already happened. 181 00:08:55,580 --> 00:08:57,100 It requires direct 182 00:08:57,100 --> 00:08:58,660 contact with your source. 183 00:08:59,780 --> 00:09:01,220 Mostly one-time activities, 184 00:09:01,400 --> 00:09:03,240 and they have to be repeated, and it's difficult to repeat 185 00:09:03,240 --> 00:09:04,620 these things, especially if you're 186 00:09:04,620 --> 00:09:07,400 doing things like stealing employees from your competition. 187 00:09:08,060 --> 00:09:09,240 Very difficult to do 188 00:09:09,240 --> 00:09:11,080 anonymously, and it can be quite expensive. 189 00:09:12,560 --> 00:09:13,420 The advantages 190 00:09:13,420 --> 00:09:15,380 of online corporate intelligence are that 191 00:09:15,380 --> 00:09:17,320 it can be done from a distance with some degree 192 00:09:17,320 --> 00:09:19,300 of stealth. You can automate it, 193 00:09:19,360 --> 00:09:21,700 and it can be done relatively anonymously. 194 00:09:21,880 --> 00:09:23,520 Those three things right there 195 00:09:23,520 --> 00:09:25,020 are also the three things that 196 00:09:25,580 --> 00:09:27,540 concern security people, because you can 197 00:09:27,540 --> 00:09:29,000 also hack. Those are three things that also 198 00:09:29,000 --> 00:09:30,680 apply directly to hacking. 199 00:09:31,980 --> 00:09:33,740 The other thing about online intelligence 200 00:09:33,740 --> 00:09:35,540 is you can reduce the latency between when 201 00:09:35,540 --> 00:09:37,560 something happens and when you know about it, so you can 202 00:09:37,560 --> 00:09:39,460 make an informed decision. It can be 203 00:09:39,460 --> 00:09:41,140 interactive. We'll talk a little bit about that. 204 00:09:42,980 --> 00:09:43,680 It's easier 205 00:09:43,680 --> 00:09:45,460 to create relevance between 206 00:09:45,460 --> 00:09:47,040 pieces of information, because typically 207 00:09:47,040 --> 00:09:49,440 everything goes into a database where you can do 208 00:09:49,440 --> 00:09:50,720 queries and that type of thing. 209 00:09:53,240 --> 00:09:53,700 It's 210 00:09:53,700 --> 00:09:55,300 important to note that gathering, 211 00:09:55,580 --> 00:09:57,080 intelligence means learning some new 212 00:09:57,080 --> 00:09:59,020 habits. Generally speaking, 213 00:09:59,680 --> 00:10:01,140 what you do with the 214 00:10:01,140 --> 00:10:02,880 internet is determined by 215 00:10:02,880 --> 00:10:05,020 the agent you're using. So if you're using 216 00:10:05,020 --> 00:10:06,920 a browser, you're going to be looking at websites, 217 00:10:07,200 --> 00:10:09,160 right? Mail clients, you're going to be reading mail. 218 00:10:09,660 --> 00:10:11,140 News readers, you're doing news. 219 00:10:11,800 --> 00:10:13,080 I suppose you could argue you can 220 00:10:13,080 --> 00:10:14,720 tell them anything of those, but people don't. 221 00:10:15,700 --> 00:10:17,080 Generally, if you want 222 00:10:17,080 --> 00:10:19,160 to have a competitive advantage, you have 223 00:10:19,160 --> 00:10:21,220 to have software written, which means typically 224 00:10:21,220 --> 00:10:22,260 web bots or spiders. 225 00:10:25,580 --> 00:10:26,800 Online corporate intelligence 226 00:10:26,800 --> 00:10:28,700 is most effective when it's automated. 227 00:10:28,980 --> 00:10:30,860 The data can be parsed and stored 228 00:10:30,860 --> 00:10:32,900 in a database. It stores 229 00:10:32,900 --> 00:10:34,740 data over a period of time, so you can 230 00:10:34,740 --> 00:10:36,760 look at trends. You create 231 00:10:36,760 --> 00:10:38,740 context by combining various data 232 00:10:38,740 --> 00:10:40,100 from a variety of sources. 233 00:10:40,540 --> 00:10:42,560 You use statistical analysis to make 234 00:10:42,560 --> 00:10:44,780 recommendations, and you should also give your 235 00:10:44,780 --> 00:10:46,640 end users some ability to make 236 00:10:46,640 --> 00:10:48,920 configurations, because you never 237 00:10:48,920 --> 00:10:50,840 really know what you're looking for until 238 00:10:50,840 --> 00:10:51,520 you've got information. 239 00:10:53,200 --> 00:10:54,720 Okay, how do you create relevance? 240 00:10:56,000 --> 00:10:58,740 You do it primarily by cross-referencing 241 00:10:58,740 --> 00:11:00,880 multiple sources. You want to gather 242 00:11:00,880 --> 00:11:02,700 information periodically, so you can look 243 00:11:02,700 --> 00:11:04,560 for trends. You want to show 244 00:11:04,560 --> 00:11:05,740 relationships between data. 245 00:11:06,700 --> 00:11:08,340 And you also want to automate it. 246 00:11:09,840 --> 00:11:10,740 Here are some 247 00:11:10,740 --> 00:11:12,340 simple sources. 248 00:11:12,740 --> 00:11:14,760 These are the first places I would look, 249 00:11:14,820 --> 00:11:16,520 in other words, to gather 250 00:11:16,520 --> 00:11:16,920 intelligence. 251 00:11:18,400 --> 00:11:20,620 Corporate websites, job postings, if 252 00:11:20,620 --> 00:11:22,120 they're current and up-to-date. 253 00:11:22,580 --> 00:11:24,740 You can study people's hiring habits 254 00:11:24,740 --> 00:11:25,560 by doing a lot of research. 255 00:11:25,580 --> 00:11:26,700 If you're doing that over the course of a 256 00:11:26,700 --> 00:11:29,180 year, you can kind of figure out what 257 00:11:29,180 --> 00:11:30,280 this company's going to be doing, 258 00:11:30,340 --> 00:11:32,740 especially if they're hiring people that 259 00:11:32,740 --> 00:11:33,900 you wouldn't expect them to be hiring. 260 00:11:34,940 --> 00:11:37,100 Product pricing. You can look at websites 261 00:11:37,100 --> 00:11:40,440 to find out pricing. Not a real 262 00:11:40,440 --> 00:11:41,600 important thing if you're selling a 263 00:11:41,600 --> 00:11:42,860 commodity, but if you're selling something 264 00:11:42,860 --> 00:11:45,800 that's kind of intangible, like hotel rooms 265 00:11:45,800 --> 00:11:46,960 or something like that, it's very 266 00:11:46,960 --> 00:11:48,800 important to do that kind of stuff. You 267 00:11:48,800 --> 00:11:50,220 could also do a clipping service type of 268 00:11:50,220 --> 00:11:52,500 thing by looking at news. Government 269 00:11:52,500 --> 00:11:54,240 websites are great places to look for 270 00:11:54,240 --> 00:11:55,560 intelligence, primarily corporate. 271 00:11:55,580 --> 00:11:59,160 Court records. It's amazing what you can 272 00:11:59,160 --> 00:12:01,180 get off the internet by looking at court 273 00:12:01,180 --> 00:12:03,640 records. I mean, people's social security 274 00:12:03,640 --> 00:12:06,680 numbers. I mean, it's all out there. So 275 00:12:06,680 --> 00:12:09,040 handle with care. SEC filings are good if 276 00:12:09,040 --> 00:12:11,300 you want to look at the economics behind 277 00:12:11,300 --> 00:12:13,220 a particular company. Again, patent 278 00:12:13,220 --> 00:12:16,980 records and census data. A few more. 279 00:12:17,060 --> 00:12:19,260 Online auctions are a great way, or a 280 00:12:19,260 --> 00:12:20,980 great thing to look at, because they can 281 00:12:20,980 --> 00:12:22,300 tell you what the true market value for 282 00:12:22,300 --> 00:12:24,560 something is. Whois servers can be 283 00:12:24,560 --> 00:12:25,560 valuable. News servers can be valuable. 284 00:12:25,580 --> 00:12:29,160 I find to be valuable as places primarily 285 00:12:29,680 --> 00:12:31,520 to get links to websites that are hard to 286 00:12:31,520 --> 00:12:35,740 find. HTTP headers. Data's not real 287 00:12:35,740 --> 00:12:37,580 important by itself, but combined with 288 00:12:37,580 --> 00:12:39,520 other stuff it can be good. And 289 00:12:39,520 --> 00:12:43,160 definitely mail. Okay. Here's some quick 290 00:12:43,160 --> 00:12:45,160 technology for how I like to set this 291 00:12:45,160 --> 00:12:47,480 kind of stuff up. If you're interested in 292 00:12:47,480 --> 00:12:49,800 the nuts and bolts of how to write a 293 00:12:49,800 --> 00:12:52,120 spider, how to write a web bot, again, I 294 00:12:52,120 --> 00:12:53,560 would recommend going back to the 295 00:12:53,560 --> 00:12:55,560 archives for DEF CON 10. I've got a lot of 296 00:12:55,560 --> 00:12:56,380 information on that, but you can go back 297 00:12:56,380 --> 00:12:58,800 to DEF CON 10 and review last year's 298 00:12:58,800 --> 00:13:01,920 presentation. This is basically what I like 299 00:13:01,920 --> 00:13:05,600 to do. I like to use a standard web host. 300 00:13:05,800 --> 00:13:07,820 It can be one of those $10, $15 a month 301 00:13:07,820 --> 00:13:10,820 types. And you use that. You write your 302 00:13:10,820 --> 00:13:12,600 spiders. But first, what you do is you 303 00:13:12,600 --> 00:13:15,180 identify your sources. And you write your 304 00:13:15,180 --> 00:13:17,020 web bot spiders and parsers, and you put 305 00:13:17,020 --> 00:13:19,440 it all off on that website. Okay? 306 00:13:20,820 --> 00:13:22,860 Something that's useful, too, that I found 307 00:13:22,860 --> 00:13:25,540 very useful is dial-in servers. And I've 308 00:13:25,540 --> 00:13:26,640 been using that a lot. If you want to 309 00:13:26,640 --> 00:13:30,180 host the stuff yourself, there are great 310 00:13:30,180 --> 00:13:31,960 things you can get by dialing into main 311 00:13:31,960 --> 00:13:33,920 frames. Sometimes with a small 312 00:13:34,520 --> 00:13:35,800 subscription fee, but there's really good 313 00:13:35,800 --> 00:13:37,760 stuff there. Incidentally, if you ever 314 00:13:37,760 --> 00:13:39,680 want to do that, the tool that I use and 315 00:13:39,680 --> 00:13:45,520 I like a lot is called COM7. So. Okay. 316 00:13:46,860 --> 00:13:48,680 So now we've got a peeing client that 317 00:13:48,680 --> 00:13:49,760 needs some way of viewing this 318 00:13:49,760 --> 00:13:51,700 information. And what I'd like to do is 319 00:13:51,700 --> 00:13:53,520 present the information in some kind of a 320 00:13:53,520 --> 00:13:55,520 protected website. And that's pretty much it. And I'll see you next time. 321 00:13:55,540 --> 00:13:56,940 And I'll show another example of that later. 322 00:13:57,160 --> 00:13:59,100 There are other ways of doing this. You can 323 00:13:59,100 --> 00:14:01,020 also email them information. You could fax 324 00:14:01,020 --> 00:14:02,760 some stuff. But I find this to be the best 325 00:14:02,760 --> 00:14:03,380 way of doing it. 326 00:14:05,880 --> 00:14:07,480 The other thing you need, and this is kind 327 00:14:07,480 --> 00:14:09,380 of key, is some kind of a scheduler, which 328 00:14:09,380 --> 00:14:11,920 is running a cron job or some kind of 329 00:14:11,920 --> 00:14:15,280 scheduled task, that goes out and contacts 330 00:14:15,280 --> 00:14:17,020 a web service. This is all on the same 331 00:14:17,020 --> 00:14:19,800 server, by the way. That contacts a web 332 00:14:19,800 --> 00:14:22,080 service that says, okay, go out and spider now. 333 00:14:26,340 --> 00:14:28,360 So quick examples of what you can do with this 334 00:14:28,360 --> 00:14:36,300 kind of stuff. Corporate dashboards are, are ways of 335 00:14:36,300 --> 00:14:39,540 letting the client that, who's buying the service, get 336 00:14:39,540 --> 00:14:41,380 the big picture of what's going on. So there's 337 00:14:41,380 --> 00:14:43,160 going to be lots of different data being presented. 338 00:14:43,520 --> 00:14:45,600 It's going to be pre-filtered. You're going to run 339 00:14:45,600 --> 00:14:48,160 statistics. And you're going to hopefully show some kind 340 00:14:48,160 --> 00:14:51,160 of trends. Also, as a developer, it creates some branding 341 00:14:51,160 --> 00:14:53,780 opportunities for me. So that's why I like doing this. 342 00:14:53,900 --> 00:14:55,520 Okay. Okay. Okay. Okay. Okay. Okay. Okay. Okay. Okay. Okay. 343 00:14:55,540 --> 00:14:55,660 Okay. Okay. Okay. Okay. Okay. Okay. Okay. Okay. 344 00:14:55,660 --> 00:15:00,660 Here's an example of one, potential one. This would be for somebody who maybe has 345 00:15:00,660 --> 00:15:04,820 a hotel. And this would be a calendar for the 346 00:15:04,820 --> 00:15:07,400 month of July. We can see we've got competitors listed here. 347 00:15:07,700 --> 00:15:10,200 And we've got their room rates listed the other way. 348 00:15:10,780 --> 00:15:14,460 Down here we've got the lowest price, highest price, average prices. 349 00:15:14,980 --> 00:15:19,560 Here's what the client's price would be. And this is their position within that 350 00:15:19,560 --> 00:15:25,320 group. Okay. This is really important kind of information. Right now, hotels, 351 00:15:25,540 --> 00:15:27,640 spend tons of money on having people call 352 00:15:27,640 --> 00:15:29,300 their competitors and say 353 00:15:29,300 --> 00:15:31,760 what's your room rate for August 16th 354 00:15:31,760 --> 00:15:33,560 it's not a real effective way of doing 355 00:15:33,560 --> 00:15:35,700 things. If you can automate this process 356 00:15:35,700 --> 00:15:37,740 it's great because then you can have a history of it 357 00:15:37,740 --> 00:15:39,600 we can go up here, we can see if 358 00:15:39,600 --> 00:15:41,660 the trends are up or down, we can drill into this 359 00:15:41,660 --> 00:15:42,920 information, look at trends 360 00:15:43,800 --> 00:15:45,380 this could be really powerful 361 00:15:45,380 --> 00:15:47,360 stuff if you also had occupancy rates 362 00:15:47,960 --> 00:15:49,800 if you had extraneous 363 00:15:49,800 --> 00:15:50,800 information like 364 00:15:51,700 --> 00:15:53,420 conventions in town or 365 00:15:54,980 --> 00:15:55,900 if there's been 366 00:15:55,900 --> 00:15:57,720 highway construction, all that kind of stuff 367 00:15:58,320 --> 00:15:59,620 or if you could tie this into 368 00:15:59,620 --> 00:16:01,700 profit and losses on their SEC filings 369 00:16:01,700 --> 00:16:02,360 too, it might be good 370 00:16:04,620 --> 00:16:05,680 here again, the key thing 371 00:16:05,680 --> 00:16:07,680 here is that you can find out where 372 00:16:07,680 --> 00:16:09,760 you are positioned within the people that 373 00:16:09,760 --> 00:16:11,360 you consider to be your competition 374 00:16:11,360 --> 00:16:12,440 and that's key 375 00:16:14,340 --> 00:16:15,340 here's a mail example 376 00:16:15,760 --> 00:16:17,480 you guys get these things? I get about 377 00:16:17,960 --> 00:16:19,380 three of these a week probably 378 00:16:19,380 --> 00:16:21,760 where someone's trying to spoof my eBay account 379 00:16:22,340 --> 00:16:23,340 where they tell me that 380 00:16:23,340 --> 00:16:25,760 there's been a change and I need to enter my ID and password 381 00:16:25,760 --> 00:16:27,100 you guys have seen these, right? 382 00:16:27,560 --> 00:16:29,680 if I were eBay, I would have a whole bunch of 383 00:16:29,680 --> 00:16:31,420 mail servers sitting out there that basically 384 00:16:31,420 --> 00:16:32,600 collect this kind of stuff 385 00:16:32,600 --> 00:16:35,380 I love this one, dear eBay member, your account 386 00:16:35,380 --> 00:16:37,560 has been chosen accidentally 387 00:16:37,960 --> 00:16:39,540 since there are a lot of cases of 388 00:16:39,540 --> 00:16:41,540 cheating, we'd like you to visit your 389 00:16:41,540 --> 00:16:43,500 account. If you're not going to do that 390 00:16:43,500 --> 00:16:45,420 your account will be removed away from our 391 00:16:45,420 --> 00:16:47,460 system site. That sounds pretty official, doesn't it? 392 00:16:47,720 --> 00:16:48,420 I love it 393 00:16:49,300 --> 00:16:51,300 here's an idea, policing 394 00:16:51,300 --> 00:16:51,960 the internet 395 00:16:53,380 --> 00:16:55,160 people who break into houses 396 00:16:55,160 --> 00:16:56,940 break into cars and steal stuff 397 00:16:56,940 --> 00:16:58,360 they want to get rid of the stuff fast 398 00:16:58,820 --> 00:17:01,340 they're not concerned about getting a market price for it 399 00:17:01,340 --> 00:17:03,100 they just want to basically fence the stuff 400 00:17:03,100 --> 00:17:04,000 and get cash 401 00:17:04,480 --> 00:17:07,040 so no surprise, a lot of people are selling stuff 402 00:17:07,040 --> 00:17:08,320 on online auctions, right? 403 00:17:08,600 --> 00:17:10,960 it's a lot of stolen merchandise being sold up there 404 00:17:10,960 --> 00:17:11,520 and it's a problem 405 00:17:13,300 --> 00:17:14,160 here's a solution 406 00:17:14,680 --> 00:17:17,060 you create an online interface that law 407 00:17:17,060 --> 00:17:18,020 enforcement can use 408 00:17:18,760 --> 00:17:20,300 and they can basically say 409 00:17:20,300 --> 00:17:21,840 when something was stolen 410 00:17:21,840 --> 00:17:23,320 and here are the things that were stolen 411 00:17:23,340 --> 00:17:26,300 you go out on ebay or any place like that 412 00:17:26,300 --> 00:17:28,300 and you look for groupings of that 413 00:17:29,240 --> 00:17:31,040 merchandise that relate to a particular 414 00:17:31,040 --> 00:17:32,200 seller, one seller 415 00:17:32,600 --> 00:17:34,100 and maybe you can even add 416 00:17:34,460 --> 00:17:36,240 the city that things were stolen from 417 00:17:38,360 --> 00:17:39,800 seems like it would be a pretty effective way 418 00:17:39,800 --> 00:17:41,260 to cut down on that kind of stuff 419 00:17:41,260 --> 00:17:43,660 because people who do that kind of stuff 420 00:17:43,660 --> 00:17:45,540 aren't that bright, they're going to try to sell it all at once 421 00:17:45,540 --> 00:17:47,960 anyway, so it's pretty easy to track them down 422 00:17:49,660 --> 00:17:50,520 here's another example 423 00:17:50,520 --> 00:17:52,020 you can find out what people are reading 424 00:17:52,020 --> 00:17:53,320 I used to do this kind of stuff all the time 425 00:17:53,340 --> 00:17:56,000 I used to work in an advanced concepts group 426 00:17:56,000 --> 00:17:59,080 for a major medical manufacturer in Minneapolis 427 00:18:00,460 --> 00:18:03,940 and one of my jobs was to evaluate emerging technologies 428 00:18:03,940 --> 00:18:04,880 the other thing I would do 429 00:18:04,880 --> 00:18:06,920 is I'd try to find out some things about the competition 430 00:18:06,920 --> 00:18:09,680 so I'd always find out what books they were reading 431 00:18:09,680 --> 00:18:13,480 and the way I would do it is with the Amazon purchase circles 432 00:18:13,480 --> 00:18:14,540 are you guys familiar with these? 433 00:18:15,160 --> 00:18:16,120 these are great 434 00:18:16,120 --> 00:18:19,360 you can find out what people are buying 435 00:18:19,680 --> 00:18:22,000 at various government institutions 436 00:18:23,340 --> 00:18:24,520 and educational institutions 437 00:18:24,520 --> 00:18:25,800 or corporations 438 00:18:25,800 --> 00:18:29,620 and there's probably thousands of them on there 439 00:18:29,620 --> 00:18:33,080 I know Amazon got a lot of heat for doing this 440 00:18:33,080 --> 00:18:34,860 I thought they weren't doing it for a while 441 00:18:34,860 --> 00:18:36,220 but now apparently they're doing it again 442 00:18:36,220 --> 00:18:37,660 so just for example 443 00:18:38,200 --> 00:18:40,340 what are the employees of Apple Computer Reading? 444 00:18:41,480 --> 00:18:42,260 let's find out 445 00:18:45,700 --> 00:18:47,760 Mac OS X in a nutshell, okay? 446 00:18:52,680 --> 00:18:53,320 no, it's not that important 447 00:18:53,320 --> 00:18:54,500 it makes sense, it makes sense 448 00:18:54,500 --> 00:18:55,260 because think about it 449 00:18:55,260 --> 00:18:57,280 they've got thousands of employees 450 00:18:57,280 --> 00:18:58,700 who are accustomed to OS 9 451 00:18:59,340 --> 00:19:01,560 you know, it's a major change for the company 452 00:19:01,560 --> 00:19:03,560 so you expect that kind of stuff 453 00:19:03,560 --> 00:19:06,040 just like you expect Mac OS X hacks 454 00:19:07,640 --> 00:19:10,420 these are probably written by Apple people anyway 455 00:19:10,420 --> 00:19:11,240 I would guess, I don't know 456 00:19:11,240 --> 00:19:12,460 this is the one that amazes me 457 00:19:12,460 --> 00:19:13,700 The Missing Manual 458 00:19:16,440 --> 00:19:17,960 that's an excellent book, by the way 459 00:19:20,160 --> 00:19:21,120 now, what's this? 460 00:19:21,320 --> 00:19:22,140 this is different 461 00:19:22,140 --> 00:19:23,220 pattern recognition 462 00:19:23,320 --> 00:19:26,120 the fourth most popular book 463 00:19:27,180 --> 00:19:29,500 purchased from a network at Apple 464 00:19:30,000 --> 00:19:31,340 was about pattern recognition? 465 00:19:33,940 --> 00:19:35,000 hmm, that's interesting 466 00:19:35,000 --> 00:19:36,340 that's the one I would look at 467 00:19:36,880 --> 00:19:38,400 I'd want to know more about that 468 00:19:38,400 --> 00:19:39,740 because obviously they're going to do something 469 00:19:41,940 --> 00:19:43,720 Harry Potter and the Order of the Phoenix 470 00:19:46,460 --> 00:19:49,060 this is how you can tell that this information is real, right? 471 00:19:51,260 --> 00:19:52,140 this is one I love 472 00:19:52,140 --> 00:19:53,300 what should I do with my computer? 473 00:19:53,320 --> 00:19:53,480 what should I do with my life? 474 00:19:57,700 --> 00:20:01,100 so honestly, if you're going to take a job at Apple 475 00:20:01,560 --> 00:20:03,120 by all means, I would recommend 476 00:20:03,120 --> 00:20:05,020 seeing what the books they're reading 477 00:20:05,020 --> 00:20:07,140 because you can find a lot about corporate culture as well 478 00:20:11,240 --> 00:20:13,100 so, okay, interactive intelligence 479 00:20:15,560 --> 00:20:17,900 it's not enough just to collect data sometimes 480 00:20:17,900 --> 00:20:18,920 and analyze it 481 00:20:18,920 --> 00:20:21,140 sometimes you actually want to take action 482 00:20:21,140 --> 00:20:22,520 on the information that you're doing 483 00:20:23,320 --> 00:20:24,660 so this would be, for example 484 00:20:25,780 --> 00:20:27,620 sniping agents, which are quite popular 485 00:20:27,620 --> 00:20:28,960 and this is basically software 486 00:20:29,460 --> 00:20:31,380 that places bids for you 487 00:20:31,380 --> 00:20:33,160 on eBay or wherever 488 00:20:33,840 --> 00:20:36,420 and the idea is that you can buy things at a lower price 489 00:20:36,420 --> 00:20:38,440 because you don't bid things up in the process 490 00:20:41,860 --> 00:20:44,280 you can write intelligent shopping software 491 00:20:44,280 --> 00:20:46,320 that not only will do the sniping action 492 00:20:46,940 --> 00:20:48,920 but you can also put in a variety of 493 00:20:48,920 --> 00:20:50,660 you can enter things that tell it 494 00:20:50,660 --> 00:20:52,000 I'm looking for this, this, and this 495 00:20:53,120 --> 00:20:55,180 and the software would go off 496 00:20:55,180 --> 00:20:56,860 and it would know what good prices are 497 00:20:56,860 --> 00:20:58,720 because it's been watching the market for a while 498 00:20:58,720 --> 00:21:01,760 so it could automatically place an order for you 499 00:21:01,760 --> 00:21:02,800 or place a bid for you 500 00:21:02,800 --> 00:21:04,380 when certain criteria are met 501 00:21:04,380 --> 00:21:06,260 so this is extremely powerful stuff 502 00:21:06,740 --> 00:21:08,040 you can use it on stocks 503 00:21:08,040 --> 00:21:09,780 you can use it on online auctions 504 00:21:10,300 --> 00:21:13,000 and you can use it on a lot of other things 505 00:21:13,000 --> 00:21:13,860 I can't tell you about 506 00:21:16,200 --> 00:21:19,380 a couple of things about online sources that are important 507 00:21:20,000 --> 00:21:21,700 it's really important to respect 508 00:21:22,000 --> 00:21:23,580 the bandwidth of your sources 509 00:21:23,580 --> 00:21:26,520 and it's also important to be as stealthy as you can 510 00:21:29,460 --> 00:21:31,260 so here's some tips 511 00:21:32,320 --> 00:21:33,960 treat their bandwidth with respect 512 00:21:35,300 --> 00:21:37,860 but the thing you want to realize there is that 513 00:21:37,860 --> 00:21:39,320 most people who 514 00:21:39,940 --> 00:21:41,560 download information from the net 515 00:21:41,560 --> 00:21:43,320 will just download the HTML 516 00:21:43,900 --> 00:21:45,940 but if you don't also download all the images 517 00:21:45,940 --> 00:21:48,580 you're going to leave really weird looking logs 518 00:21:48,580 --> 00:21:49,620 in their server files 519 00:21:49,620 --> 00:21:51,440 so you want to make sure that you also download the images 520 00:21:52,820 --> 00:21:54,180 you want to introduce some randomness 521 00:21:54,740 --> 00:21:57,420 if you've got something that's supposed to start at 8.03 every day 522 00:21:57,420 --> 00:21:59,320 don't start it at 8.03 every day 523 00:21:59,320 --> 00:22:02,020 add a little bit of variability there 524 00:22:02,880 --> 00:22:05,920 randomize the time periods between the times your web bots run 525 00:22:05,920 --> 00:22:09,960 basically you want to make it look like a person's doing this 526 00:22:11,420 --> 00:22:13,920 you want to randomize the sequence of page downloads 527 00:22:13,920 --> 00:22:15,380 if you've got a number of them that you're doing 528 00:22:16,140 --> 00:22:18,100 rotate IP addresses if possible 529 00:22:18,680 --> 00:22:20,040 and use a link proxy 530 00:22:20,040 --> 00:22:21,980 and I'll show you what a link proxy is right here 531 00:22:22,000 --> 00:22:23,720 in the earlier example 532 00:22:25,600 --> 00:22:27,060 you've already seen this right 533 00:22:27,060 --> 00:22:29,780 this is what the client might see 534 00:22:29,780 --> 00:22:30,760 this is the dashboard 535 00:22:30,760 --> 00:22:33,540 well a lot of times you might want to have a link on here 536 00:22:33,540 --> 00:22:34,640 that somehow will link 537 00:22:35,220 --> 00:22:36,740 them back to the source 538 00:22:37,340 --> 00:22:39,540 it's a useful thing for a lot of reasons 539 00:22:39,540 --> 00:22:41,340 the trouble with that is 540 00:22:41,340 --> 00:22:43,020 in this person's log 541 00:22:43,580 --> 00:22:45,780 they're going to see the address and the link 542 00:22:45,780 --> 00:22:47,560 and everything of your dashboard 543 00:22:47,560 --> 00:22:47,900 right 544 00:22:50,800 --> 00:22:51,800 because all that information 545 00:22:52,000 --> 00:22:53,120 is in your HTTP 546 00:22:54,620 --> 00:22:55,980 refer server variable 547 00:22:55,980 --> 00:22:58,460 so you don't want to do that 548 00:22:58,460 --> 00:22:59,280 what you want to do 549 00:23:00,480 --> 00:23:01,720 is you want to link 550 00:23:01,720 --> 00:23:03,900 to what I refer to as a link proxy 551 00:23:03,900 --> 00:23:04,540 first 552 00:23:05,680 --> 00:23:07,740 and the link proxy then will go out 553 00:23:07,740 --> 00:23:09,700 and grab that information and display it for you 554 00:23:10,240 --> 00:23:11,660 and what the link proxy does 555 00:23:11,660 --> 00:23:12,580 its main reason 556 00:23:12,580 --> 00:23:13,640 well it's got two reasons 557 00:23:14,200 --> 00:23:15,500 the first one is 558 00:23:16,720 --> 00:23:18,420 it removes the refer variable 559 00:23:20,000 --> 00:23:21,340 and the second thing is 560 00:23:22,520 --> 00:23:24,140 in this web file 561 00:23:24,580 --> 00:23:25,380 this web log 562 00:23:25,760 --> 00:23:27,360 you aren't going to see the IP address 563 00:23:27,360 --> 00:23:28,300 of this server 564 00:23:28,300 --> 00:23:30,640 you're going to see the IP address of this server 565 00:23:31,180 --> 00:23:31,700 right 566 00:23:33,240 --> 00:23:34,720 so here's how you do it 567 00:23:35,320 --> 00:23:37,340 if you have a link that looks something like this 568 00:23:37,340 --> 00:23:38,500 some href 569 00:23:38,500 --> 00:23:41,320 some online resource dot com 570 00:23:41,320 --> 00:23:42,680 link dot html 571 00:23:42,680 --> 00:23:45,380 you'd replace it with a link to your 572 00:23:46,540 --> 00:23:47,300 link proxy 573 00:23:47,840 --> 00:23:49,720 which I'm calling some safe place dot com 574 00:23:50,440 --> 00:23:51,560 slash link proxy 575 00:23:52,000 --> 00:23:54,020 and then you pass this url 576 00:23:54,020 --> 00:23:54,660 as a variable 577 00:23:56,560 --> 00:23:57,960 to your link proxy 578 00:23:59,580 --> 00:24:01,220 this is what the code looks like 579 00:24:01,220 --> 00:24:03,540 I tend to do all my programming 580 00:24:03,540 --> 00:24:05,740 in php mysql 581 00:24:05,740 --> 00:24:06,560 and curl 582 00:24:07,100 --> 00:24:08,700 it's a little bit of curl right here 583 00:24:10,180 --> 00:24:11,380 basically what we tell it 584 00:24:11,380 --> 00:24:13,880 we're saying this is the url that we want to download 585 00:24:14,580 --> 00:24:15,900 we don't want you to return 586 00:24:15,900 --> 00:24:16,400 the header information 587 00:24:16,980 --> 00:24:19,500 you can add username and password stuff if you want 588 00:24:19,500 --> 00:24:21,740 this line is really important because here we're basically 589 00:24:22,000 --> 00:24:23,200 clearing out the referrer 590 00:24:23,200 --> 00:24:25,800 and if you want to 591 00:24:25,800 --> 00:24:28,160 you can tell it that you're not some crazy web bot 592 00:24:28,160 --> 00:24:29,020 you're really mozilla 593 00:24:30,360 --> 00:24:31,840 and then you execute that 594 00:24:31,840 --> 00:24:33,000 the other thing that's important 595 00:24:33,000 --> 00:24:35,420 if you want your links to work on what you just downloaded 596 00:24:35,420 --> 00:24:37,860 then you need to add a base 597 00:24:38,780 --> 00:24:39,900 html tag in your header 598 00:24:41,740 --> 00:24:42,140 alright 599 00:24:42,900 --> 00:24:43,300 alright 600 00:24:44,160 --> 00:24:45,300 that's the end of my presentation 601 00:24:46,300 --> 00:24:47,720 if you have questions 602 00:24:47,720 --> 00:24:49,040 this would be a good time for them 603 00:24:49,040 --> 00:24:51,780 otherwise I'm going to hang out around the pool for a while 604 00:24:52,000 --> 00:24:54,300 and I'll take questions up there as well 605 00:24:54,300 --> 00:24:55,180 alright 606 00:24:55,180 --> 00:24:55,820 yes 607 00:25:04,500 --> 00:25:05,100 yeah 608 00:25:10,320 --> 00:25:10,920 basically 609 00:25:12,180 --> 00:25:13,460 if they post 610 00:25:13,460 --> 00:25:14,920 they don't want you to do it 611 00:25:14,920 --> 00:25:20,160 I don't know what legal standing that has 612 00:25:20,960 --> 00:25:21,980 before you start 613 00:25:22,000 --> 00:25:23,080 if you start using a web source 614 00:25:23,080 --> 00:25:25,080 and reselling the information at the very least 615 00:25:25,080 --> 00:25:26,060 you want to check copyright 616 00:25:26,600 --> 00:25:28,040 and you also want to check out 617 00:25:28,960 --> 00:25:29,840 terms of use