1 00:00:00,000 --> 00:00:07,380 Good morning. Thank you. My name is Steve Orn. I'm Director of Security Solutions in the software group at Intel. 2 00:00:07,700 --> 00:00:14,740 And today we're going to talk about SOA and XML threats, Web 2.0 threats, and a new threat model as a way of classifying them. 3 00:00:15,220 --> 00:00:19,300 So before we get moving, just a quick show of hands, how many in the audience are familiar with SOA? 4 00:00:20,940 --> 00:00:25,860 Very good. How many of you have actually played with web services, XML, or Web 2.0 applications? 5 00:00:27,340 --> 00:00:29,960 Great. So we can fly through the beginning parts. 6 00:00:31,880 --> 00:00:41,140 Quick agenda. We're going to do a quick intro to Web 2.0 and SOA, talk a little bit about the security challenge that we face when introducing these new technologies and architectures. 7 00:00:41,680 --> 00:00:53,280 Then we're going to dive into a SOA XML threat model that I've been working on with some other folks to help classify the various kinds of attacks and the kinds of threats that we're starting to see in a normal way. 8 00:00:53,780 --> 00:00:55,840 Then we'll dive into some details on verification. 9 00:00:55,860 --> 00:01:01,880 We'll talk about some of the various threats, both some that have been around for some time, as well as some new ones that we're going to be publishing here for the very first time. 10 00:01:02,480 --> 00:01:06,560 Then we'll talk about some next generation and Web 2.0 threats that we're starting to see on the horizon. 11 00:01:07,060 --> 00:01:12,600 We'll talk about the evolving enterprise and the evolving environment and how that changes the way we need to secure these applications. 12 00:01:13,320 --> 00:01:16,280 And then finish up with a summary and a little bit of Q&A if we have time. 13 00:01:16,740 --> 00:01:20,140 Otherwise, we can go to the Q&A room to continue discussions. 14 00:01:21,560 --> 00:01:25,840 So I don't think I need to tell everyone in the room, but SOA is basically a collection of services. 15 00:01:25,860 --> 00:01:28,760 It's an architecture, and it's a service orientation. 16 00:01:29,200 --> 00:01:35,620 It's a different way of deploying your applications, your functionality, your data in a form of a service or a set of services. 17 00:01:35,940 --> 00:01:42,220 And what a SOA really is at the end of the day is a way of managing, monitoring, and deploying these services in a normalized way. 18 00:01:46,000 --> 00:01:49,940 Web 2.0 has got a lot of different meanings to a lot of different people. 19 00:01:50,100 --> 00:01:52,540 It was first coined by Tim O'Reilly back in 2004. 20 00:01:53,200 --> 00:01:55,840 And at the end of the day, it's really about turning ideas. 21 00:01:55,860 --> 00:02:08,160 Isolated functionality and isolated websites and web content into a collaborative environment or into a set of services that can then be consumed by other web applications, other services, and other applications. 22 00:02:08,700 --> 00:02:17,960 So you can almost see it, you know, if you take Tim O'Reilly's concept, it's really about taking what was already out in the web and moving it to that next level of interactivity and functionality. 23 00:02:18,780 --> 00:02:20,940 It's got a whole lot of other names people call it. 24 00:02:21,080 --> 00:02:21,760 Semantic web. 25 00:02:21,960 --> 00:02:23,240 We're not going to go there today. 26 00:02:23,340 --> 00:02:25,560 We're just going to talk about the threats that are created. 27 00:02:25,860 --> 00:02:27,740 By these new kinds of architectures. 28 00:02:27,760 --> 00:02:31,480 I'll leave it to somebody else to better define Web 2.0 for us. 29 00:02:33,120 --> 00:02:35,460 Just some simple numbers about the SOA world. 30 00:02:35,700 --> 00:02:37,980 The fact of the matter is, is that SOA is happening. 31 00:02:38,140 --> 00:02:39,000 XML is happening. 32 00:02:39,700 --> 00:02:49,000 Whether you, depending on which analyst you trust, the reality is, is that a large percentage of corporate land traffic today is already XMLized. 33 00:02:49,040 --> 00:02:51,860 It's already Web 2.0 or web services based. 34 00:02:52,100 --> 00:02:54,080 And this stuff is flying around our networks. 35 00:02:54,180 --> 00:02:55,740 And in many cases, it's unchecked. 36 00:02:55,860 --> 00:02:56,640 And undocumented. 37 00:02:58,120 --> 00:03:00,320 So a lot of people ask, well, why did we go this route? 38 00:03:00,460 --> 00:03:06,220 Well, the reality of most corporate enterprises, government enterprises, is that this is what it looks like. 39 00:03:06,380 --> 00:03:16,440 A variety of different applications, data stores, middleware, clients, and servers, and databases that are all deployed over a variety of reasons for over a period of time. 40 00:03:16,660 --> 00:03:20,780 And what we're left with is this, this clodge of various different applications. 41 00:03:21,000 --> 00:03:25,840 And SOA is an attempt to rationalize this and to provide it as a structure. 42 00:03:25,860 --> 00:03:33,240 It's a structured set of services so we can get access to the original functionality and possibly do different things with it, do new application development. 43 00:03:34,960 --> 00:03:38,340 So really, where do these SOA apps and Web 2.0 data come from? 44 00:03:38,460 --> 00:03:40,140 It comes from the things that have already existed. 45 00:03:40,360 --> 00:03:43,860 And it's important to understand where these applications are coming from. 46 00:03:44,420 --> 00:03:55,060 Whether it be things like EDI replacement or a lot of the middleware decoupling of databases and client-server apps that happened in the 90s, EAI and portals, that's enterprise application integration. 47 00:03:55,180 --> 00:03:55,840 For those of you who don't know, it's a lot of different things. 48 00:03:55,860 --> 00:04:02,780 For those of you who aren't Buzzword compliant, e-commerce sites, and then the big packaged applications like enterprise resource planning, 49 00:04:03,300 --> 00:04:05,540 salesforce automation, custom relationship management. 50 00:04:05,880 --> 00:04:14,520 These large package custom applications, whether they be bought from someone like SAP or PeopleSoft or custom developed with two million dollars in a consulting firm, 51 00:04:14,740 --> 00:04:18,480 are the core of the business functionality that runs a lot of corporations. 52 00:04:19,040 --> 00:04:25,840 And it's from these various apps that web services, SOA, XMLization, and ultimately a lot of the web services are all fully decentralized. 53 00:04:25,860 --> 00:04:30,400 12 functionality is going to derive from and it's important to understand that 54 00:04:30,400 --> 00:04:33,840 that different from many of the web applications we saw in the 90s in the 55 00:04:33,840 --> 00:04:37,960 early 2000s where it was you know a web portal to maybe a banking application 56 00:04:37,960 --> 00:04:42,260 but there was always a secondary database of the way many of the things 57 00:04:42,260 --> 00:04:46,440 that are being web service enabled and turning and becoming part of our so as 58 00:04:46,440 --> 00:04:50,340 are in fact the mission critical business applications that run the very 59 00:04:50,340 --> 00:04:54,600 lifeblood of these enterprises and companies therefore any threats to these 60 00:04:54,600 --> 00:04:58,080 systems aren't just going to compromise a website sitting way out in the front 61 00:04:58,080 --> 00:05:01,680 but can go deep into the organization and deep into the application 62 00:05:01,680 --> 00:05:09,040 infrastructure there's an analyst firm called zap think that is a very good one 63 00:05:09,040 --> 00:05:13,280 if you want to learn more about so and XML and web web services they're a really 64 00:05:13,280 --> 00:05:17,680 good analyst from a couple of guys and they created this roadmap to show us 65 00:05:17,680 --> 00:05:21,400 where are we on the horizon they created a couple of years ago and the 66 00:05:21,400 --> 00:05:24,440 reality is we're right about here now if you go back to the 67 00:05:24,440 --> 00:05:24,580 you go back to the 68 00:05:24,600 --> 00:05:29,600 mid 90s it started out as web services grassroots efforts and corporations then 69 00:05:29,600 --> 00:05:33,440 we evolved and started seeing mission critical applications getting deployed 70 00:05:33,440 --> 00:05:37,780 as web services within the boundaries of the company and one of the key 71 00:05:37,780 --> 00:05:41,780 things that started to happen back in 2002 was the deployment of these soa 72 00:05:41,780 --> 00:05:45,500 pilots taking these internal web services functionalities and 73 00:05:45,500 --> 00:05:49,860 applications and starting to deploy them to our business partners deploy them to 74 00:05:49,860 --> 00:05:54,500 customers ultimately leading to a full-fledged enterprise soa and 75 00:05:54,500 --> 00:05:58,220 in-depth build-out and deployment and these soa build outs are doing more than 76 00:05:58,220 --> 00:06:01,880 just one or two business applications but it's actually cross division cross 77 00:06:01,880 --> 00:06:07,460 group application functionality being deployed much more open than many of the 78 00:06:07,460 --> 00:06:12,040 applications that ever been deployed before and where this gets us to the 79 00:06:12,040 --> 00:06:15,000 nice thing is it gets us to being able to do some really nifty things with web 80 00:06:15,000 --> 00:06:19,240 services like just in time integration like much of the web to o stuff we 81 00:06:19,240 --> 00:06:23,280 today the location services a lot of that comes from this enterprise so a 82 00:06:23,280 --> 00:06:26,820 a build-out within corporations, sort of driving the engine behind the scenes. 83 00:06:29,800 --> 00:06:34,480 This is an example of a web services stack that's actually been geared a little bit more 84 00:06:34,480 --> 00:06:39,200 for a Web 2.0 kind of environment. It may be hard to read some of the details, but in 85 00:06:39,200 --> 00:06:43,220 your slides in the CD, you can see the information. Basically, you have a series of web services 86 00:06:43,220 --> 00:06:48,400 tools written in a variety of languages that ride on top of base level support for web 87 00:06:48,400 --> 00:06:54,700 services. Things like Apache, MySQL, a lot of these are the core infrastructure that 88 00:06:54,700 --> 00:06:59,580 drives web services, and on top of the web services, you start to get things like these 89 00:06:59,580 --> 00:07:05,620 Web 2.0 concepts, whether it be rich internet applications, Ajax applications, RSS feeds, 90 00:07:05,800 --> 00:07:10,560 a lot of them build on this existing infrastructure that keeps building on top of the existing 91 00:07:10,560 --> 00:07:18,060 applications and data resources. This is just a quick overview of some of the typical kind 92 00:07:18,060 --> 00:07:18,380 of web services that we use. 93 00:07:18,400 --> 00:07:22,220 Web 2.0 server environments. There are a lot of different acronyms here. The most common 94 00:07:22,220 --> 00:07:28,000 one you will find is called LAMP, which is Linux, Apache, MySQL, and typically PHP, 95 00:07:28,200 --> 00:07:33,120 although it could mean Perl or Python as the language. That is probably the most common 96 00:07:33,120 --> 00:07:38,080 Web 2.0 environment you'll find out there. The second one is probably WAMP, which is 97 00:07:38,080 --> 00:07:42,420 the Microsoft version of that. And then there are a variety of others, depending on the 98 00:07:42,420 --> 00:07:46,900 organization that's deploying the application, what they already currently have, what they're 99 00:07:46,900 --> 00:07:48,380 familiar with. You can get a variety of different types of applications. You can get a variety 100 00:07:48,380 --> 00:07:54,280 of different names for them, from LIMP to WISC to WISP. And if you want to see the full 101 00:07:54,280 --> 00:07:59,400 details on the 40 or some odd different possible combinations, you can just go to Wikipedia 102 00:07:59,400 --> 00:08:03,640 and they have a really good listing of them. What's interesting to note is that these 103 00:08:03,640 --> 00:08:09,040 web services and Web 2.0 applications and application environments are built from these 104 00:08:09,040 --> 00:08:12,360 various different systems, and a lot of time being built by some little marketing group 105 00:08:12,360 --> 00:08:16,440 that thinks, wow, we're going to be cool and do some Web 2.0 stuff with our site, and 106 00:08:16,440 --> 00:08:17,640 have no connection to security. 107 00:08:18,380 --> 00:08:22,020 And all of the security vulnerabilities that are associated with these infrastructures 108 00:08:22,360 --> 00:08:24,920 will hold true, of course, in the Web 2.0 environment. 109 00:08:28,400 --> 00:08:31,920 Don't need to bore you with why people are doing so. I think it's pretty obvious. But 110 00:08:31,920 --> 00:08:36,920 what is important is to understand why is security so important, or more important potentially, 111 00:08:37,120 --> 00:08:42,400 in these environments than necessarily the stuff of before. Number one, it's a drastic 112 00:08:42,400 --> 00:08:47,080 and fundamental shift in the way we do authentication and authorization. No longer do we have the 113 00:08:47,080 --> 00:08:48,360 tight controls over what we're doing. Number two, it's a drastic and fundamental shift 114 00:08:48,380 --> 00:08:52,840 over who is our user domain. I can know you five people right here and give you user 115 00:08:52,840 --> 00:08:56,440 name, passwords, or certificates, and I know you and we can communicate, and I can give 116 00:08:56,440 --> 00:09:02,340 you access and authorization to do transactions because I know you. In a Web 2.0 or Web services 117 00:09:02,340 --> 00:09:07,600 world, most often, I don't know who my user community is. I may know the partner that 118 00:09:07,600 --> 00:09:11,620 they're coming in through, but more often than not, I don't have direct access to the 119 00:09:11,620 --> 00:09:16,940 authentication. I don't necessarily know what your role is at that organization, and therefore, 120 00:09:18,380 --> 00:09:21,580 we're not able to communicate and authorize transactions. We have to change. We start 121 00:09:21,580 --> 00:09:26,480 hearing concepts like federation of identity and federation of authorization has to occur. 122 00:09:26,660 --> 00:09:30,880 That's a big difference and a big shift to a lot of the infrastructure and policies 123 00:09:30,880 --> 00:09:33,440 and protocols that we already have in place. 124 00:09:34,020 --> 00:09:38,260 The other big difference, I mentioned this before and I can't iterate it enough, real 125 00:09:38,670 --> 00:09:43,600 business apps are affected. To give you an example, if a large bank had its web banking 126 00:09:43,600 --> 00:09:48,360 portal shut down by some hacker or rogue government, yes, it's going to cause some damage. But the 127 00:09:48,360 --> 00:09:51,160 Yes, maybe they'll get their name in the New York Times. 128 00:09:51,260 --> 00:09:54,600 Their stock price may take a little bit of a dump and there'll be some bad press. 129 00:09:54,780 --> 00:09:57,180 But at the end of the day, the bank still runs. 130 00:09:57,580 --> 00:09:58,700 Money still moves. 131 00:09:59,400 --> 00:10:03,340 But if the cash management system is taken out because it was web service enabled 132 00:10:03,340 --> 00:10:05,140 and someone was able to hack in through that channel, 133 00:10:05,520 --> 00:10:07,600 cash management stops running. 134 00:10:07,880 --> 00:10:09,120 Then the bank stops running. 135 00:10:09,260 --> 00:10:11,340 So it's real business applications that are affected here. 136 00:10:12,180 --> 00:10:15,980 Another key distinction in the Web2O, web services environment, 137 00:10:16,260 --> 00:10:17,940 is the problem of non-repudiation. 138 00:10:17,940 --> 00:10:20,280 We still haven't completely solved it for the web world, 139 00:10:20,460 --> 00:10:23,140 but it's that much worse when it could be an application 140 00:10:23,140 --> 00:10:27,360 or a series of applications between the end user and the ultimate transaction. 141 00:10:27,700 --> 00:10:30,160 How do I prove that you, in fact, did that transaction? 142 00:10:30,580 --> 00:10:32,300 And it has not been solved yet. 143 00:10:33,300 --> 00:10:37,800 Another key difference is the externalization of the application interfaces and functionality. 144 00:10:38,560 --> 00:10:40,260 XML is a very powerful language. 145 00:10:40,440 --> 00:10:44,640 And one of the key tenants of XML is this ability of SOAP and WSDL 146 00:10:44,640 --> 00:10:47,920 to publish the interfaces to MySQL. 147 00:10:47,940 --> 00:10:50,180 So I can send my transaction to my application, to my data, 148 00:10:50,300 --> 00:10:53,600 and give them out to the business partner, the consumer, or whoever 149 00:10:54,040 --> 00:10:56,380 that's going to ultimately go against them and write their own application. 150 00:10:57,080 --> 00:11:00,260 Well, that changes the way we have to control those application interfaces. 151 00:11:00,880 --> 00:11:03,480 Today, it's maybe four developers back in the corporation 152 00:11:03,480 --> 00:11:05,980 that have access to the protocols to talk to SAP. 153 00:11:06,240 --> 00:11:07,240 So no one really cares. 154 00:11:08,040 --> 00:11:13,660 Tomorrow, it's 100 million people that could have access to those very same interfaces. 155 00:11:14,140 --> 00:11:17,920 And the controls that we have, the physical and Internet security controls, 156 00:11:17,940 --> 00:11:20,860 that we have today just don't apply those kind of models. 157 00:11:21,400 --> 00:11:25,680 And finally, with any new technology or architecture or environment 158 00:11:25,680 --> 00:11:30,820 that we introduce into the enterprise, we add new threats that did not exist the day before. 159 00:11:31,760 --> 00:11:34,580 So, of course, many of the old threats will still work, 160 00:11:34,720 --> 00:11:36,800 but there are new threats now that we have to deal with. 161 00:11:38,580 --> 00:11:42,520 I don't think I need to convince this audience that risks are increasing. 162 00:11:43,520 --> 00:11:47,220 The problem with XML is that we have a mixed bag of standards which can be often confusing 163 00:11:47,940 --> 00:11:50,600 when we start trying to get applications and systems to talk to each other. 164 00:11:51,140 --> 00:11:55,920 One of the things about XML that's really powerful about ways of being able to make one system communicate with another, 165 00:11:56,160 --> 00:11:59,940 to deal with interoperability using things like transformation, it's really powerful. 166 00:12:00,260 --> 00:12:05,980 A challenge comes to play when I have one mechanism to secure my XML over here and a different one. 167 00:12:06,280 --> 00:12:09,660 How do I rationalize those has not yet been solved in these communities. 168 00:12:10,420 --> 00:12:12,820 Of course, we know about regulations. We know about liability. 169 00:12:13,020 --> 00:12:14,680 I don't need to convince anyone here about that. 170 00:12:17,940 --> 00:12:20,440 As I was saying before, all of the old attacks are still valid. 171 00:12:20,740 --> 00:12:24,040 Buff overflows, standard injection, denial of service, 172 00:12:24,280 --> 00:12:28,640 all that stuff that worked in the web world, worked in our networks and our operating systems, 173 00:12:28,860 --> 00:12:32,220 still works when you throw XML Web 2.0 into the bucket. 174 00:12:32,800 --> 00:12:35,960 But there are new kinds of attacks that didn't exist before, 175 00:12:36,180 --> 00:12:39,580 like entity and referral attacks, DTV and schema attacks. 176 00:12:39,840 --> 00:12:47,720 There are new challenges that we have to deal with separate from these legacy or existing threat that we have to deal with. 177 00:12:47,940 --> 00:12:53,240 And finally, we're starting to see the evolution, and again in this environment it's quicker than we've ever seen, 178 00:12:53,440 --> 00:12:56,640 of new or next generation style threats, multi-phase attacks. 179 00:12:57,160 --> 00:12:59,860 As I'll show later, one of the interesting things about XML, 180 00:13:00,380 --> 00:13:04,740 different from the web environment, is that in the web environment, I transact with a bank, 181 00:13:05,100 --> 00:13:08,100 I do the transaction, maybe I'm exposed for that period of time, 182 00:13:08,240 --> 00:13:10,160 but afterwards the transaction is over. 183 00:13:10,740 --> 00:13:15,540 In the XML world, much of the XML content, the documents, the messages stick around. 184 00:13:15,960 --> 00:13:17,880 And that means that there's the possibility of 185 00:13:17,940 --> 00:13:22,840 sort of leaving pieces behind that can be taken advantage of at a later date and time by the attacker. 186 00:13:23,000 --> 00:13:27,080 Or being able to pepper a bunch of different pieces of an attack into an organization, 187 00:13:27,860 --> 00:13:32,560 and then cause the failure at a later time when they have more than what they need 188 00:13:32,560 --> 00:13:37,540 as far as functionality that they've been able to pepper into various different XML transactions. 189 00:13:38,580 --> 00:13:42,640 The other key thing is that when we start marrying legacy applications and protocols 190 00:13:42,640 --> 00:13:46,020 that have been around for numbers of years but have been in a very tightly controlled environment, 191 00:13:46,540 --> 00:13:50,020 with web services and XML functionality coming in over the internet, 192 00:13:50,240 --> 00:13:52,740 we have new exposure points that we didn't have to deal with. 193 00:13:53,060 --> 00:13:58,280 To give you a quick example, there are about 100 known vulnerabilities in the BAPI protocol for SAP. 194 00:13:59,080 --> 00:14:00,240 No one really cares. 195 00:14:00,460 --> 00:14:03,280 And the reason is that up until today, or in these times, 196 00:14:03,920 --> 00:14:07,340 much of that protocol has been very much hidden from anyone external from the organization. 197 00:14:07,720 --> 00:14:10,900 It worked between the thick clients that were inside your organization, 198 00:14:11,160 --> 00:14:13,140 talking to the backend database on the mainframe, 199 00:14:13,320 --> 00:14:16,000 and maybe four people in your organization had any knowledge, 200 00:14:16,020 --> 00:14:18,820 that there was this thing BAPI protocol flowing across the wire. 201 00:14:19,040 --> 00:14:21,800 But it never left the organization. It never existed. 202 00:14:22,120 --> 00:14:25,920 Even when you did things like Citrix or other things to push client functionality out, 203 00:14:26,080 --> 00:14:30,420 it was already translated into some sort of TCP IP based protocol like HTTP. 204 00:14:31,480 --> 00:14:36,200 When you web service enable your SAP, now you're suddenly giving direct access to that protocol. 205 00:14:36,760 --> 00:14:40,240 Suddenly, those 100 known vulnerabilities that no one really cared about, 206 00:14:40,400 --> 00:14:42,260 you have to start to care about. 207 00:14:42,400 --> 00:14:46,000 So it changes the way that we have to protect both, not just the front end part, 208 00:14:46,020 --> 00:14:46,840 but also the backend. 209 00:14:49,460 --> 00:14:51,060 So now I want to talk about this threat model. 210 00:14:51,220 --> 00:14:53,560 And one of the things we discovered when we started doing this research 211 00:14:54,080 --> 00:14:56,380 was that there were a variety of different kinds of attacks. 212 00:14:56,680 --> 00:14:59,740 And just like we have in the web world, like the OWASP Top 10, 213 00:15:00,100 --> 00:15:03,380 we have the WASC, that's the Web Application Security Consortium, 214 00:15:03,460 --> 00:15:07,160 threat classification, there wasn't anything for XML. 215 00:15:07,380 --> 00:15:11,400 There was no way to sort of classify what kind of threat is this new attack that just got published, 216 00:15:11,540 --> 00:15:13,960 and what are some of the possible mitigations for it. 217 00:15:13,960 --> 00:15:17,460 So some work that I did along with a group called CADS, 218 00:15:17,460 --> 00:15:18,960 that's Center for Advanced Defense Studies, 219 00:15:19,100 --> 00:15:22,200 we started to put together a rationalization of these different attacks 220 00:15:22,200 --> 00:15:24,900 in a grouping that we call the SOA XML Threat Model. 221 00:15:25,140 --> 00:15:27,960 And we basically break it into four key categories. 222 00:15:28,320 --> 00:15:31,040 The first one is payload or content threats. 223 00:15:31,480 --> 00:15:35,020 This is where the web service or the XML is really a carrier. 224 00:15:35,500 --> 00:15:39,140 It's the mosquito carrying the malaria, not the malaria itself. 225 00:15:39,700 --> 00:15:42,720 And so in the case of web services, there are two flavors. 226 00:15:42,720 --> 00:15:44,820 There's backend target and end user target. 227 00:15:45,080 --> 00:15:48,400 In the case of a backend target, the goal is to get the attack 228 00:15:48,400 --> 00:15:53,420 to some sort of target application, database, or infrastructure component inside the organization. 229 00:15:53,820 --> 00:15:57,720 And you're using the web service or the XML as a means of getting it there. 230 00:15:59,040 --> 00:16:02,880 Some of the classic things like SQL injection will work here. 231 00:16:02,960 --> 00:16:06,040 The thing I just talked about, the BAPI protocol attack will work here. 232 00:16:06,280 --> 00:16:08,280 We'll discuss something called universal tunnel, 233 00:16:08,440 --> 00:16:12,020 which is a way of taking one protocol and piping it using XML 234 00:16:12,020 --> 00:16:13,860 as a way of getting it past the firewall. 235 00:16:14,880 --> 00:16:18,060 The other subcategory here is end user target. 236 00:16:18,360 --> 00:16:22,380 And that is where ultimately the XML that I'm submitting to the server 237 00:16:22,380 --> 00:16:24,720 or that I'm posting or the content that I'm posting 238 00:16:24,720 --> 00:16:28,640 will end up as XML content or as data that's going to get consumed 239 00:16:28,640 --> 00:16:30,900 by an end user in their browser. 240 00:16:31,360 --> 00:16:33,700 Think cross-site scripting as the key example here 241 00:16:33,700 --> 00:16:37,420 or a virus or some sort of malicious mobile code. 242 00:16:38,120 --> 00:16:41,200 In the case of XML, many times these applications are built 243 00:16:41,200 --> 00:16:43,620 content is collected from a variety of resources 244 00:16:43,620 --> 00:16:46,060 and stored in XML documents or XML databases. 245 00:16:46,460 --> 00:16:49,240 And then when somebody wants to go look up the information on the website 246 00:16:49,240 --> 00:16:53,320 that XML is delivered to the user and then rendered locally on the browser. 247 00:16:53,560 --> 00:16:58,520 And therefore I can convey an XML attack like cross-site scripting today 248 00:16:58,520 --> 00:17:01,380 and then six weeks later someone searches for that information 249 00:17:01,380 --> 00:17:03,220 and the XML is downloaded to their browser 250 00:17:03,220 --> 00:17:05,240 and boom, the attack will occur. 251 00:17:06,940 --> 00:17:09,300 In the case of XML misuse and abuse, 252 00:17:09,520 --> 00:17:11,020 this is where you're screwing around with 253 00:17:11,200 --> 00:17:16,060 how the XML protocols and implementations themselves work. 254 00:17:16,480 --> 00:17:19,700 There's a variety of new standards here like XPath and XQuery 255 00:17:19,700 --> 00:17:22,240 which are ways of searching for information, for instance. 256 00:17:22,560 --> 00:17:26,020 And you can misuse or abuse the functionality that's given to you 257 00:17:26,020 --> 00:17:28,820 in these applications to do some malicious things. 258 00:17:29,540 --> 00:17:31,000 It's an important point to note. 259 00:17:31,860 --> 00:17:34,720 XML and web services are a very powerful environment 260 00:17:34,720 --> 00:17:37,000 with a lot of powerful features that didn't exist 261 00:17:37,000 --> 00:17:40,120 in the standard HTTP, HTML, and JavaScript world. 262 00:17:41,200 --> 00:17:42,260 And while that power is great for developers 263 00:17:42,260 --> 00:17:43,360 and for your application functionality, 264 00:17:43,820 --> 00:17:45,420 it also is great for the hacker. 265 00:17:45,900 --> 00:17:48,520 The hacker can take advantage of those advanced functions 266 00:17:48,520 --> 00:17:50,500 to do some really powerful attacks. 267 00:17:51,600 --> 00:17:53,960 The third category we're going to talk about is structure manipulation. 268 00:17:55,520 --> 00:17:58,100 Structure manipulation is where you actually malform the XML. 269 00:17:58,700 --> 00:18:01,000 And in many cases, many of the parsers and processors 270 00:18:01,000 --> 00:18:04,440 just don't know how to handle these malformed XML documents. 271 00:18:04,880 --> 00:18:07,480 And if you actually do some very conscious malforming, 272 00:18:07,540 --> 00:18:09,440 where you actually change it in certain subtle ways, 273 00:18:09,560 --> 00:18:10,860 you can cause some serious damage. 274 00:18:11,200 --> 00:18:14,100 And finally, talk about some infrastructure attacks. 275 00:18:14,460 --> 00:18:17,460 The XML web services, because they're mission-critical applications 276 00:18:17,460 --> 00:18:20,440 behind here, many times they themselves become 277 00:18:20,440 --> 00:18:21,760 mission-critical to the organization. 278 00:18:22,340 --> 00:18:25,040 You know, if you shut down the servers that are supporting 279 00:18:25,040 --> 00:18:27,160 the web services, you're causing damage ultimately 280 00:18:27,160 --> 00:18:30,240 to that channel or that revenue generation scheme. 281 00:18:32,400 --> 00:18:35,720 So, quickly review some of the payload concepts here. 282 00:18:36,440 --> 00:18:38,920 As I said before, the back-end target is really where 283 00:18:38,920 --> 00:18:41,100 a lot of the old attacks that we've seen 284 00:18:41,200 --> 00:18:43,500 continue to be viable in an XML world. 285 00:18:43,860 --> 00:18:47,960 SQL injection, command injection, protocol manipulation, 286 00:18:48,440 --> 00:18:51,380 all of these things will work in an XML world 287 00:18:51,380 --> 00:18:55,460 where you use XML as the new carrier to get that application attack 288 00:18:55,460 --> 00:18:58,800 or that back-end or system or command injection attack 289 00:18:58,800 --> 00:19:01,080 into the organization past the firewall. 290 00:19:01,380 --> 00:19:04,360 It's important to note that most of this communication 291 00:19:04,360 --> 00:19:08,320 is happening over port 80 on the web server through the firewall. 292 00:19:08,540 --> 00:19:10,500 So all of your network firewall functionality 293 00:19:10,500 --> 00:19:14,140 is basically useless to stop these kinds of attacks. 294 00:19:14,320 --> 00:19:15,980 I'm not saying the network firewall is completely useless. 295 00:19:16,180 --> 00:19:17,300 Someone else here I'm sure has. 296 00:19:17,760 --> 00:19:20,220 But in the case of web services and Web 2.0, 297 00:19:20,340 --> 00:19:21,640 it's a Swiss cheese firewall. 298 00:19:21,800 --> 00:19:24,980 It just doesn't help because it doesn't have the content awareness 299 00:19:25,700 --> 00:19:29,860 or the application layer functionality to inspect XML traffic 300 00:19:29,860 --> 00:19:32,780 traveling over HTTP across the wire. 301 00:19:32,960 --> 00:19:35,580 So your network firewall infrastructure just isn't going to help you here. 302 00:19:35,640 --> 00:19:36,720 You're going to need something else. 303 00:19:41,020 --> 00:19:42,620 In the case of misuse and abuse, 304 00:19:42,940 --> 00:19:46,340 and I'll dive into one example, which is the XPath injection 305 00:19:46,340 --> 00:19:48,000 when we get to the details of the threats, 306 00:19:48,260 --> 00:19:50,900 you'll find that many of the legitimate features 307 00:19:50,900 --> 00:19:53,160 of these protocols and these formats, 308 00:19:53,420 --> 00:19:57,920 actually they themselves can be used to cause some significant damage. 309 00:19:58,220 --> 00:20:02,660 And because many of these protocols were designed without security in mind, 310 00:20:02,900 --> 00:20:05,040 there are no checks in many of the cases. 311 00:20:05,100 --> 00:20:07,180 You don't need to be authenticated to the web service 312 00:20:07,180 --> 00:20:10,480 to actually do some of the functions of XPath, for instance. 313 00:20:11,500 --> 00:20:13,440 What's also important to know is many of the standards, 314 00:20:13,540 --> 00:20:14,800 I'm sure you've heard of some of them, 315 00:20:14,840 --> 00:20:18,860 WS Security, XML Digital Signature, SAML, XACML, 316 00:20:19,020 --> 00:20:20,560 and a whole bunch of other acronyms 317 00:20:20,560 --> 00:20:22,400 that deal with security in these environments. 318 00:20:22,720 --> 00:20:25,780 Most of them deal with authentication and authorization. 319 00:20:26,200 --> 00:20:29,640 In essence, how do I package up my existing authentication mechanism 320 00:20:29,640 --> 00:20:33,440 in an XML way so that I can use it with this XML environment? 321 00:20:33,800 --> 00:20:37,140 What it doesn't do is help us protect that XML environment. 322 00:20:37,340 --> 00:20:39,020 It helps us use what we already have 323 00:20:39,020 --> 00:20:41,080 and try to do it in this new environment. 324 00:20:41,520 --> 00:20:43,860 We're starting to see some things around WS Policy 325 00:20:43,860 --> 00:20:45,400 to actually make it a little bit better, 326 00:20:46,200 --> 00:20:48,420 but really it doesn't address the problem of threats. 327 00:20:48,720 --> 00:20:51,820 It's all about how do I authenticate users that I may know 328 00:20:51,820 --> 00:20:53,100 or that someone else I know may know. 329 00:20:53,260 --> 00:20:55,320 It doesn't help us with any of the kinds of threats 330 00:20:55,320 --> 00:20:56,880 that we're talking about here today. 331 00:20:57,520 --> 00:20:59,640 And piping it over SSL doesn't help either. 332 00:20:59,740 --> 00:21:02,700 It just means you'll have an authenticated and secure transport attack 333 00:21:02,700 --> 00:21:03,800 coming in over the wire. 334 00:21:06,760 --> 00:21:08,920 Structure manipulation is a category 335 00:21:09,020 --> 00:21:10,260 that's got the most interest right now. 336 00:21:10,360 --> 00:21:12,260 This is where you'll see a lot of the newest attacks coming, 337 00:21:13,740 --> 00:21:14,860 and we'll go through them. 338 00:21:14,900 --> 00:21:16,780 Many of the ones that I'm going to publish for the first time today 339 00:21:17,220 --> 00:21:18,980 are actually under this category. 340 00:21:19,280 --> 00:21:22,980 And the reason is that most of the parsers and XML processors 341 00:21:22,980 --> 00:21:26,440 and XML environments that are supporting these applications 342 00:21:26,980 --> 00:21:30,000 were developed without security as part of the process. 343 00:21:30,280 --> 00:21:31,200 They weren't hardened. 344 00:21:31,380 --> 00:21:33,320 They weren't built to deal with things like buffer overflows. 345 00:21:33,500 --> 00:21:36,040 They weren't built to deal with really good error handling 346 00:21:36,620 --> 00:21:38,920 in the sense of trying to prevent these kind of structures 347 00:21:39,020 --> 00:21:39,160 from being structured attacks. 348 00:21:39,840 --> 00:21:41,720 And what you'll find a lot of times, 349 00:21:41,800 --> 00:21:44,640 this has been a big challenge even for the XML firewall vendors 350 00:21:44,640 --> 00:21:45,940 that exist out there, 351 00:21:46,080 --> 00:21:48,440 is that a structure manipulation attack 352 00:21:49,000 --> 00:21:51,980 looks a lot like a legitimate XML message. 353 00:21:52,300 --> 00:21:54,360 As a matter of fact, in many cases, 354 00:21:54,380 --> 00:21:56,660 like the Billion Laughs attack that's illustrated here, 355 00:21:56,860 --> 00:21:57,820 this is one of the older ones, 356 00:21:58,420 --> 00:22:03,280 it isn't until you get to the 128th instance of that reference 357 00:22:03,960 --> 00:22:04,800 that you have a problem. 358 00:22:04,980 --> 00:22:07,620 At number 127, everything is cool and kosher. 359 00:22:07,620 --> 00:22:09,440 The processor's chugging along. 360 00:22:09,580 --> 00:22:10,400 It's doing its job. 361 00:22:10,500 --> 00:22:11,060 No problem. 362 00:22:11,480 --> 00:22:14,400 The second it references it the 128th time, 363 00:22:15,040 --> 00:22:16,240 all things go to hell, 364 00:22:16,280 --> 00:22:18,820 and actually you get a really good denial of service of the system here. 365 00:22:19,560 --> 00:22:21,460 But up until that point, it's legitimate XML. 366 00:22:21,620 --> 00:22:22,180 Nothing wrong. 367 00:22:22,440 --> 00:22:23,600 It's only after that point. 368 00:22:24,060 --> 00:22:25,580 Or in the case of some of the other attacks, 369 00:22:25,660 --> 00:22:27,320 when you start spreading out the memory 370 00:22:27,320 --> 00:22:29,760 and actually getting the XML to do some functions for you, 371 00:22:29,900 --> 00:22:32,520 it looks exactly like a legitimate XML message. 372 00:22:32,700 --> 00:22:34,580 And it isn't until you get down the line 373 00:22:34,580 --> 00:22:36,500 where it's almost too late 374 00:22:36,500 --> 00:22:38,600 that the parser ends up in a race condition 375 00:22:38,600 --> 00:22:41,500 or ends up taking up all the available resources. 376 00:22:41,800 --> 00:22:42,840 So that's a real challenge. 377 00:22:43,040 --> 00:22:45,260 But how do you identify these things? 378 00:22:45,680 --> 00:22:47,260 And what we'll talk about a little bit later 379 00:22:47,260 --> 00:22:48,940 is that some of the way of doing that 380 00:22:49,450 --> 00:22:51,080 is about really creating tight controls 381 00:22:51,080 --> 00:22:53,060 around how XML is processed, 382 00:22:53,340 --> 00:22:57,240 making sure you use or download the right kinds of parsers 383 00:22:57,240 --> 00:22:58,120 that have been hardened. 384 00:22:58,380 --> 00:23:00,440 Again, some of the simple stuff we'll show later. 385 00:23:04,780 --> 00:23:08,120 The final category, which is infrastructure attacks, 386 00:23:08,480 --> 00:23:11,440 is we put it here because what we're finding 387 00:23:11,440 --> 00:23:12,680 is that there are actually some attacks, 388 00:23:12,920 --> 00:23:14,340 we've seen some in the wild actually, 389 00:23:14,500 --> 00:23:17,720 that were targeted at the web services infrastructure 390 00:23:17,720 --> 00:23:19,880 with the goal of subverting 391 00:23:19,880 --> 00:23:22,160 or allowing for some malicious activity 392 00:23:22,160 --> 00:23:23,740 in the web services environment 393 00:23:23,740 --> 00:23:26,520 but not directly attacking that web service environment. 394 00:23:27,200 --> 00:23:30,280 One example is where they did 395 00:23:30,440 --> 00:23:33,040 some DNS poisoning to be able to slip in 396 00:23:33,040 --> 00:23:35,220 a malicious CA server into the process 397 00:23:35,220 --> 00:23:37,900 so that their signed document would get verified 398 00:23:38,420 --> 00:23:39,860 at the time of the transaction 399 00:23:39,860 --> 00:23:42,720 so they can actually do the brokerage transaction 400 00:23:42,720 --> 00:23:43,640 they were trying to do. 401 00:23:43,840 --> 00:23:45,860 They didn't attack the XML environment directly, 402 00:23:45,980 --> 00:23:47,700 but they came at it from a different angle. 403 00:23:47,900 --> 00:23:49,160 And so as we see more of these, 404 00:23:49,280 --> 00:23:50,620 they will fit into this bucket. 405 00:23:50,760 --> 00:23:53,100 So the same kind of security mechanisms we do 406 00:23:53,100 --> 00:23:54,760 to protect against DNS poisoning today 407 00:23:54,760 --> 00:23:56,260 will help here as well. 408 00:23:58,040 --> 00:23:59,760 So now we're going to get into some of the details. 409 00:24:00,440 --> 00:24:02,260 Before I do, I just want to say two things. 410 00:24:02,440 --> 00:24:04,220 On the bottom of each one of the attack slides, 411 00:24:04,600 --> 00:24:06,460 there will be a reference to either the researcher 412 00:24:06,920 --> 00:24:08,640 or the paper that that's came from. 413 00:24:09,000 --> 00:24:10,980 Several of this stuff has been around for some time 414 00:24:10,980 --> 00:24:12,740 and has been worked on in a collaborative environment. 415 00:24:13,120 --> 00:24:14,940 The new stuff is coming from work 416 00:24:14,940 --> 00:24:16,740 that myself and CADS did together, 417 00:24:16,860 --> 00:24:18,400 and you can find more information about them 418 00:24:18,400 --> 00:24:19,820 on their website. 419 00:24:20,220 --> 00:24:22,260 The other thing is please do not try 420 00:24:22,260 --> 00:24:24,200 any of these things on any system 421 00:24:24,200 --> 00:24:26,220 that you don't have authorization to do so. 422 00:24:26,780 --> 00:24:28,640 Now that I've said that, let's dive in. 423 00:24:30,480 --> 00:24:32,700 So as I said before, in this first category 424 00:24:33,640 --> 00:24:35,480 of payload and content threats, 425 00:24:35,680 --> 00:24:36,660 the backend target ones, 426 00:24:36,760 --> 00:24:38,200 it's a lot of the old stuff we already know. 427 00:24:38,520 --> 00:24:40,320 SQL injection works in XML 428 00:24:40,320 --> 00:24:43,200 just as easily as it works in a web environment. 429 00:24:45,140 --> 00:24:47,360 Cross-site scripting works just as well 430 00:24:47,360 --> 00:24:50,820 in an XML world as it does in a typical web environment, 431 00:24:50,920 --> 00:24:51,980 but it works one better 432 00:24:53,020 --> 00:24:55,120 because oftentimes this XML document 433 00:24:55,120 --> 00:24:57,740 gets stored on a server and used multiple times 434 00:24:58,220 --> 00:25:00,300 to serve up information to an end user. 435 00:25:00,980 --> 00:25:03,420 Therefore, your one cross-site scripting attack, 436 00:25:03,600 --> 00:25:05,600 as opposed to having to be sent as an email 437 00:25:05,600 --> 00:25:07,260 or some sort of link on some page, 438 00:25:07,480 --> 00:25:09,340 I can put it into this XML document, 439 00:25:09,700 --> 00:25:10,860 ship it up to the server 440 00:25:10,860 --> 00:25:12,900 that's consuming content from users, 441 00:25:13,160 --> 00:25:15,700 and then wait for every time someone logs into the page 442 00:25:15,700 --> 00:25:17,320 or goes and views that page, 443 00:25:17,520 --> 00:25:19,780 they're going to consume the data from this XML document 444 00:25:19,780 --> 00:25:20,740 and get the attack, 445 00:25:20,800 --> 00:25:22,520 and it can last for a long period of time. 446 00:25:26,500 --> 00:25:28,780 Now for the XML misuse and abuse examples. 447 00:25:30,440 --> 00:25:32,140 First example of this is XQuery. 448 00:25:32,300 --> 00:25:35,560 XQuery is SQL in XML world. 449 00:25:35,640 --> 00:25:37,820 It's the way that you do SQL queries 450 00:25:37,820 --> 00:25:40,700 and look up information in an XML environment. 451 00:25:41,580 --> 00:25:44,720 And again, all the normal SQL kind of stuff will work here, 452 00:25:44,780 --> 00:25:47,780 but there's some advanced features in XQuery 453 00:25:47,780 --> 00:25:49,560 that didn't exist in the standard SQL 454 00:25:49,560 --> 00:25:50,920 that we're all used to. 455 00:25:51,060 --> 00:25:53,840 It allows us to do some more pointed kinds of attacks 456 00:25:53,840 --> 00:25:55,100 and pointed kinds of tests. 457 00:25:55,660 --> 00:25:58,020 So for instance here in this example, 458 00:25:58,760 --> 00:26:00,420 the attacker is trying to access 459 00:26:00,440 --> 00:26:01,700 users.xml, 460 00:26:01,960 --> 00:26:04,620 and they can actually target that specific document 461 00:26:04,620 --> 00:26:06,560 with their query in XQuery 462 00:26:07,080 --> 00:26:08,500 and ask for information 463 00:26:08,500 --> 00:26:12,080 and inject their XQuery injection in here 464 00:26:12,080 --> 00:26:13,960 to get access to all of the users. 465 00:26:14,200 --> 00:26:16,740 A lot easier without the painstaking effort. 466 00:26:16,940 --> 00:26:17,880 Just a quick show of hands. 467 00:26:17,960 --> 00:26:19,200 How many of you have actually run 468 00:26:19,200 --> 00:26:21,340 a successful SQL injection attack before? 469 00:26:22,980 --> 00:26:24,720 How many of you felt there was a pain in the neck 470 00:26:24,720 --> 00:26:26,380 if you didn't know anything from the get-go? 471 00:26:27,800 --> 00:26:29,080 How many of you are using a tool 472 00:26:29,080 --> 00:26:30,020 that helps to make it easier? 473 00:26:31,080 --> 00:26:31,620 Exactly. 474 00:26:32,460 --> 00:26:34,300 XQuery actually makes it much easier. 475 00:26:34,420 --> 00:26:35,380 You don't need a tool 476 00:26:35,380 --> 00:26:36,880 because all you need to do 477 00:26:37,410 --> 00:26:40,360 is perform a very structured query 478 00:26:40,360 --> 00:26:42,220 and the XQuery system 479 00:26:42,220 --> 00:26:43,960 will do the work for you. 480 00:26:45,360 --> 00:26:47,200 It gets better in XPath. 481 00:26:47,420 --> 00:26:49,780 Now XPath is like SQL, 482 00:26:49,920 --> 00:26:52,080 but it's actually how you query XML documents, 483 00:26:52,480 --> 00:26:54,500 whereas XQuery is how you do a query 484 00:26:54,500 --> 00:26:55,700 of a database in XML. 485 00:26:56,500 --> 00:26:58,920 XPath is how you query XML documents, 486 00:26:59,120 --> 00:27:00,220 XML data resources, 487 00:27:00,440 --> 00:27:01,120 and XML databases. 488 00:27:01,740 --> 00:27:03,960 It's one of the fundamental building blocks 489 00:27:03,960 --> 00:27:05,620 of much of the XML processing. 490 00:27:05,880 --> 00:27:06,700 It's how you do transformation. 491 00:27:07,180 --> 00:27:08,560 It's how you find a piece of data 492 00:27:08,560 --> 00:27:10,180 floating around in a variety of different XML. 493 00:27:10,440 --> 00:27:11,620 It's how you know what to do 494 00:27:11,620 --> 00:27:12,860 at a given period of time. 495 00:27:13,860 --> 00:27:16,640 So its structure is very similar to SQL. 496 00:27:16,940 --> 00:27:17,700 It allows you to do 497 00:27:17,700 --> 00:27:19,200 all the normal kinds of SQL queries. 498 00:27:19,380 --> 00:27:21,120 It allows you to do all the advanced stuff 499 00:27:21,120 --> 00:27:22,420 that you got in XQuery as well, 500 00:27:22,520 --> 00:27:24,300 about being able to target specific documents, 501 00:27:24,420 --> 00:27:27,080 target specific IDs and references 502 00:27:27,080 --> 00:27:28,120 within the document. 503 00:27:28,400 --> 00:27:30,340 But it also has a really nifty 504 00:27:30,440 --> 00:27:31,240 novelty feature. 505 00:27:32,440 --> 00:27:34,300 Because typically in an XML environment, 506 00:27:34,500 --> 00:27:35,940 you're just looking for one element, 507 00:27:36,080 --> 00:27:36,780 one value, 508 00:27:36,980 --> 00:27:38,260 and you may have megabytes, 509 00:27:38,260 --> 00:27:38,680 if not gigabytes, 510 00:27:38,820 --> 00:27:39,900 of data to search through. 511 00:27:40,620 --> 00:27:42,300 There's a simple test that you can do 512 00:27:42,300 --> 00:27:43,140 in XPath and say, 513 00:27:43,220 --> 00:27:43,940 does this exist? 514 00:27:44,420 --> 00:27:45,780 It's a query that you can ask. 515 00:27:45,920 --> 00:27:46,780 Does this exist? 516 00:27:47,220 --> 00:27:47,820 Not what? 517 00:27:47,840 --> 00:27:48,560 Don't give me the information. 518 00:27:48,860 --> 00:27:49,940 Just tell me if it exists 519 00:27:50,380 --> 00:27:51,420 before I start looking, 520 00:27:51,580 --> 00:27:53,060 before I start investing resources 521 00:27:53,060 --> 00:27:54,260 in trying to find the data. 522 00:27:54,560 --> 00:27:56,640 And the XPath system will go off 523 00:27:56,640 --> 00:27:57,180 and look and say, 524 00:27:57,240 --> 00:27:57,760 does it exist? 525 00:27:57,880 --> 00:27:59,420 And give you back a binary yes or no, 526 00:27:59,420 --> 00:28:01,520 whether this piece of information exists. 527 00:28:01,900 --> 00:28:03,000 It's a very powerful feature. 528 00:28:03,180 --> 00:28:04,980 There is no authentication authorization 529 00:28:04,980 --> 00:28:06,660 required to do this test. 530 00:28:06,800 --> 00:28:08,320 Because when they create the protocol, 531 00:28:08,640 --> 00:28:10,420 you didn't give away any information. 532 00:28:10,780 --> 00:28:11,260 You just say, 533 00:28:11,320 --> 00:28:12,500 does something exist or not? 534 00:28:13,400 --> 00:28:15,040 So Amit Klein came up with this 535 00:28:15,040 --> 00:28:16,500 really nifty pull script 536 00:28:16,500 --> 00:28:17,640 that actually can go through 537 00:28:17,640 --> 00:28:18,840 and do a blindfolded 538 00:28:18,840 --> 00:28:20,340 XPath injection attack 539 00:28:20,340 --> 00:28:21,880 where I query the XML document 540 00:28:21,880 --> 00:28:23,040 bit by bit by bit. 541 00:28:23,300 --> 00:28:24,140 And I ask, 542 00:28:24,240 --> 00:28:25,280 does this bit exist? 543 00:28:25,680 --> 00:28:26,460 Yes or no? 544 00:28:26,780 --> 00:28:28,180 I get back a yes or no answer. 545 00:28:28,240 --> 00:28:29,100 I know a lot of information. 546 00:28:29,420 --> 00:28:30,900 And in about 30 seconds, 547 00:28:30,980 --> 00:28:33,020 he can pull down an exact replica 548 00:28:33,020 --> 00:28:34,500 of an XML document 549 00:28:34,500 --> 00:28:35,940 that's about a page in length 550 00:28:35,940 --> 00:28:37,540 without ever authenticating 551 00:28:37,540 --> 00:28:38,600 or knowing, in fact, 552 00:28:38,600 --> 00:28:40,320 what information existed there 553 00:28:40,320 --> 00:28:42,440 just by querying it bit by bit by bit. 554 00:28:43,220 --> 00:28:44,700 And you can go on the site 555 00:28:44,700 --> 00:28:45,560 and read his white paper. 556 00:28:45,660 --> 00:28:46,760 It's a really good white paper on that. 557 00:28:48,840 --> 00:28:49,940 Now for the fun stuff. 558 00:28:50,160 --> 00:28:51,280 The structure and manipulation 559 00:28:51,280 --> 00:28:52,120 of the right examples. 560 00:28:53,300 --> 00:28:54,260 The first one, 561 00:28:54,320 --> 00:28:55,260 and this is one that's been around 562 00:28:55,260 --> 00:28:56,020 for a long time 563 00:28:56,020 --> 00:28:58,380 and most of your XML gateways 564 00:28:58,380 --> 00:28:59,340 and firewalls 565 00:28:59,420 --> 00:29:01,360 and even a lot of the network firewalls 566 00:29:01,360 --> 00:29:02,880 say they can solve this problem. 567 00:29:03,100 --> 00:29:04,020 And it's not that hard. 568 00:29:04,160 --> 00:29:05,420 It's the schema poisoning tack. 569 00:29:05,720 --> 00:29:06,860 It's one of the first things 570 00:29:06,860 --> 00:29:07,600 that people thought about 571 00:29:07,600 --> 00:29:08,680 when XML came out. 572 00:29:09,660 --> 00:29:10,940 Schemas and whistles 573 00:29:10,940 --> 00:29:11,980 are the structures 574 00:29:11,980 --> 00:29:13,820 that tell web services applications 575 00:29:14,420 --> 00:29:16,120 how to process an XML document. 576 00:29:16,720 --> 00:29:18,280 They're the mechanism 577 00:29:18,280 --> 00:29:19,160 by which you define 578 00:29:19,160 --> 00:29:20,380 your XML application. 579 00:29:20,900 --> 00:29:22,300 What methods are correct? 580 00:29:22,500 --> 00:29:23,780 What information do I need 581 00:29:23,780 --> 00:29:24,920 to process this application? 582 00:29:25,600 --> 00:29:26,920 What's the min-max size? 583 00:29:27,320 --> 00:29:28,740 How many instances of it 584 00:29:28,740 --> 00:29:29,320 is going to exist? 585 00:29:29,420 --> 00:29:30,520 What's the character set? 586 00:29:30,680 --> 00:29:31,220 What's the type? 587 00:29:31,360 --> 00:29:31,980 All that information 588 00:29:31,980 --> 00:29:34,040 is contained in an XML schema. 589 00:29:34,380 --> 00:29:35,420 And the schema is one 590 00:29:35,420 --> 00:29:36,420 of the fundamental things 591 00:29:36,420 --> 00:29:37,080 that allow you to have 592 00:29:37,080 --> 00:29:37,820 this interoperability 593 00:29:37,820 --> 00:29:38,680 and this flexibility 594 00:29:39,220 --> 00:29:40,500 within the XML environment. 595 00:29:40,720 --> 00:29:41,400 It's an absolutely crucial 596 00:29:41,400 --> 00:29:42,280 piece of the puzzle. 597 00:29:42,880 --> 00:29:44,200 And typically a schema 598 00:29:44,200 --> 00:29:44,880 will get published 599 00:29:44,880 --> 00:29:46,320 and that's how your business partner 600 00:29:46,320 --> 00:29:46,920 or your consumer 601 00:29:46,920 --> 00:29:48,080 can figure out 602 00:29:48,080 --> 00:29:49,520 how to access that application. 603 00:29:50,240 --> 00:29:50,920 And in there, 604 00:29:51,020 --> 00:29:52,180 as you can see in the example here, 605 00:29:52,240 --> 00:29:52,960 you have things like 606 00:29:52,960 --> 00:29:54,380 the type is a string. 607 00:29:54,780 --> 00:29:56,540 This type maybe is a date. 608 00:29:56,740 --> 00:29:58,240 You've got the number of instances 609 00:29:58,240 --> 00:29:59,180 that have to be there 610 00:29:59,180 --> 00:30:01,180 and information like that. 611 00:30:02,000 --> 00:30:03,580 Schema poisoning is about 612 00:30:03,580 --> 00:30:05,340 changing the way the application 613 00:30:05,920 --> 00:30:07,960 is processing that XML document. 614 00:30:08,340 --> 00:30:09,720 One example is removing 615 00:30:09,720 --> 00:30:10,360 all the structures. 616 00:30:10,820 --> 00:30:12,100 So if I remove the fact 617 00:30:12,100 --> 00:30:13,020 that it needs to be a string 618 00:30:13,020 --> 00:30:14,540 or it needs to be a min-max length 619 00:30:14,540 --> 00:30:15,420 of a certain size, 620 00:30:15,680 --> 00:30:17,940 now I can send an XML message in 621 00:30:17,940 --> 00:30:19,960 and when the system reads 622 00:30:19,960 --> 00:30:21,460 the schema of how to process it, 623 00:30:21,580 --> 00:30:22,460 my malicious content's 624 00:30:22,860 --> 00:30:23,740 going to swing right by 625 00:30:23,740 --> 00:30:25,460 because it shows up 626 00:30:25,460 --> 00:30:26,780 as legitimate XML 627 00:30:26,780 --> 00:30:28,140 based on the schema. 628 00:30:28,140 --> 00:30:29,860 So this is one of the classic attacks 629 00:30:29,860 --> 00:30:31,560 that have been around for some time. 630 00:30:35,080 --> 00:30:35,440 Okay. 631 00:30:35,660 --> 00:30:36,740 Well, I can still see it. 632 00:30:36,760 --> 00:30:37,560 I hope you guys can too. 633 00:30:41,080 --> 00:30:41,800 Entity expansion. 634 00:30:42,880 --> 00:30:44,220 Before I talk about the attack, 635 00:30:44,300 --> 00:30:44,840 let's talk about 636 00:30:44,840 --> 00:30:47,440 another feature of XML. 637 00:30:48,400 --> 00:30:50,200 In XML and web services environments, 638 00:30:50,600 --> 00:30:51,860 I can either give you the data. 639 00:30:51,960 --> 00:30:53,640 You can ask me for my name 640 00:30:53,640 --> 00:30:54,560 as a piece of data. 641 00:30:54,640 --> 00:30:55,040 I'll tell you Steve. 642 00:30:55,340 --> 00:30:55,920 Or I can say, 643 00:30:56,020 --> 00:30:57,020 go to this URL 644 00:30:57,380 --> 00:30:58,120 to get the data. 645 00:30:58,140 --> 00:30:58,220 This is the data 646 00:30:58,220 --> 00:30:58,980 you're asking for. 647 00:30:59,140 --> 00:31:01,500 It's a reference to the data. 648 00:31:01,800 --> 00:31:03,440 So I'm not actually giving you the data. 649 00:31:03,500 --> 00:31:04,100 I'm giving you some place 650 00:31:04,100 --> 00:31:04,780 to go pick it up. 651 00:31:04,880 --> 00:31:05,880 And that's a feature of XML 652 00:31:05,880 --> 00:31:06,960 that's used all the time 653 00:31:06,960 --> 00:31:09,080 in certain kinds of applications. 654 00:31:10,040 --> 00:31:11,360 There's also this concept 655 00:31:11,360 --> 00:31:12,060 of an entity 656 00:31:12,060 --> 00:31:14,040 where I can define an entity 657 00:31:14,700 --> 00:31:15,980 as a reference. 658 00:31:16,180 --> 00:31:17,240 So instead of defining 659 00:31:17,240 --> 00:31:17,920 a data value 660 00:31:17,920 --> 00:31:19,180 as a specific value, 661 00:31:19,460 --> 00:31:20,100 I can say, 662 00:31:20,140 --> 00:31:20,960 I'm going to define this 663 00:31:20,960 --> 00:31:21,640 as an entity 664 00:31:21,640 --> 00:31:22,940 and then this entity itself 665 00:31:22,940 --> 00:31:24,380 is in fact a reference. 666 00:31:25,720 --> 00:31:27,200 So one of the very first attacks 667 00:31:27,200 --> 00:31:28,020 that was published 668 00:31:28,020 --> 00:31:29,580 using these techniques 669 00:31:30,160 --> 00:31:31,680 was that oftentimes 670 00:31:31,680 --> 00:31:33,060 the web services server 671 00:31:33,060 --> 00:31:34,180 has got access to 672 00:31:34,180 --> 00:31:35,020 and privileges 673 00:31:35,020 --> 00:31:36,320 that you the consumer, 674 00:31:36,460 --> 00:31:37,200 you the user 675 00:31:37,920 --> 00:31:39,080 of the web service 676 00:31:39,080 --> 00:31:40,300 do not yourself have. 677 00:31:40,640 --> 00:31:41,880 So in this example, 678 00:31:42,000 --> 00:31:43,080 with a simple application 679 00:31:43,080 --> 00:31:44,220 that takes an input 680 00:31:44,220 --> 00:31:45,640 and as part of that input 681 00:31:45,640 --> 00:31:46,600 reflects that input 682 00:31:46,600 --> 00:31:47,600 back to the user, 683 00:31:48,280 --> 00:31:49,740 by putting in a referral 684 00:31:49,740 --> 00:31:50,580 to the data, 685 00:31:50,640 --> 00:31:51,280 instead of giving you 686 00:31:51,280 --> 00:31:52,060 the information 687 00:31:52,060 --> 00:31:53,360 for the entity in, 688 00:31:53,600 --> 00:31:55,400 I give you an entity foo 689 00:31:55,400 --> 00:31:56,420 and I say define foo 690 00:31:56,420 --> 00:31:57,180 as a reference 691 00:31:57,200 --> 00:31:57,700 in this case, 692 00:31:57,740 --> 00:31:58,300 you know, 693 00:31:58,320 --> 00:31:59,480 winnt slash winini. 694 00:31:59,700 --> 00:32:00,700 Now I can't go 695 00:32:00,700 --> 00:32:01,440 and ask the server 696 00:32:01,440 --> 00:32:02,460 for the winini file, 697 00:32:02,700 --> 00:32:03,060 typically, 698 00:32:03,780 --> 00:32:05,120 unless I've already hacked it. 699 00:32:05,560 --> 00:32:06,860 In the case of this web service, 700 00:32:07,040 --> 00:32:07,700 because it's running 701 00:32:07,700 --> 00:32:08,680 in a privileged state, 702 00:32:09,400 --> 00:32:10,280 it can go off 703 00:32:10,280 --> 00:32:10,820 and get access 704 00:32:10,820 --> 00:32:11,320 to that information. 705 00:32:11,520 --> 00:32:12,260 So I get the web service 706 00:32:12,260 --> 00:32:13,620 to do the work for me 707 00:32:13,620 --> 00:32:14,480 as the attacker. 708 00:32:15,120 --> 00:32:16,140 And so the web service 709 00:32:16,140 --> 00:32:16,980 doing its job 710 00:32:16,980 --> 00:32:17,640 goes off 711 00:32:17,640 --> 00:32:18,420 and finds the data 712 00:32:18,420 --> 00:32:19,020 that I said 713 00:32:19,020 --> 00:32:19,300 that it, 714 00:32:19,320 --> 00:32:20,440 where to go get it from 715 00:32:20,440 --> 00:32:21,820 and returns it to me 716 00:32:21,820 --> 00:32:22,480 like a good boy 717 00:32:22,480 --> 00:32:23,900 and I get the winini file. 718 00:32:27,340 --> 00:32:28,760 Taking this a step further, 719 00:32:28,960 --> 00:32:30,300 we have an attack here 720 00:32:30,300 --> 00:32:31,480 called quadratic blowup. 721 00:32:31,900 --> 00:32:33,280 And in quadratic blowup, 722 00:32:33,380 --> 00:32:33,960 and this is again 723 00:32:33,960 --> 00:32:34,400 the first, 724 00:32:34,440 --> 00:32:35,300 one of the key examples 725 00:32:35,300 --> 00:32:36,460 of where the parsers 726 00:32:37,100 --> 00:32:38,340 and the web service 727 00:32:38,340 --> 00:32:39,920 and XML processing engines, 728 00:32:40,120 --> 00:32:40,880 whether it be Xerces, 729 00:32:41,040 --> 00:32:41,360 Xilin, 730 00:32:41,580 --> 00:32:42,720 the SACS and DOM parsers 731 00:32:42,720 --> 00:32:43,520 that exist out there, 732 00:32:43,660 --> 00:32:44,340 many of them 733 00:32:44,340 --> 00:32:45,140 are either open source 734 00:32:45,140 --> 00:32:46,420 or you can buy them 735 00:32:46,420 --> 00:32:47,420 from the various companies 736 00:32:47,420 --> 00:32:48,280 like Microsoft and IBM 737 00:32:48,280 --> 00:32:49,300 were themselves 738 00:32:49,300 --> 00:32:50,840 not built securely. 739 00:32:51,160 --> 00:32:52,500 They don't deal with 740 00:32:52,500 --> 00:32:53,940 these exception cases well. 741 00:32:54,060 --> 00:32:55,000 And in the exception case 742 00:32:55,000 --> 00:32:55,980 that I illustrate here, 743 00:32:56,520 --> 00:32:57,180 I define foo 744 00:32:57,200 --> 00:32:57,680 I define an entity 745 00:32:57,680 --> 00:32:58,900 of a bunch of As, 746 00:32:59,460 --> 00:33:00,780 about 100K of them. 747 00:33:01,440 --> 00:33:02,700 And then I create 748 00:33:02,700 --> 00:33:04,860 a reference to that entity 749 00:33:04,860 --> 00:33:06,240 and I reference it 750 00:33:06,240 --> 00:33:07,280 about 30,000 times. 751 00:33:08,360 --> 00:33:09,120 Just by having 752 00:33:09,120 --> 00:33:10,480 30,000 references to it. 753 00:33:10,540 --> 00:33:11,500 Now the interesting thing is 754 00:33:11,500 --> 00:33:12,720 this is not a very large 755 00:33:12,720 --> 00:33:13,640 XML document. 756 00:33:14,140 --> 00:33:15,620 You know, it's maybe what? 757 00:33:15,860 --> 00:33:17,280 A couple hundred K in size? 758 00:33:17,520 --> 00:33:18,280 Not a very big one 759 00:33:18,280 --> 00:33:19,740 by XML standards. 760 00:33:21,080 --> 00:33:21,560 However, 761 00:33:21,780 --> 00:33:23,740 by consuming this XML document, 762 00:33:24,600 --> 00:33:25,960 we can take a server out 763 00:33:25,960 --> 00:33:27,180 in a matter of seconds. 764 00:33:27,200 --> 00:33:30,280 Because we get the XML processor 765 00:33:30,280 --> 00:33:31,500 and the parser 766 00:33:31,500 --> 00:33:33,600 to do the dirty work for us. 767 00:33:33,760 --> 00:33:35,340 It will instantiate 768 00:33:35,340 --> 00:33:37,220 30,000 instances 769 00:33:37,220 --> 00:33:39,080 of 100K of data 770 00:33:39,620 --> 00:33:40,440 into memory 771 00:33:40,440 --> 00:33:41,560 prior to even running 772 00:33:41,560 --> 00:33:41,900 the application. 773 00:33:42,100 --> 00:33:42,880 This is just parsing, 774 00:33:42,900 --> 00:33:43,580 getting things ready 775 00:33:44,100 --> 00:33:45,040 to run the application. 776 00:33:45,440 --> 00:33:46,840 So it does the damage 777 00:33:46,840 --> 00:33:47,600 all by itself. 778 00:33:47,820 --> 00:33:48,900 It takes itself out, 779 00:33:48,960 --> 00:33:49,360 in this case, 780 00:33:49,360 --> 00:33:50,460 shuts itself down 781 00:33:50,460 --> 00:33:52,320 in a matter of a few seconds 782 00:33:53,100 --> 00:33:54,260 because the parser, 783 00:33:54,780 --> 00:33:55,580 one of the things 784 00:33:55,580 --> 00:33:56,220 that parsers do 785 00:33:56,220 --> 00:33:57,180 is it parses the data 786 00:33:57,200 --> 00:33:57,660 through and understands 787 00:33:57,660 --> 00:33:58,740 what do I have to get ready 788 00:33:58,740 --> 00:33:59,800 to run a transaction. 789 00:34:00,060 --> 00:34:00,580 In this case, 790 00:34:00,600 --> 00:34:02,580 I'm going to get 30,000 instances 791 00:34:02,580 --> 00:34:03,900 of about 100K in size. 792 00:34:04,060 --> 00:34:05,380 I'm going to go spawn the memory 793 00:34:05,380 --> 00:34:06,860 and suck up all the resources 794 00:34:06,860 --> 00:34:07,820 and the threads 795 00:34:07,820 --> 00:34:09,020 for this transaction. 796 00:34:09,340 --> 00:34:09,700 Boom, 797 00:34:09,820 --> 00:34:10,560 server goes down. 798 00:34:13,000 --> 00:34:14,360 Another example of this 799 00:34:14,360 --> 00:34:16,220 is a DOS attack 800 00:34:16,220 --> 00:34:17,140 using SOAP arrays. 801 00:34:17,780 --> 00:34:18,820 There are array structures 802 00:34:18,820 --> 00:34:20,340 that are available in SOAP 803 00:34:20,340 --> 00:34:21,640 which allow you to define 804 00:34:21,640 --> 00:34:22,280 a set of arrays. 805 00:34:22,600 --> 00:34:24,120 And by setting these arrays 806 00:34:24,120 --> 00:34:26,680 to a string of about 100K 807 00:34:26,680 --> 00:34:27,800 in size, 808 00:34:28,380 --> 00:34:29,600 and then referencing it 809 00:34:29,600 --> 00:34:30,920 multiple times within a loop, 810 00:34:31,120 --> 00:34:32,500 you get the array function 811 00:34:32,500 --> 00:34:33,840 of the SOAP processor 812 00:34:34,320 --> 00:34:35,640 to create a denial of service 813 00:34:35,640 --> 00:34:36,000 environment. 814 00:34:36,460 --> 00:34:37,100 And this one here 815 00:34:37,100 --> 00:34:38,260 is a little bit more gradual 816 00:34:38,680 --> 00:34:39,860 until we got no response 817 00:34:39,860 --> 00:34:40,660 from the server. 818 00:34:43,160 --> 00:34:44,460 And all this data, by the way, 819 00:34:44,500 --> 00:34:45,180 if you want to go and look 820 00:34:45,180 --> 00:34:45,640 at the details, 821 00:34:45,700 --> 00:34:46,700 is in the slide deck 822 00:34:46,700 --> 00:34:47,820 that's on your CD. 823 00:34:50,760 --> 00:34:51,800 Another example here 824 00:34:51,800 --> 00:34:52,460 is where we take 825 00:34:52,460 --> 00:34:54,160 the quadratic expansion techniques 826 00:34:54,160 --> 00:34:55,080 that we saw earlier 827 00:34:55,080 --> 00:34:56,540 of referencing something 828 00:34:56,540 --> 00:34:57,160 really large 829 00:34:57,160 --> 00:34:58,300 and then having it referenced 830 00:34:58,300 --> 00:34:59,120 multiple times. 831 00:34:59,940 --> 00:35:00,860 And we can do that 832 00:35:00,860 --> 00:35:01,860 in an array as well. 833 00:35:02,160 --> 00:35:03,280 In this example here, 834 00:35:03,320 --> 00:35:04,800 we're using the href function 835 00:35:05,620 --> 00:35:06,940 within a SOAP array 836 00:35:06,940 --> 00:35:08,740 to cause the same kind of damage. 837 00:35:09,140 --> 00:35:10,420 And this is one of the new attacks 838 00:35:10,420 --> 00:35:11,540 that CADS came up with. 839 00:35:11,640 --> 00:35:12,840 So combining the techniques 840 00:35:12,840 --> 00:35:14,040 of the last two ones together 841 00:35:14,040 --> 00:35:15,660 actually gets a denial of service 842 00:35:15,660 --> 00:35:16,260 fairly quickly. 843 00:35:16,660 --> 00:35:17,820 Now, I'm not telling you 844 00:35:17,820 --> 00:35:19,780 which parsers it worked with, 845 00:35:19,860 --> 00:35:21,060 but trust me when I tell you 846 00:35:21,060 --> 00:35:21,760 we tested this 847 00:35:21,760 --> 00:35:22,540 with all the ones 848 00:35:22,540 --> 00:35:23,520 you're going to go play with. 849 00:35:23,820 --> 00:35:25,140 And a large majority of them 850 00:35:25,140 --> 00:35:25,520 were susceptible 851 00:35:25,520 --> 00:35:26,700 to many of these attacks. 852 00:35:28,980 --> 00:35:30,120 Now we get to some of 853 00:35:30,120 --> 00:35:31,460 what I call stupid stuff. 854 00:35:31,720 --> 00:35:32,600 The reality is 855 00:35:32,600 --> 00:35:33,440 many of these kinds 856 00:35:33,440 --> 00:35:34,960 of malformations 857 00:35:34,960 --> 00:35:36,520 should not work. 858 00:35:36,840 --> 00:35:38,020 I mean, let's face it. 859 00:35:38,060 --> 00:35:39,200 We're in 2007 now. 860 00:35:39,340 --> 00:35:40,540 We think that many 861 00:35:40,540 --> 00:35:41,260 of the vendors 862 00:35:41,260 --> 00:35:42,640 and application developers 863 00:35:42,640 --> 00:35:43,500 out there would have learned. 864 00:35:43,780 --> 00:35:45,360 But sometimes the stupid stuff 865 00:35:45,360 --> 00:35:46,240 does still work. 866 00:35:46,300 --> 00:35:46,740 In this case, 867 00:35:46,740 --> 00:35:47,900 an unclosed tag 868 00:35:48,600 --> 00:35:51,160 inside of a SOAP array reference 869 00:35:51,740 --> 00:35:54,420 got the parser to crash and burn. 870 00:35:54,780 --> 00:35:55,500 A similar thing 871 00:35:55,520 --> 00:35:56,320 to a simple unclosed tag. 872 00:35:56,660 --> 00:35:58,180 It'd be like programming in C 873 00:35:58,180 --> 00:35:59,960 and not having a parenthesis there. 874 00:36:00,480 --> 00:36:01,800 You'd think that would get caught. 875 00:36:01,940 --> 00:36:02,400 It doesn't. 876 00:36:04,320 --> 00:36:05,680 Another example, again, 877 00:36:05,800 --> 00:36:06,700 of an old attack 878 00:36:06,700 --> 00:36:07,360 that we've seen 879 00:36:07,360 --> 00:36:08,540 in a variety of other protocols 880 00:36:08,540 --> 00:36:10,480 works just as well in XML. 881 00:36:10,860 --> 00:36:12,020 Really large names. 882 00:36:12,940 --> 00:36:15,100 So we created a very, very, very, very, 883 00:36:15,100 --> 00:36:15,840 very large name 884 00:36:15,840 --> 00:36:16,600 in an array type. 885 00:36:17,060 --> 00:36:19,960 And the processor basically dumped 886 00:36:19,960 --> 00:36:23,660 as the web services processor dumped 887 00:36:23,660 --> 00:36:24,600 when it got to this name 888 00:36:24,600 --> 00:36:25,600 and couldn't process it. 889 00:36:25,640 --> 00:36:26,940 It was too big for its buffer 890 00:36:26,940 --> 00:36:27,580 and it crashed. 891 00:36:28,380 --> 00:36:29,800 Now, we did not do the research 892 00:36:29,800 --> 00:36:30,680 to see if we could do 893 00:36:30,680 --> 00:36:31,340 any sort of injection 894 00:36:31,340 --> 00:36:32,440 of functionality in here. 895 00:36:32,500 --> 00:36:33,500 That's for somebody else to do. 896 00:36:33,940 --> 00:36:35,200 But we did get the crash 897 00:36:35,200 --> 00:36:35,840 that would lead 898 00:36:35,840 --> 00:36:37,140 to some research like that. 899 00:36:40,080 --> 00:36:41,640 Again, we get the same kind of deal 900 00:36:41,640 --> 00:36:44,100 when we have a denial of service 901 00:36:44,100 --> 00:36:45,660 using the attribute name size. 902 00:36:45,820 --> 00:36:46,820 Not an href, 903 00:36:46,900 --> 00:36:48,220 but an attributes name size 904 00:36:48,220 --> 00:36:49,100 can also cause 905 00:36:49,100 --> 00:36:50,640 the same kind of problem. 906 00:36:50,780 --> 00:36:51,680 So we have here, 907 00:36:51,900 --> 00:36:52,780 let's see if I can show you, 908 00:36:52,780 --> 00:36:54,820 a really large attribute name 909 00:36:54,820 --> 00:36:55,720 in a SOAP array 910 00:36:55,720 --> 00:36:57,740 causes the same kind of problem. 911 00:36:58,040 --> 00:36:58,620 And again, 912 00:36:59,540 --> 00:37:01,360 I've talked to many of these vendors 913 00:37:01,360 --> 00:37:02,720 and it's really embarrassing 914 00:37:02,720 --> 00:37:03,860 for an industry 915 00:37:03,860 --> 00:37:05,780 to have these kind of problems today. 916 00:37:06,160 --> 00:37:07,580 But the fact is we still do. 917 00:37:09,980 --> 00:37:11,180 Another example is 918 00:37:11,180 --> 00:37:12,320 reading in blocking pipes 919 00:37:12,320 --> 00:37:13,360 using external entities. 920 00:37:13,500 --> 00:37:14,700 I can use an external entity 921 00:37:14,700 --> 00:37:15,800 to reference something 922 00:37:15,800 --> 00:37:16,680 like a blocking pipe 923 00:37:16,680 --> 00:37:18,880 and get that type of denial of service 924 00:37:18,880 --> 00:37:19,800 environment as well. 925 00:37:21,480 --> 00:37:22,640 Here's one of my favorites. 926 00:37:23,580 --> 00:37:24,520 We all know, 927 00:37:24,620 --> 00:37:25,500 we all should know 928 00:37:25,500 --> 00:37:26,480 that any time you install 929 00:37:26,480 --> 00:37:27,980 a new web application environment 930 00:37:27,980 --> 00:37:29,320 or a new web service environment, 931 00:37:29,680 --> 00:37:31,460 all the test scripts that come with it 932 00:37:31,460 --> 00:37:32,080 should be deleted 933 00:37:32,080 --> 00:37:33,140 from the production server, right? 934 00:37:33,220 --> 00:37:33,680 Raise of hands. 935 00:37:33,780 --> 00:37:34,340 How many believe that? 936 00:37:35,860 --> 00:37:37,420 Come on, I can see more hands than that. 937 00:37:39,140 --> 00:37:41,280 Many of the live web services environments 938 00:37:41,280 --> 00:37:42,360 that we've looked at, 939 00:37:42,480 --> 00:37:44,360 both in financial services, 940 00:37:44,500 --> 00:37:45,180 in government, 941 00:37:45,460 --> 00:37:46,360 in healthcare, 942 00:37:46,660 --> 00:37:48,160 they typically keep 943 00:37:48,160 --> 00:37:49,200 some of these tests around. 944 00:37:49,360 --> 00:37:49,940 The reason is 945 00:37:49,940 --> 00:37:51,460 because XML environments 946 00:37:51,460 --> 00:37:52,620 are a lot harder to test. 947 00:37:53,220 --> 00:37:54,300 than a web one. 948 00:37:54,400 --> 00:37:54,740 A web one, 949 00:37:54,760 --> 00:37:55,300 you can go to the website 950 00:37:55,300 --> 00:37:56,400 and see if the web page shows up 951 00:37:56,400 --> 00:37:56,880 and you're happy. 952 00:37:57,500 --> 00:37:58,480 Many times a test, 953 00:37:58,580 --> 00:37:59,620 if some of the functionality 954 00:37:59,620 --> 00:38:00,580 in your web server 955 00:38:00,580 --> 00:38:02,360 is not working right, 956 00:38:02,580 --> 00:38:03,520 it's a lot harder to test. 957 00:38:03,600 --> 00:38:04,540 So a lot of companies decided 958 00:38:04,540 --> 00:38:05,400 we're going to keep 959 00:38:05,400 --> 00:38:06,520 some of these tests around 960 00:38:06,520 --> 00:38:07,600 so that we can quickly do 961 00:38:07,600 --> 00:38:09,000 a functionality test 962 00:38:09,000 --> 00:38:09,340 to make sure 963 00:38:09,340 --> 00:38:10,340 something's not going wrong. 964 00:38:10,840 --> 00:38:11,580 The problem is 965 00:38:11,580 --> 00:38:12,360 with the example here, 966 00:38:12,480 --> 00:38:13,320 this is the one with access, 967 00:38:13,500 --> 00:38:14,100 the array test 968 00:38:14,820 --> 00:38:15,540 is actually 969 00:38:15,540 --> 00:38:17,620 a very resource-intensive test. 970 00:38:17,940 --> 00:38:19,100 It's a diagnostic tool 971 00:38:19,100 --> 00:38:19,620 that you can run 972 00:38:19,620 --> 00:38:21,180 to check that certain functionality 973 00:38:21,180 --> 00:38:22,100 around your arrays 974 00:38:22,100 --> 00:38:22,760 will function. 975 00:38:22,780 --> 00:38:23,180 and work. 976 00:38:23,580 --> 00:38:24,680 And it didn't take 977 00:38:24,680 --> 00:38:25,320 that many of them. 978 00:38:25,360 --> 00:38:27,040 Only about four instances 979 00:38:27,040 --> 00:38:27,880 that were referenced 980 00:38:27,880 --> 00:38:28,780 three times 981 00:38:28,780 --> 00:38:30,260 and we were able to consume 982 00:38:30,260 --> 00:38:31,140 the resources 983 00:38:31,140 --> 00:38:32,760 of a fairly high-end server, 984 00:38:32,980 --> 00:38:33,680 mind you. 985 00:38:33,800 --> 00:38:34,860 All of the threads 986 00:38:34,860 --> 00:38:36,200 and all of the memory 987 00:38:36,200 --> 00:38:36,740 was consumed 988 00:38:36,740 --> 00:38:38,260 by this one XML document 989 00:38:38,740 --> 00:38:39,800 just by sending it in 990 00:38:39,800 --> 00:38:40,920 because they didn't 991 00:38:40,920 --> 00:38:41,600 disallow access 992 00:38:41,600 --> 00:38:43,440 to these standard test 993 00:38:43,440 --> 00:38:44,560 and diagnostic tools 994 00:38:44,560 --> 00:38:45,940 that came with the download. 995 00:38:48,580 --> 00:38:49,560 There are a variety 996 00:38:49,560 --> 00:38:50,180 of other threats 997 00:38:50,180 --> 00:38:51,120 that are available out there. 998 00:38:51,560 --> 00:38:52,360 WSDL scanning 999 00:38:52,780 --> 00:38:53,440 is one where 1000 00:38:53,440 --> 00:38:54,740 typically a WSDL, 1001 00:38:54,840 --> 00:38:55,440 like a schema, 1002 00:38:55,560 --> 00:38:56,420 is how you set up 1003 00:38:56,420 --> 00:38:56,840 your application. 1004 00:38:57,180 --> 00:38:57,580 There's a lot 1005 00:38:57,580 --> 00:38:58,480 of information gathering 1006 00:38:58,480 --> 00:38:59,520 that a hacker can do 1007 00:38:59,520 --> 00:39:01,620 by looking at your WSDL. 1008 00:39:01,720 --> 00:39:02,780 If you want to see 1009 00:39:02,780 --> 00:39:03,340 the WSDLs 1010 00:39:03,340 --> 00:39:04,260 of a particular company, 1011 00:39:04,380 --> 00:39:04,820 just Google 1012 00:39:04,820 --> 00:39:06,740 the company's website 1013 00:39:06,740 --> 00:39:08,680 star.wsdl 1014 00:39:08,680 --> 00:39:09,340 and you'll find 1015 00:39:09,340 --> 00:39:10,360 a lot of interesting information. 1016 00:39:12,040 --> 00:39:12,740 There's also 1017 00:39:13,880 --> 00:39:14,920 parsing attacks 1018 00:39:14,920 --> 00:39:15,820 where you can try 1019 00:39:15,820 --> 00:39:17,080 to get the parser 1020 00:39:17,080 --> 00:39:18,040 to parse information 1021 00:39:18,040 --> 00:39:19,220 in a specific order. 1022 00:39:20,200 --> 00:39:21,640 Just like any other kind 1023 00:39:21,640 --> 00:39:22,620 of content delivery 1024 00:39:22,780 --> 00:39:23,180 infrastructure, 1025 00:39:23,700 --> 00:39:24,280 I can upload 1026 00:39:24,280 --> 00:39:25,160 malicious content. 1027 00:39:25,480 --> 00:39:26,640 Viruses can be delivered. 1028 00:39:26,880 --> 00:39:28,020 Binary data can be 1029 00:39:28,020 --> 00:39:28,940 delivered via XML. 1030 00:39:29,820 --> 00:39:30,920 There's a functionality 1031 00:39:30,920 --> 00:39:32,140 in XML called routing. 1032 00:39:32,300 --> 00:39:33,260 What routing is 1033 00:39:33,260 --> 00:39:33,780 is the ability 1034 00:39:33,780 --> 00:39:34,500 to actually tell 1035 00:39:34,500 --> 00:39:35,240 the XML document 1036 00:39:35,780 --> 00:39:36,800 which hops it needs 1037 00:39:36,800 --> 00:39:37,320 to go on 1038 00:39:37,320 --> 00:39:37,900 as it goes through 1039 00:39:37,900 --> 00:39:38,540 its transaction. 1040 00:39:40,640 --> 00:39:41,760 By injecting into 1041 00:39:41,760 --> 00:39:42,600 that routing statement 1042 00:39:42,600 --> 00:39:43,300 and being able 1043 00:39:43,300 --> 00:39:43,860 to manipulate 1044 00:39:43,860 --> 00:39:44,760 the route it takes, 1045 00:39:44,880 --> 00:39:46,060 you can do very creative 1046 00:39:46,060 --> 00:39:47,140 man-in-the-middle attacks. 1047 00:39:47,520 --> 00:39:48,400 All this information 1048 00:39:48,400 --> 00:39:49,220 is available here. 1049 00:39:49,600 --> 00:39:50,560 If you can go look 1050 00:39:50,560 --> 00:39:51,420 at the report 1051 00:39:51,420 --> 00:39:52,460 that Pete Lindstrom did, 1052 00:39:52,780 --> 00:39:52,980 he actually lists 1053 00:39:52,980 --> 00:39:53,660 some of this information. 1054 00:39:56,140 --> 00:39:57,420 Now let's talk about 1055 00:39:57,420 --> 00:39:57,960 some future 1056 00:39:57,960 --> 00:39:58,860 and next generation attacks. 1057 00:39:59,320 --> 00:40:00,460 One thing is for sure. 1058 00:40:00,700 --> 00:40:01,920 As more applications 1059 00:40:01,920 --> 00:40:02,740 come online 1060 00:40:02,740 --> 00:40:04,100 from the back end 1061 00:40:04,100 --> 00:40:05,080 as web services, 1062 00:40:05,400 --> 00:40:06,300 those vulnerabilities 1063 00:40:06,300 --> 00:40:07,620 that existed back there 1064 00:40:07,620 --> 00:40:08,300 become available 1065 00:40:08,300 --> 00:40:09,100 to the attacker 1066 00:40:09,100 --> 00:40:10,160 where they weren't 1067 00:40:10,160 --> 00:40:10,920 available before. 1068 00:40:11,860 --> 00:40:12,900 A guy named 1069 00:40:12,900 --> 00:40:13,380 Stu Henderson 1070 00:40:13,380 --> 00:40:13,980 every year 1071 00:40:13,980 --> 00:40:14,860 gives a talk 1072 00:40:14,860 --> 00:40:15,280 at the big 1073 00:40:15,280 --> 00:40:16,440 IBM Share Conference 1074 00:40:16,440 --> 00:40:16,980 where he talks about 1075 00:40:16,980 --> 00:40:18,280 10 ways to hack a mainframe. 1076 00:40:19,140 --> 00:40:20,020 For those of you 1077 00:40:20,020 --> 00:40:20,860 not familiar with mainframes, 1078 00:40:20,960 --> 00:40:21,560 it requires a lot 1079 00:40:21,560 --> 00:40:22,600 of really weird things 1080 00:40:22,780 --> 00:40:23,580 with ISPF panels 1081 00:40:23,580 --> 00:40:24,300 and JCL 1082 00:40:24,300 --> 00:40:25,580 to get it to work 1083 00:40:25,580 --> 00:40:26,460 from a green screen 1084 00:40:26,460 --> 00:40:27,020 that he does 1085 00:40:27,020 --> 00:40:27,960 a demonstration for. 1086 00:40:28,580 --> 00:40:29,500 One of the interesting things 1087 00:40:29,500 --> 00:40:29,840 that we did 1088 00:40:29,840 --> 00:40:30,760 some joint research on 1089 00:40:30,760 --> 00:40:31,340 is to show that 1090 00:40:31,340 --> 00:40:32,280 if you XMLize 1091 00:40:32,280 --> 00:40:33,620 that back end 1092 00:40:33,620 --> 00:40:34,640 mainframe database, 1093 00:40:34,720 --> 00:40:35,340 so the mainframe 1094 00:40:35,340 --> 00:40:35,980 kicks environment, 1095 00:40:36,680 --> 00:40:37,560 those structures 1096 00:40:37,560 --> 00:40:38,520 allow you to perform 1097 00:40:38,520 --> 00:40:38,980 those attacks 1098 00:40:38,980 --> 00:40:40,060 without having to go through 1099 00:40:40,060 --> 00:40:41,340 and learn JCL 1100 00:40:41,340 --> 00:40:42,680 and become a green screen expert. 1101 00:40:42,820 --> 00:40:43,460 You can actually send 1102 00:40:43,460 --> 00:40:44,140 the attacks directly 1103 00:40:44,140 --> 00:40:45,540 to the mainframe 1104 00:40:45,540 --> 00:40:46,540 and target 1105 00:40:46,540 --> 00:40:47,200 the mainframe directly. 1106 00:40:47,360 --> 00:40:47,800 Most of them 1107 00:40:47,800 --> 00:40:48,600 were denial of service 1108 00:40:48,600 --> 00:40:50,580 or authentication compromise. 1109 00:40:52,680 --> 00:40:53,480 Moving along. 1110 00:40:54,520 --> 00:40:55,240 Let's talk about 1111 00:40:55,240 --> 00:40:57,220 Web 2.0 and RIA attacks. 1112 00:40:57,740 --> 00:40:58,300 We've got about 1113 00:40:58,300 --> 00:40:58,980 10 minutes of time 1114 00:40:58,980 --> 00:40:59,700 so I'm going to fly through 1115 00:40:59,700 --> 00:41:00,260 some of this. 1116 00:41:01,300 --> 00:41:01,700 Ajax. 1117 00:41:02,240 --> 00:41:02,640 Basically, 1118 00:41:03,140 --> 00:41:04,120 Ajax is a bunch 1119 00:41:04,120 --> 00:41:04,600 of functionality 1120 00:41:04,600 --> 00:41:05,860 running in the client. 1121 00:41:06,380 --> 00:41:07,800 There are three specific areas 1122 00:41:07,800 --> 00:41:08,700 that we want to look at here. 1123 00:41:08,780 --> 00:41:09,820 There's a lot of vulnerabilities 1124 00:41:09,820 --> 00:41:10,520 around Ajax. 1125 00:41:10,700 --> 00:41:11,540 There have been some talks 1126 00:41:11,540 --> 00:41:12,220 here at Black Hat 1127 00:41:12,220 --> 00:41:13,120 and DEF CON about them. 1128 00:41:13,200 --> 00:41:13,900 There's more information 1129 00:41:13,900 --> 00:41:14,920 I'm sure out there. 1130 00:41:15,140 --> 00:41:15,820 I'm going to concentrate 1131 00:41:15,820 --> 00:41:16,600 on three problems. 1132 00:41:17,220 --> 00:41:18,220 The first is 1133 00:41:18,220 --> 00:41:19,180 information leakage. 1134 00:41:19,180 --> 00:41:21,440 When the Ajax engine 1135 00:41:21,440 --> 00:41:22,480 traps user commands 1136 00:41:22,480 --> 00:41:23,380 and makes function calls 1137 00:41:23,380 --> 00:41:24,320 against the server, 1138 00:41:24,480 --> 00:41:25,720 these go in clear text. 1139 00:41:26,040 --> 00:41:27,400 From an attacker's perspective, 1140 00:41:27,780 --> 00:41:28,820 it will provide 1141 00:41:28,820 --> 00:41:30,240 a lot of rich information 1142 00:41:30,240 --> 00:41:31,000 for the attacker 1143 00:41:31,000 --> 00:41:32,540 about what types of calls, 1144 00:41:32,740 --> 00:41:34,580 what are the variable names 1145 00:41:34,580 --> 00:41:35,160 and elements 1146 00:41:35,160 --> 00:41:36,080 they're looking for 1147 00:41:36,080 --> 00:41:37,280 on the server. 1148 00:41:37,920 --> 00:41:39,060 It's a means of attacking. 1149 00:41:39,280 --> 00:41:40,620 If you're not using SSL 1150 00:41:40,620 --> 00:41:41,580 and you're not 1151 00:41:41,580 --> 00:41:43,240 obfuscating these values, 1152 00:41:44,060 --> 00:41:45,000 you're giving information 1153 00:41:45,000 --> 00:41:45,800 away for free 1154 00:41:45,800 --> 00:41:46,400 to the attacker. 1155 00:41:48,120 --> 00:41:49,160 The second is 1156 00:41:49,160 --> 00:41:50,820 the problem of repudiation 1157 00:41:50,820 --> 00:41:51,280 of requests 1158 00:41:51,280 --> 00:41:52,420 and cross-site scripting. 1159 00:41:52,680 --> 00:41:54,140 Because Ajax is running 1160 00:41:54,140 --> 00:41:54,720 on the client 1161 00:41:54,720 --> 00:41:55,920 and if I can insert 1162 00:41:55,920 --> 00:41:57,060 malicious Ajax content 1163 00:41:57,060 --> 00:41:58,440 into the Ajax application, 1164 00:41:58,960 --> 00:42:00,960 there is absolutely no way 1165 00:42:00,960 --> 00:42:02,440 for the server to know 1166 00:42:02,440 --> 00:42:03,820 whether it was you 1167 00:42:04,560 --> 00:42:05,440 typing the command 1168 00:42:05,440 --> 00:42:06,540 to purchase 20 shares 1169 00:42:06,540 --> 00:42:07,240 of that stock 1170 00:42:07,240 --> 00:42:08,840 or some malicious code. 1171 00:42:09,560 --> 00:42:10,780 There's no way to prove 1172 00:42:10,780 --> 00:42:11,700 that you didn't do it 1173 00:42:11,700 --> 00:42:13,240 because the Ajax application 1174 00:42:13,240 --> 00:42:14,440 is doing it on your behalf. 1175 00:42:14,660 --> 00:42:17,000 If I inject malicious commands 1176 00:42:17,000 --> 00:42:18,940 into that Ajax application, 1177 00:42:19,380 --> 00:42:20,900 I can actually get you, 1178 00:42:20,960 --> 00:42:21,860 when you're authenticated 1179 00:42:21,860 --> 00:42:22,880 and running the application, 1180 00:42:23,140 --> 00:42:24,360 to run my commands as well 1181 00:42:24,360 --> 00:42:25,540 and there'd be no way 1182 00:42:25,540 --> 00:42:25,960 for you to prove 1183 00:42:25,960 --> 00:42:26,720 that you didn't do it. 1184 00:42:27,260 --> 00:42:28,620 Also, because Ajax 1185 00:42:28,620 --> 00:42:29,620 is running on the client, 1186 00:42:29,780 --> 00:42:30,500 cross-site scripting 1187 00:42:30,500 --> 00:42:31,760 is a major problem. 1188 00:42:32,100 --> 00:42:33,380 And a lot of these applications 1189 00:42:33,380 --> 00:42:34,620 are dynamically generated 1190 00:42:34,620 --> 00:42:35,780 with content coming 1191 00:42:35,780 --> 00:42:36,980 from a variety of resources 1192 00:42:36,980 --> 00:42:38,120 when you go and run it 1193 00:42:38,120 --> 00:42:39,020 on your local browser. 1194 00:42:39,360 --> 00:42:40,260 And those resources 1195 00:42:40,260 --> 00:42:41,440 aren't always vetted 1196 00:42:41,440 --> 00:42:43,180 by the application server 1197 00:42:43,180 --> 00:42:43,800 that you're getting 1198 00:42:43,800 --> 00:42:44,540 your information from. 1199 00:42:44,600 --> 00:42:45,040 They can go off 1200 00:42:45,040 --> 00:42:46,420 and get information from NASDAQ, 1201 00:42:46,540 --> 00:42:47,060 go off and get information 1202 00:42:47,060 --> 00:42:47,680 from Google, 1203 00:42:47,900 --> 00:42:49,480 or from MySpace, 1204 00:42:49,780 --> 00:42:50,620 or any other place. 1205 00:42:50,760 --> 00:42:51,480 So the content 1206 00:42:51,480 --> 00:42:52,640 that you're processing 1207 00:42:52,640 --> 00:42:53,460 in your browser, 1208 00:42:53,900 --> 00:42:54,940 there's limited control 1209 00:42:54,940 --> 00:42:55,860 of what you can have. 1210 00:42:56,020 --> 00:42:56,380 And things like 1211 00:42:56,380 --> 00:42:57,260 cross-site scripting, 1212 00:42:57,320 --> 00:42:58,600 cross-site request forgery 1213 00:42:58,600 --> 00:42:59,000 and the like 1214 00:42:59,000 --> 00:42:59,700 can all come into 1215 00:42:59,700 --> 00:43:00,540 that same channel. 1216 00:43:01,860 --> 00:43:03,100 Finally is an interesting one 1217 00:43:03,100 --> 00:43:04,340 which is called Ajax bridging. 1218 00:43:05,260 --> 00:43:05,660 Oftentimes, 1219 00:43:06,160 --> 00:43:08,020 you'll have an Ajax bridge set up 1220 00:43:08,020 --> 00:43:10,200 for an Ajax client to talk to 1221 00:43:10,200 --> 00:43:10,860 to be able to run things 1222 00:43:10,860 --> 00:43:11,640 like web services. 1223 00:43:11,740 --> 00:43:12,420 Because web services 1224 00:43:12,420 --> 00:43:13,420 don't really run well 1225 00:43:13,420 --> 00:43:14,280 in the browser today. 1226 00:43:14,540 --> 00:43:15,620 You have to do some kludge 1227 00:43:15,620 --> 00:43:16,360 to get it to work right. 1228 00:43:17,060 --> 00:43:17,400 And a lot of times 1229 00:43:17,400 --> 00:43:18,480 you maybe don't have access 1230 00:43:18,480 --> 00:43:19,620 to the authentication required 1231 00:43:19,620 --> 00:43:21,220 to get access to those services. 1232 00:43:21,500 --> 00:43:22,660 Many of these environments 1233 00:43:22,660 --> 00:43:23,720 will set up an Ajax bridge. 1234 00:43:23,940 --> 00:43:24,440 And what that is 1235 00:43:24,440 --> 00:43:26,380 is a place for the Ajax clients 1236 00:43:26,380 --> 00:43:27,020 to go to 1237 00:43:27,020 --> 00:43:27,800 to make a request 1238 00:43:27,800 --> 00:43:28,600 and then that bridge 1239 00:43:28,600 --> 00:43:29,040 will go off 1240 00:43:29,040 --> 00:43:30,580 and make a web services call 1241 00:43:31,160 --> 00:43:32,000 on your behalf. 1242 00:43:32,160 --> 00:43:32,900 And they often have 1243 00:43:32,900 --> 00:43:34,500 elevated privileges 1244 00:43:35,060 --> 00:43:35,880 and capabilities 1245 00:43:35,880 --> 00:43:36,860 that the client itself 1246 00:43:36,860 --> 00:43:37,440 doesn't have. 1247 00:43:37,880 --> 00:43:39,160 One of the challenges is 1248 00:43:39,160 --> 00:43:40,080 that the Ajax bridge 1249 00:43:40,080 --> 00:43:40,860 can be used 1250 00:43:40,860 --> 00:43:41,540 as a proxy 1251 00:43:41,540 --> 00:43:42,220 for the attacker 1252 00:43:42,220 --> 00:43:44,320 to attack those web services. 1253 00:43:44,640 --> 00:43:45,500 Because it has 1254 00:43:45,500 --> 00:43:46,300 that elevated privilege 1255 00:43:47,060 --> 00:43:47,420 and without 1256 00:43:47,420 --> 00:43:48,220 the proper controls 1257 00:43:48,220 --> 00:43:49,200 in place on the bridge 1258 00:43:49,200 --> 00:43:50,240 it can be used 1259 00:43:50,240 --> 00:43:51,020 for malicious purposes 1260 00:43:51,020 --> 00:43:51,700 as well as 1261 00:43:51,700 --> 00:43:52,520 for the legitimate ones 1262 00:43:52,520 --> 00:43:53,320 that the Ajax bridge 1263 00:43:53,320 --> 00:43:54,480 was intended for. 1264 00:43:56,480 --> 00:43:57,680 Finally is RSS 1265 00:43:57,680 --> 00:43:58,460 or what I call 1266 00:43:58,460 --> 00:44:00,140 the free attack delivery service. 1267 00:44:01,860 --> 00:44:04,320 And RSS is a scary, scary thing. 1268 00:44:04,800 --> 00:44:06,400 You more often than not 1269 00:44:06,400 --> 00:44:07,200 you have no idea 1270 00:44:07,200 --> 00:44:08,020 where the content 1271 00:44:08,020 --> 00:44:09,160 you're getting through RSS 1272 00:44:09,160 --> 00:44:09,780 came from. 1273 00:44:10,120 --> 00:44:11,360 And often times 1274 00:44:11,360 --> 00:44:12,440 the aggregator 1275 00:44:12,440 --> 00:44:13,460 is browser enabled 1276 00:44:13,460 --> 00:44:14,240 or browser capable. 1277 00:44:14,660 --> 00:44:15,720 So here's an example 1278 00:44:15,720 --> 00:44:16,300 I created 1279 00:44:17,060 --> 00:44:18,100 of a process scripting attack 1280 00:44:18,100 --> 00:44:19,820 coming in over an Ajax form. 1281 00:44:20,240 --> 00:44:21,280 One thing to note, 1282 00:44:21,420 --> 00:44:22,920 I'm sorry RSS form. 1283 00:44:23,440 --> 00:44:24,600 RSS can deliver 1284 00:44:24,600 --> 00:44:25,880 all sorts of content. 1285 00:44:26,060 --> 00:44:26,420 URLs, 1286 00:44:27,200 --> 00:44:28,780 full fledged XML documents, 1287 00:44:29,040 --> 00:44:30,360 full binary files. 1288 00:44:30,540 --> 00:44:31,600 You could download a virus 1289 00:44:31,600 --> 00:44:32,320 to your system 1290 00:44:32,320 --> 00:44:32,920 through RSS 1291 00:44:32,920 --> 00:44:33,980 and not even know it. 1292 00:44:34,360 --> 00:44:35,560 So because RSS 1293 00:44:35,560 --> 00:44:36,480 is a nice open standard. 1294 00:44:36,760 --> 00:44:37,780 There aren't yet 1295 00:44:37,780 --> 00:44:38,980 good security mechanisms. 1296 00:44:39,220 --> 00:44:40,460 MIT is doing some research 1297 00:44:40,460 --> 00:44:40,920 right now 1298 00:44:40,920 --> 00:44:41,460 on how to do 1299 00:44:41,460 --> 00:44:42,260 Adam file security 1300 00:44:42,260 --> 00:44:43,480 but it's not yet ready. 1301 00:44:43,900 --> 00:44:44,880 And so RSS 1302 00:44:44,880 --> 00:44:45,800 is a very scary thing 1303 00:44:45,800 --> 00:44:46,580 if you're gonna adopt it 1304 00:44:47,060 --> 00:44:47,420 into your organization. 1305 00:44:48,900 --> 00:44:49,380 Finally, 1306 00:44:49,440 --> 00:44:50,480 in these Web 2.0 sites 1307 00:44:50,480 --> 00:44:51,480 we're seeing things like 1308 00:44:51,480 --> 00:44:52,560 cross site scripting words. 1309 00:44:52,800 --> 00:44:53,600 Jeremiah Grossman 1310 00:44:53,600 --> 00:44:55,620 from White Hat Security 1311 00:44:55,620 --> 00:44:56,860 did a good study 1312 00:44:56,860 --> 00:44:57,700 on the Sammy worm. 1313 00:44:57,860 --> 00:44:58,600 He showed how 1314 00:44:58,600 --> 00:44:59,600 the propagation 1315 00:45:00,200 --> 00:45:01,200 associated with Sammy worm 1316 00:45:01,200 --> 00:45:02,400 was unlike any other worm 1317 00:45:02,400 --> 00:45:03,060 we'd seen before. 1318 00:45:03,520 --> 00:45:04,680 The nice thing about it 1319 00:45:04,680 --> 00:45:06,060 wasn't really a malicious attack. 1320 00:45:06,360 --> 00:45:07,580 It was more of a friendly attack. 1321 00:45:07,880 --> 00:45:08,900 But it basically 1322 00:45:08,900 --> 00:45:09,540 ran JavaScript 1323 00:45:09,540 --> 00:45:11,480 on a million people's browsers 1324 00:45:11,480 --> 00:45:12,520 in a single evening. 1325 00:45:13,160 --> 00:45:13,920 That's propagation 1326 00:45:13,920 --> 00:45:14,700 we haven't seen. 1327 00:45:15,600 --> 00:45:16,540 In the case of the 1328 00:45:17,060 --> 00:45:17,540 QT worm 1329 00:45:17,540 --> 00:45:19,140 it was a malicious attack. 1330 00:45:19,580 --> 00:45:20,720 And it leveraged 1331 00:45:20,720 --> 00:45:21,120 that same 1332 00:45:21,120 --> 00:45:22,060 MySpace infrastructure 1333 00:45:22,060 --> 00:45:23,080 to deliver 1334 00:45:23,640 --> 00:45:24,120 functionality 1335 00:45:24,680 --> 00:45:26,200 to thousands of users 1336 00:45:26,200 --> 00:45:27,320 as a script 1337 00:45:27,320 --> 00:45:28,080 that ran alongside 1338 00:45:28,720 --> 00:45:29,820 a QuickTime movie. 1339 00:45:30,020 --> 00:45:30,520 Now I don't have time 1340 00:45:30,520 --> 00:45:31,640 to go into all the details here 1341 00:45:31,640 --> 00:45:32,780 but there's really 1342 00:45:32,780 --> 00:45:33,560 good information on this 1343 00:45:33,560 --> 00:45:34,700 on the Spy Dynamics website 1344 00:45:34,700 --> 00:45:35,600 as well as 1345 00:45:35,600 --> 00:45:36,140 Burt Pickle 1346 00:45:36,140 --> 00:45:36,960 did a really good job 1347 00:45:36,960 --> 00:45:39,180 of documenting 1348 00:45:39,180 --> 00:45:40,020 the code 1349 00:45:40,020 --> 00:45:40,820 of the attack. 1350 00:45:40,980 --> 00:45:41,220 And you can go 1351 00:45:41,220 --> 00:45:41,980 look those things up 1352 00:45:41,980 --> 00:45:43,060 and get more information 1353 00:45:43,060 --> 00:45:44,280 on the MySpace QT worm. 1354 00:45:45,480 --> 00:45:46,500 So they're telling me 1355 00:45:46,500 --> 00:45:46,860 I'm running low 1356 00:45:47,060 --> 00:45:47,200 on time 1357 00:45:47,200 --> 00:45:47,480 so I'm going to 1358 00:45:47,480 --> 00:45:48,700 skip ahead here 1359 00:45:48,700 --> 00:45:49,400 and talk about 1360 00:45:49,400 --> 00:45:50,720 one of the other challenges 1361 00:45:50,720 --> 00:45:51,840 is the de-perimeterization 1362 00:45:51,840 --> 00:45:53,180 of our environment. 1363 00:45:55,540 --> 00:45:56,440 Basically whereas 1364 00:45:56,440 --> 00:45:57,040 in the past 1365 00:45:57,040 --> 00:45:57,580 we had 1366 00:45:58,180 --> 00:45:59,220 the network threats 1367 00:45:59,220 --> 00:46:00,320 that were stopped by 1368 00:46:00,320 --> 00:46:00,960 our DMZ 1369 00:46:00,960 --> 00:46:01,840 or our firewalls 1370 00:46:01,840 --> 00:46:02,320 really nicely 1371 00:46:02,820 --> 00:46:04,320 XML and SOAP-based threats 1372 00:46:04,320 --> 00:46:04,980 get all the way 1373 00:46:04,980 --> 00:46:05,840 into our infrastructure. 1374 00:46:06,300 --> 00:46:07,600 And keeping this idea 1375 00:46:07,600 --> 00:46:08,360 of a thick 1376 00:46:08,360 --> 00:46:09,180 hard shell 1377 00:46:09,180 --> 00:46:10,000 with a gushy inside 1378 00:46:10,000 --> 00:46:11,680 is just not going to work 1379 00:46:11,680 --> 00:46:13,480 in the XML web services world. 1380 00:46:13,740 --> 00:46:14,540 We have to think 1381 00:46:14,540 --> 00:46:15,280 of a new way 1382 00:46:15,280 --> 00:46:16,120 of deploying security 1383 00:46:16,120 --> 00:46:17,420 to deal with these new 1384 00:46:17,420 --> 00:46:18,340 and next generation problems. 1385 00:46:19,640 --> 00:46:21,080 About five years ago 1386 00:46:21,080 --> 00:46:22,500 there was about 12 companies 1387 00:46:22,500 --> 00:46:23,140 that got funded 1388 00:46:23,140 --> 00:46:24,400 to do web services 1389 00:46:24,400 --> 00:46:25,220 firewalls 1390 00:46:25,220 --> 00:46:26,100 security gateways 1391 00:46:26,100 --> 00:46:26,460 and the like 1392 00:46:26,460 --> 00:46:27,280 and they were all basically 1393 00:46:27,280 --> 00:46:28,140 proxy solutions. 1394 00:46:28,940 --> 00:46:30,020 And that model 1395 00:46:30,020 --> 00:46:30,860 just didn't work. 1396 00:46:31,040 --> 00:46:31,920 It did not scale 1397 00:46:31,920 --> 00:46:32,720 it did not work 1398 00:46:32,720 --> 00:46:33,680 with the large enterprises 1399 00:46:34,260 --> 00:46:35,300 and it didn't really help 1400 00:46:35,300 --> 00:46:35,780 with the threats. 1401 00:46:35,900 --> 00:46:36,360 It was okay 1402 00:46:36,360 --> 00:46:37,660 for some of the authentication stuff 1403 00:46:38,160 --> 00:46:38,920 but then when you started 1404 00:46:38,920 --> 00:46:40,200 to do real business across them 1405 00:46:40,200 --> 00:46:41,140 the challenge you ran into 1406 00:46:42,120 --> 00:46:43,200 was you're doing 1407 00:46:43,200 --> 00:46:43,920 all this functionality 1408 00:46:43,920 --> 00:46:44,800 at the front door 1409 00:46:45,280 --> 00:46:45,860 before you ever reached 1410 00:46:45,860 --> 00:46:46,340 the application. 1411 00:46:46,680 --> 00:46:47,300 So you really couldn't 1412 00:46:47,300 --> 00:46:47,980 do good authorization. 1413 00:46:48,340 --> 00:46:48,800 You didn't know 1414 00:46:48,800 --> 00:46:49,900 whether this XML 1415 00:46:49,900 --> 00:46:50,440 was legitimate 1416 00:46:50,440 --> 00:46:52,240 for this backend application 1417 00:46:52,240 --> 00:46:53,780 because you had to verify it 1418 00:46:53,780 --> 00:46:54,880 way out at the front 1419 00:46:54,880 --> 00:46:55,380 of the perimeter. 1420 00:46:56,380 --> 00:46:57,680 What we're starting to see now 1421 00:46:57,680 --> 00:46:58,460 is a second generation 1422 00:46:58,460 --> 00:46:59,300 of these devices 1423 00:46:59,920 --> 00:47:00,760 coming into play 1424 00:47:00,760 --> 00:47:02,020 where you've got 1425 00:47:02,020 --> 00:47:03,360 XML IPS functionality 1426 00:47:03,360 --> 00:47:04,380 being built into 1427 00:47:04,380 --> 00:47:05,260 the perimeter. 1428 00:47:05,480 --> 00:47:06,460 Being able to detect 1429 00:47:07,200 --> 00:47:08,080 overtly malicious 1430 00:47:08,080 --> 00:47:08,900 XML documents. 1431 00:47:09,060 --> 00:47:09,780 It's not going to catch 1432 00:47:09,780 --> 00:47:10,620 some of the stuff 1433 00:47:10,620 --> 00:47:11,340 we talked about today 1434 00:47:11,340 --> 00:47:12,260 but the malformed stuff 1435 00:47:12,260 --> 00:47:12,880 it should catch 1436 00:47:12,880 --> 00:47:13,960 some of the content 1437 00:47:13,960 --> 00:47:14,740 injection things 1438 00:47:15,280 --> 00:47:15,960 that these IPS's 1439 00:47:15,960 --> 00:47:16,920 will detect. 1440 00:47:17,280 --> 00:47:18,260 If you look at 1441 00:47:18,260 --> 00:47:19,240 some of the business 1442 00:47:19,240 --> 00:47:20,060 models behind this 1443 00:47:20,060 --> 00:47:20,620 you've seen that 1444 00:47:20,620 --> 00:47:21,560 reactivity was recently 1445 00:47:21,560 --> 00:47:22,320 bought by Cisco. 1446 00:47:22,680 --> 00:47:23,760 Data power was bought 1447 00:47:23,760 --> 00:47:24,260 by IBM. 1448 00:47:24,580 --> 00:47:25,440 You're seeing 1449 00:47:25,440 --> 00:47:26,780 the first generation guys 1450 00:47:26,780 --> 00:47:27,440 being bought by 1451 00:47:27,440 --> 00:47:28,380 infrastructure plays 1452 00:47:28,380 --> 00:47:30,000 to deploy this functionality 1453 00:47:30,000 --> 00:47:30,900 at various points 1454 00:47:30,900 --> 00:47:31,700 within the infrastructure. 1455 00:47:32,120 --> 00:47:33,220 This way they can do 1456 00:47:33,220 --> 00:47:33,640 things like 1457 00:47:33,640 --> 00:47:34,780 the trust enablement 1458 00:47:34,780 --> 00:47:35,760 like authentication 1459 00:47:35,760 --> 00:47:36,160 authorization 1460 00:47:36,160 --> 00:47:37,760 much closer to the 1461 00:47:37,760 --> 00:47:38,360 actual application 1462 00:47:38,360 --> 00:47:39,060 that knows what 1463 00:47:39,060 --> 00:47:39,840 you're allowed to do 1464 00:47:39,840 --> 00:47:40,900 and keep the IPS 1465 00:47:40,900 --> 00:47:41,840 out at the front. 1466 00:47:43,340 --> 00:47:44,500 So you get an environment 1467 00:47:44,500 --> 00:47:45,160 that looks a little bit 1468 00:47:45,280 --> 00:47:45,640 like this. 1469 00:47:46,680 --> 00:47:48,380 So just quickly in summary 1470 00:47:48,380 --> 00:47:49,440 we've got a rapidly 1471 00:47:49,440 --> 00:47:50,200 changing environment 1472 00:47:50,200 --> 00:47:51,460 new applications 1473 00:47:51,460 --> 00:47:52,700 coming up all the time. 1474 00:47:52,800 --> 00:47:53,820 What's interesting to note 1475 00:47:53,820 --> 00:47:56,120 is that Ray Wagner 1476 00:47:56,120 --> 00:47:56,840 from Gartner said 1477 00:47:56,840 --> 00:47:57,900 that about 40% 1478 00:47:57,900 --> 00:47:59,640 of organizations today 1479 00:47:59,640 --> 00:48:00,960 that's Fortune 1000 1480 00:48:00,960 --> 00:48:02,360 have deployed 1481 00:48:02,360 --> 00:48:03,540 web services 1482 00:48:03,540 --> 00:48:04,260 that they don't have 1483 00:48:04,260 --> 00:48:04,720 documented 1484 00:48:04,720 --> 00:48:05,280 and they don't have 1485 00:48:05,280 --> 00:48:05,860 control over. 1486 00:48:06,540 --> 00:48:07,840 So the stuff is out there 1487 00:48:07,840 --> 00:48:08,640 and it's out the door. 1488 00:48:10,020 --> 00:48:11,460 With every technology 1489 00:48:11,460 --> 00:48:11,880 evolution 1490 00:48:11,880 --> 00:48:13,040 and technology 1491 00:48:13,040 --> 00:48:13,780 infrastructure 1492 00:48:13,780 --> 00:48:14,580 that we put in play 1493 00:48:15,380 --> 00:48:15,820 new targets 1494 00:48:15,820 --> 00:48:17,000 new attack vectors 1495 00:48:17,000 --> 00:48:17,660 come into play 1496 00:48:17,660 --> 00:48:18,640 that we didn't have before. 1497 00:48:19,060 --> 00:48:20,060 And as an industry 1498 00:48:20,060 --> 00:48:20,960 we need to work together 1499 00:48:20,960 --> 00:48:21,780 both to identify 1500 00:48:21,780 --> 00:48:22,340 the threats 1501 00:48:22,340 --> 00:48:23,920 but also I would like 1502 00:48:23,920 --> 00:48:24,780 to put out a call 1503 00:48:24,780 --> 00:48:25,660 to the community 1504 00:48:25,660 --> 00:48:26,900 to help with 1505 00:48:26,900 --> 00:48:28,000 pulling these threats in 1506 00:48:28,000 --> 00:48:28,880 and clapping 1507 00:48:28,880 --> 00:48:30,060 to classify them 1508 00:48:30,060 --> 00:48:31,140 so that when it comes 1509 00:48:31,140 --> 00:48:31,560 to mitigation 1510 00:48:31,560 --> 00:48:32,160 when you have to go 1511 00:48:32,160 --> 00:48:33,100 sit down with the developer 1512 00:48:33,100 --> 00:48:34,200 and say you need to do 1513 00:48:34,200 --> 00:48:35,120 these 12 new things 1514 00:48:35,120 --> 00:48:36,140 that you didn't do yesterday 1515 00:48:36,140 --> 00:48:37,360 to protect yourself 1516 00:48:37,360 --> 00:48:38,440 to protect your web services 1517 00:48:38,440 --> 00:48:39,520 they make it easy 1518 00:48:39,520 --> 00:48:40,380 for them to understand 1519 00:48:40,380 --> 00:48:41,380 why they should be 1520 00:48:41,380 --> 00:48:41,880 spending their time 1521 00:48:41,880 --> 00:48:42,600 working on security 1522 00:48:42,600 --> 00:48:44,140 why they should be adding 1523 00:48:44,140 --> 00:48:45,160 input validation 1524 00:48:45,160 --> 00:48:47,080 or hardening the parsers 1525 00:48:47,080 --> 00:48:47,740 that they're using 1526 00:48:47,740 --> 00:48:49,580 using a classification system 1527 00:48:49,580 --> 00:48:50,840 like the SOA threat model. 1528 00:48:50,960 --> 00:48:52,080 Now I like my SOA threat model 1529 00:48:52,080 --> 00:48:53,020 but if you've got a better one 1530 00:48:53,020 --> 00:48:53,440 fine. 1531 00:48:53,660 --> 00:48:54,380 Use something 1532 00:48:54,380 --> 00:48:55,140 to make it easier 1533 00:48:55,140 --> 00:48:56,440 to convey the message 1534 00:48:56,440 --> 00:48:57,540 to the developers 1535 00:48:57,540 --> 00:48:58,500 to the testers 1536 00:48:58,500 --> 00:48:59,920 and to your vendors. 1537 00:49:00,000 --> 00:49:01,060 Beat up on your vendors 1538 00:49:01,060 --> 00:49:02,020 whether it be IBM 1539 00:49:02,020 --> 00:49:02,840 whether it be Microsoft 1540 00:49:02,840 --> 00:49:04,160 whether it be an open source project 1541 00:49:04,680 --> 00:49:05,660 yell and scream 1542 00:49:05,660 --> 00:49:06,960 for them to do a better job 1543 00:49:06,960 --> 00:49:08,100 of creating security 1544 00:49:08,100 --> 00:49:09,060 in the parsers 1545 00:49:09,060 --> 00:49:09,860 in the processing 1546 00:49:09,860 --> 00:49:10,960 and in the frameworks 1547 00:49:10,960 --> 00:49:11,660 that we're deploying. 1548 00:49:11,920 --> 00:49:12,140 Thank you. 1549 00:49:13,400 --> 00:49:14,100 And with that 1550 00:49:14,100 --> 00:49:15,340 I think we're almost out of time. 1551 00:49:15,620 --> 00:49:16,500 For more information 1552 00:49:16,500 --> 00:49:17,880 you can either email me directly 1553 00:49:17,880 --> 00:49:19,140 or you can go look up 1554 00:49:19,140 --> 00:49:20,620 the Center for Advanced Defense Studies 1555 00:49:20,620 --> 00:49:22,320 at c4ads.com 1556 00:49:23,340 --> 00:49:24,020 dot org 1557 00:49:24,020 --> 00:49:24,360 I'm sorry. 1558 00:49:24,440 --> 00:49:24,820 Thank you.