00:00:00.000 --> 00:00:05.272 >>Hi, everyone. One more time. First DEF CON let me see show of 00:00:05.272 --> 00:00:09.743 hands? Wow. All right. It is DEF CON 101. Awesome. Welcome. 00:00:09.743 --> 00:00:14.648 Welcome. Welcome to all of you first timers. First off, I am 00:00:14.648 --> 00:00:19.119 Zack Fasel I'm managing partner over at Urbane Security. By day 00:00:19.119 --> 00:00:23.590 that pays the bills for me taking photos of food because 00:00:23.590 --> 00:00:29.296 I'm that guy. And then Saturday night if you want to come see me 00:00:29.296 --> 00:00:34.568 and Sec Barbie we're Dj-ing at 1:00 a.m. at the party. It's not 00:00:34.568 --> 00:00:38.805 going to matter you're not going to remember. When someone asked 00:00:38.805 --> 00:00:41.408 me what my credentials are, those are my credentials. And 00:00:41.408 --> 00:00:45.512 the reason I do that is because people like to have their long 00:00:45.512 --> 00:00:49.283 lists at Black Hat, RSA all these other Cons of all the 00:00:49.283 --> 00:00:53.687 things they have done, who they are. But I steal a tip from a 00:00:53.687 --> 00:00:56.857 friend of mine, Bruce potter, who, says don't believe anything 00:00:56.857 --> 00:01:00.827 I or anyone else is going to say. Bottom line always question 00:01:00.827 --> 00:01:03.597 everything. I'm not going to read the whole quote from Buddha 00:01:03.597 --> 00:01:07.334 up here, challenge everything, don't believe everything, don't 00:01:07.334 --> 00:01:09.903 ever hesitate to call bullshit that's for all of first timers, 00:01:09.903 --> 00:01:14.908 what is going on here? Call bullshit. If you hear something 00:01:14.908 --> 00:01:18.745 you don't agree with. First off I like to start the talk, what 00:01:18.745 --> 00:01:24.051 this talk is about so you don't spend the next 40 minutes or so 00:01:24.051 --> 00:01:30.157 waiting, I wish I went over to the DC101 panel and snuck in. 00:01:30.157 --> 00:01:33.961 We'll talk about the cloud. I guess we can't drink in here 00:01:33.961 --> 00:01:36.430 because confiscating beverages those who like to play the 00:01:36.430 --> 00:01:40.634 drinking game, drink water when I say "Cloud" I guess. Cloud. 00:01:40.634 --> 00:01:45.138 Obviously we're going to predicate this on the providers 00:01:45.138 --> 00:01:49.276 being secure. We spend hours talking about how the cloud is 00:01:49.276 --> 00:01:54.948 insecure because of its nature but it's not 1999 any more. It's 00:01:54.948 --> 00:01:58.251 not -- things have changed where a lot of these infrastructures 00:01:58.251 --> 00:02:02.923 were actually security in place. But then it comes down to us to 00:02:02.923 --> 00:02:06.393 actually config in a secure manner. We aren't going to 00:02:06.393 --> 00:02:09.896 ramble how cloud to insecure because of its nature. We're 00:02:09.896 --> 00:02:13.367 predicating it obviously like I said, focusing on a business 00:02:13.367 --> 00:02:16.837 level not on personal because obviously personal is a lot 00:02:16.837 --> 00:02:20.674 easier to handle than if you have got ten, hundred, thousand, 00:02:20.674 --> 00:02:24.144 we're not going to deal with hundred thousand that's whole 00:02:24.144 --> 00:02:28.982 other set of problems. We try to bring this down to DC101 level. 00:02:28.982 --> 00:02:33.186 This is not a talk about, again, rambling how cloud is a bad idea 00:02:33.186 --> 00:02:38.325 I think I got that out of the way. Maybe. We're not going to 00:02:38.325 --> 00:02:42.396 talk about every cloud provider out there is flaw with security 00:02:42.396 --> 00:02:46.433 or things that should be there and aren't. Not talking about 00:02:46.433 --> 00:02:50.504 compliance at all. Lot of you have to deal with compliance, 00:02:50.504 --> 00:02:55.275 deal with what is PCI, HIPAA, what does it mean for the cloud. 00:02:55.275 --> 00:02:59.680 We're not going to talk about that because that could be a 00:02:59.680 --> 00:03:02.949 painful check box discussion. First off, let's talk about 00:03:02.949 --> 00:03:06.620 cloud. This is cloud. Good. Final Fantasy! thank you! This 00:03:06.620 --> 00:03:11.058 is a cloud. I'm not sure if anyone is confused, are you 00:03:11.058 --> 00:03:16.063 keeping up? Okay. DEF CON 101. Make sure. Kidding. This is the 00:03:16.063 --> 00:03:20.600 cloud. Obviously we become familiar with all these fun 00:03:20.600 --> 00:03:26.106 little logos, and for those again we're going to start work 00:03:26.106 --> 00:03:31.144 our way up fast, cloud comes in three different flavors, 00:03:31.144 --> 00:03:34.648 structure, software, platform. You provide the virtualization 00:03:34.648 --> 00:03:37.250 layer, network layer you're responsible for the OS up. 00:03:37.250 --> 00:03:42.022 Platform handle the OS gave you a nice little API. Software 00:03:42.022 --> 00:03:47.627 layer is pretty much you got a front end that's all you got. 00:03:47.627 --> 00:03:51.898 They handle all of it. So, we all complain about security, we 00:03:51.898 --> 00:03:55.335 complain about cloud security when it comes down to why it 00:03:55.335 --> 00:03:58.138 applies for cloud focusing on, cloud wasn't designed for a 00:03:58.138 --> 00:04:02.109 cure. Designed to be external, sharing, designed to be open and 00:04:02.109 --> 00:04:04.978 easy and hosted by someone else and shared in an environment 00:04:04.978 --> 00:04:08.281 that can scale. There's not a word of security in there 00:04:08.281 --> 00:04:11.918 whatsoever. It has been tacked on as an after thought. We 00:04:11.918 --> 00:04:15.522 obviously with the cloud we have no control of these environments 00:04:15.522 --> 00:04:18.458 depending on the level, like I said infrastructure, you're 00:04:18.458 --> 00:04:22.162 responsible from OS up. Much you have this full trust this other 00:04:22.162 --> 00:04:27.200 company to handle it fully and securely in the way they see 00:04:27.200 --> 00:04:31.204 fit, right? In less you're coming with the trace Comas you 00:04:31.204 --> 00:04:36.309 can't go in there go, I would like to -- what you're actually 00:04:36.309 --> 00:04:40.213 doing. Like I said, shared tendency it scales. We're stuck 00:04:40.213 --> 00:04:44.518 with it. It's not going anywhere. It's here to stay. We 00:04:44.518 --> 00:04:47.654 can fight the battle against it but it's going to stay there. 00:04:47.654 --> 00:04:53.660 Assuming everything is fully secured on their side, after 00:04:57.164 --> 00:04:59.366 going through all these different cloud platforms all 00:04:59.366 --> 00:05:02.435 these different people using it, these are kind of the top things 00:05:02.435 --> 00:05:05.972 that I have seen as mistakes people make. From the user side 00:05:05.972 --> 00:05:09.209 and the admin side We're going to split that. User side, 00:05:09.209 --> 00:05:11.878 obviously you don't really have as much control as what you're 00:05:11.878 --> 00:05:15.515 users in the wild are going to be doing you have to basically 00:05:15.515 --> 00:05:17.951 let them roam free and put some controls on them hope it's all 00:05:17.951 --> 00:05:21.655 good. On administration side we have a little more control. To 00:05:21.655 --> 00:05:25.125 be able to actually control the environment and determine how 00:05:25.125 --> 00:05:29.329 it's going to be secured how are we going to handle the 00:05:29.329 --> 00:05:32.232 environment that's where you'll see the list, the majority of 00:05:32.232 --> 00:05:35.902 the -- going to show up on the sign. Majority of the fuck-ups 00:05:35.902 --> 00:05:43.877 happen. Yes. On the board. We're going to break down through 00:05:43.877 --> 00:05:48.081 these real fast. On the user auth management side this goes 00:05:48.081 --> 00:05:51.685 without saying everyone notice that there's a lack of two 00:05:51.685 --> 00:05:54.921 separate -- two factor called services. It's difficult to 00:05:54.921 --> 00:05:57.791 implement in these cloud environments. And having these 00:05:57.791 --> 00:06:00.961 users across all these different platforms all these different 00:06:00.961 --> 00:06:03.864 environments because, yes, sure, some providers offer everything 00:06:03.864 --> 00:06:07.834 under the sun. You typically diversify. So, having it so you 00:06:07.834 --> 00:06:12.138 can have unique log in so it doesn't have that ability to 00:06:12.138 --> 00:06:15.575 spread, is great. But it's hard for people to manage. There's 00:06:15.575 --> 00:06:19.779 too many credentials across all those services to manage and 00:06:19.779 --> 00:06:24.818 distribute across like I said user base of 10 --> 000, so on so 00:06:24.818 --> 00:06:28.321 forth. Another big thing is how long these sections valid once 00:06:28.321 --> 00:06:31.057 they actually get their session and able to use it. The it is it 00:06:31.057 --> 00:06:34.561 valid for the lifetime because they have API key or is it valid 00:06:34.561 --> 00:06:40.500 for 30-minute window. It varies from platform to platform. I 00:06:40.500 --> 00:06:43.270 think the biggest problem we have is monitoring user 00:06:43.270 --> 00:06:47.207 activity. A lot of these cloud providers have put together 00:06:47.207 --> 00:06:50.710 these environments that, sure, they have their own audit 00:06:50.710 --> 00:06:54.281 trailings. But they don't provide any visibility to the 00:06:54.281 --> 00:06:58.218 administrators, security teams, whoever may be, as to seeing 00:06:58.218 --> 00:07:00.920 what actions are actually being performed so you can determine 00:07:00.920 --> 00:07:06.493 if it's an anomaly or someone just hope that it -- so a lot of 00:07:06.493 --> 00:07:10.330 these activity logs that some providers are starting to offer, 00:07:10.330 --> 00:07:15.201 we'll go into more as to few of them. Some of them focus only on 00:07:15.201 --> 00:07:20.407 basic actions. Well, given valid session, that session could 00:07:20.407 --> 00:07:23.777 probably be migrated to any I.P. anywhere in the world. How do 00:07:23.777 --> 00:07:28.348 you detect this activity? It's what level of log in, what 00:07:28.348 --> 00:07:31.284 information are they giving with it and who is going to look at a 00:07:31.284 --> 00:07:34.587 webpage that's going to show, here is the last log in. We need 00:07:34.587 --> 00:07:36.623 way for these cloud services to be able to look at through 00:07:36.623 --> 00:07:41.394 automated method through some kind of API or Webhook that is 00:07:41.394 --> 00:07:46.066 able to provide with that information. I need water first. 00:07:46.066 --> 00:07:53.073 I'm just going to leave that up for a second. If a tree falls -- 00:07:53.073 --> 00:07:58.011 that's my water break slide. So, when it comes to the admin side, 00:07:58.011 --> 00:08:03.383 obviously we've seen a lot of issues, if people using shared 00:08:03.383 --> 00:08:07.354 accounts across multiple people, using password managers I'll 00:08:07.354 --> 00:08:11.825 touch on that, setting reset questions that are obviously 00:08:11.825 --> 00:08:16.296 guessable or easy or shared or known. And not willing two 00:08:16.296 --> 00:08:18.932 factor if it's a shared account how are you going to do a share 00:08:18.932 --> 00:08:24.738 two factor across -- ten people. Then obviously if you do have 00:08:24.738 --> 00:08:27.140 unique accounts for each person making sure they're disabled for 00:08:27.140 --> 00:08:32.812 everyone when they're terminated or patrol changed. When two 00:08:32.812 --> 00:08:37.584 factors doesn't do anything, so, in a case of, I'll talk about -- 00:08:37.584 --> 00:08:40.253 tool chain. Once you log in use two factor you are logged in 00:08:40.253 --> 00:08:45.859 until you log out. So, great. You use two factor on first log 00:08:45.859 --> 00:08:50.597 in, but given that single log it could be used forever, basically 00:08:50.597 --> 00:08:54.401 equivalent of not having two factor for any action. Back to 00:08:54.401 --> 00:09:00.540 the admin side. I know start the debate with this because I love 00:09:00.540 --> 00:09:03.510 talking about this. I hate password managers, I know that's 00:09:03.510 --> 00:09:06.846 an unpopular opinion. But frankly I am not a fan because 00:09:06.846 --> 00:09:10.850 you have just put all of your keys to the kingdom into a 00:09:10.850 --> 00:09:13.553 single place. Now I'm not saying all password managers are bad 00:09:13.553 --> 00:09:17.590 I'm saying ones that are shared across -- everyone with a flat 00:09:17.590 --> 00:09:20.794 file or implementations like last password, where you share, 00:09:20.794 --> 00:09:24.364 all your passwords at once, they're not monitored and they 00:09:24.364 --> 00:09:29.035 can be monitored but they're not. I'm for one see this as a 00:09:29.035 --> 00:09:33.306 big problem happening all the time is that we put all these 00:09:33.306 --> 00:09:36.543 shared keys of the kingdom within password manager, and 00:09:36.543 --> 00:09:40.113 given one person accessing this, they have access to everything. 00:09:40.113 --> 00:09:44.417 Now the argument could be made if you could access to the 00:09:44.417 --> 00:09:48.354 password eventually but at lot of these accounts you don't use 00:09:48.354 --> 00:09:52.292 every day. These are you're back up admin accounts, break glass, 00:09:52.292 --> 00:09:56.229 break fix is accounts having them in single password that is 00:09:56.229 --> 00:10:00.166 unlocked all the time being used constantly, kind of introduces a 00:10:00.166 --> 00:10:04.103 huge risk. Password ran over, we can argue about over drinks 00:10:04.103 --> 00:10:08.007 afterwards. That would be hours of arguments, so when it comes 00:10:08.007 --> 00:10:12.679 to API keys. One of the big things we see is, not locking 00:10:12.679 --> 00:10:17.317 down the API keys enough. They end up in repoes, in your code 00:10:17.317 --> 00:10:20.553 repoes that are internally hosted or even just on 00:10:20.553 --> 00:10:23.423 developer's work stations because of this whole DevOps 00:10:23.423 --> 00:10:26.259 movement. Everyone needs access to production because were 00:10:26.259 --> 00:10:30.563 faster and being more agile. The majority of APIs they offer some 00:10:30.563 --> 00:10:34.133 level of restrictions, but again depending upon the cloud service 00:10:34.133 --> 00:10:38.071 it requires review as to what level of restrictions the API 00:10:38.071 --> 00:10:42.008 keys have whether or not you have access to everything or 00:10:42.008 --> 00:10:45.578 have access to this subset of services we're offering. Again, 00:10:45.578 --> 00:10:49.182 various based provider we'll talk about that in a minute. 00:10:49.182 --> 00:10:53.119 Back to talking about the user monitoring and the admin side. 00:10:53.119 --> 00:10:55.955 Monitoring for actions and activity. When there's changes 00:10:55.955 --> 00:11:00.693 to user accounts, changes to critical services or SSH keys. 00:11:00.693 --> 00:11:04.964 It's really something that without being told through some 00:11:04.964 --> 00:11:08.001 kind of notification you have no idea. Unless you log in check it 00:11:08.001 --> 00:11:10.103 every day, there's no idea that it's been breached or 00:11:10.103 --> 00:11:16.109 compromised without obviously some level of monitoring. And 00:11:30.557 --> 00:11:33.493 obviously the traditional issues, as infrastructure side 00:11:33.493 --> 00:11:37.030 as I was saying majority of the things is the operating system, 00:11:37.030 --> 00:11:40.867 making sure that you have a hard operating system then on more of 00:11:40.867 --> 00:11:43.803 the Saas and Pass, the loosely protected code vaults using 00:11:43.803 --> 00:11:46.439 voice over I.P. anybody's for two factor authentication, as 00:11:46.439 --> 00:11:48.808 obviously you're getting token in e-mail. And general 00:11:48.808 --> 00:11:51.477 configuration, where is that laundry list of best practices. 00:11:51.477 --> 00:11:55.014 They had this huge level of trust on not just the cloud 00:11:55.014 --> 00:11:57.951 itself but other cloud services are leveraging other cloud and 00:11:57.951 --> 00:12:01.154 other third parties that we've kind of taken for granted, I 00:12:01.154 --> 00:12:04.090 think. We've taken focused on everything everything that we do 00:12:04.090 --> 00:12:07.026 as third party provider as their problem. Then we leverage 00:12:07.026 --> 00:12:09.696 another third party provider, their problem. There's a trust 00:12:09.696 --> 00:12:13.233 between provider one and two. And so in all of these cases 00:12:13.233 --> 00:12:16.169 such as authentication, java script, other files that may be 00:12:16.169 --> 00:12:18.538 hosted in the environment depending if it's content 00:12:18.538 --> 00:12:22.008 delivery network or if it's like your chef store, we start 00:12:22.008 --> 00:12:25.411 trusting all these third party services. What happens is when 00:12:25.411 --> 00:12:27.947 one of these are breached it starts the domino effect, it 00:12:27.947 --> 00:12:30.917 compromise this one side they can leverage the front end which 00:12:30.917 --> 00:12:34.053 can leverage injection, that can leverage, the password, access 00:12:34.053 --> 00:12:37.423 to it. We start having this trust that people don't commonly 00:12:37.423 --> 00:12:41.327 think of if this one thing on the end is compromised or 00:12:41.327 --> 00:12:43.930 breached or hacked or whatever you want to call it today, what 00:12:43.930 --> 00:12:49.569 is the impact all the way down to what matters. This is just 00:12:49.569 --> 00:12:52.538 the fun word of warning, in that whole trust relationships people 00:12:52.538 --> 00:12:55.742 have really trusted them, that this cloud is secure but there 00:12:55.742 --> 00:12:58.244 have been cases where people have been -- at least one 00:12:58.244 --> 00:13:00.980 confirmed case, someone has been hacked out of existence because 00:13:00.980 --> 00:13:03.282 they put all their backups within your same AWS account 00:13:03.282 --> 00:13:06.185 which had access to the production environment and when 00:13:06.185 --> 00:13:09.422 they got access to it they deleted everything. There goes 00:13:09.422 --> 00:13:13.026 the backups, same exact place as everything else. Quick water 00:13:13.026 --> 00:13:18.464 break. Another big thing is people the sense of encryption. 00:13:18.464 --> 00:13:23.870 The idea that we need all our data encrypted, encrypted. 00:13:23.870 --> 00:13:30.410 Because that's what we have been told. Encryption in transit is a 00:13:30.410 --> 00:13:35.815 good thing it's needed, it's necessary. But this idea of 00:13:35.815 --> 00:13:39.419 encryption at rest there's still access to that data, right? 00:13:39.419 --> 00:13:42.021 There's still where you're able to log in through a web portal 00:13:42.021 --> 00:13:45.291 have access to all the data. How does that encryption actually 00:13:45.291 --> 00:13:48.795 matter? Is it actually going to be encrypted in the browser 00:13:48.795 --> 00:13:52.932 level or just at desk who cares, right? Comes to a sense of, 00:13:52.932 --> 00:13:56.736 sure, if someone comes in takes hard drive out of the datacenter 00:13:56.736 --> 00:13:59.972 in the middle of some secure site, well, yes, that's 00:13:59.972 --> 00:14:02.342 protected. But how often is that actually happening? How often 00:14:02.342 --> 00:14:04.777 are we seeing someone drive a truck into a datacenter, smash 00:14:04.777 --> 00:14:06.979 through the wall take all this data out of there. We're not 00:14:06.979 --> 00:14:10.249 seeing that. This encryption on data at rest doesn't really 00:14:10.249 --> 00:14:14.020 matter in a lot of these cases in the datacenter with the cloud 00:14:14.020 --> 00:14:17.657 services because it's been unencrypted across all the cloud 00:14:17.657 --> 00:14:21.661 systems. This is for certain services that do encrypted on 00:14:21.661 --> 00:14:25.965 the host side, but we'll get to that later. How do we actually 00:14:25.965 --> 00:14:28.034 -- talked about the laundry list of problems. This is all the 00:14:28.034 --> 00:14:32.205 things you commonly see as the big cloud problems. How do we 00:14:32.205 --> 00:14:35.308 actually harden it. Now, before we continue through like this 00:14:35.308 --> 00:14:39.212 laundry list of services I have I have want to just preface it 00:14:39.212 --> 00:14:42.815 with, I did not pick on any specific cloud proffer I like to 00:14:42.815 --> 00:14:45.451 go through the gamut of the top things people I've seen use, and 00:14:45.451 --> 00:14:49.322 obviously things change so this might be outdated as of when the 00:14:49.322 --> 00:14:53.226 slides were finished up so it might be a little outdated but 00:14:53.226 --> 00:14:56.129 should be relatively accurate on the timeline for everything. 00:14:56.129 --> 00:14:58.865 Starting with the infrastructure side, like I said we're really 00:14:58.865 --> 00:15:02.301 reliant upon what we're provided with from a cloud service 00:15:02.301 --> 00:15:06.839 provider. So, I like to use as example someone who has kind of 00:15:06.839 --> 00:15:09.742 led the way of doing it right to provide us the most we can to 00:15:09.742 --> 00:15:12.178 secure the environment and trust that they're actually securing 00:15:12.178 --> 00:15:16.449 it and this is by no means endorsement, please don't all 00:15:16.449 --> 00:15:20.286 jump on me because I kind of love them. But obviously Amazon. 00:15:20.286 --> 00:15:23.589 They have really done a great work on the web services side of 00:15:23.589 --> 00:15:27.927 providing obviously this laundry list of having unique models for 00:15:27.927 --> 00:15:30.797 every person who is administrators. Having two 00:15:30.797 --> 00:15:34.467 factor authentication that doesn't require you to have a 00:15:34.467 --> 00:15:38.571 text message sent to your phone. Supporting single sign on 00:15:38.571 --> 00:15:42.275 includes, actually supporting open ideas which is not commonly 00:15:42.275 --> 00:15:45.144 seen, usually see Sam everywhere. And most 00:15:45.144 --> 00:15:48.014 importantly, supporting logging that we have visibility and 00:15:48.014 --> 00:15:51.984 access to. For those who are not familiar AWS offers, I can't 00:15:51.984 --> 00:15:54.120 remember when they rolled this out it was relatively in the 00:15:54.120 --> 00:15:56.189 last two or three years I believe, someone correct me if 00:15:56.189 --> 00:16:00.459 I'm wrong. AWS offers cloud trail, which is a nice little 00:16:00.459 --> 00:16:05.798 service that takes the audit logs from your events from APIs 00:16:05.798 --> 00:16:10.503 or IAM or S3 or however you're connecting it to your -- and 00:16:10.503 --> 00:16:15.208 provide them in a flat file that you can download to regular 00:16:15.208 --> 00:16:18.311 basis to monitor to see what that activity is. This is what 00:16:18.311 --> 00:16:22.315 I'm talking about when it comes to log in providing that kind of 00:16:22.315 --> 00:16:25.551 transparency to be able to see from that perspective I've seen 00:16:25.551 --> 00:16:28.087 that this action is normal, normal, normal, normal, what is 00:16:28.087 --> 00:16:30.356 this API key requesting this from, I've never seen it before. 00:16:30.356 --> 00:16:35.127 To be able to make those judgments yourself. Now, I'm not 00:16:35.127 --> 00:16:39.398 picking on anyone but on a less secure side, you have like 00:16:39.398 --> 00:16:44.103 service like Rackspace, I'm not picking on anyone in particular 00:16:44.103 --> 00:16:49.008 has two factors that requires on SMS the permission modules all 00:16:49.008 --> 00:16:52.545 that fun stuff. The platform for to you get that logging data. 00:16:52.545 --> 00:16:56.649 You trust that if someone got access to it they should have 00:16:56.649 --> 00:17:00.686 access it to, you're not able to monitor for that. Also doesn't 00:17:00.686 --> 00:17:05.625 support single sign on through SAML or other methods. To go 00:17:05.625 --> 00:17:08.561 through the laundry list I won't eat up too much time on all 00:17:08.561 --> 00:17:12.665 these, I swear. Just fun information. Digital ocean, 00:17:12.665 --> 00:17:18.037 obviously a big one that's been growing. Has strong permission 00:17:18.037 --> 00:17:22.842 models, doesn't have single sign on yet, but to support TOTP. 00:17:22.842 --> 00:17:28.180 It's off line. Two factor. The log has some that they're 00:17:28.180 --> 00:17:33.986 starting with -- it's not fully robust or as robust of events 00:17:33.986 --> 00:17:39.292 that you'd want to get. Soft layer side, another company lot 00:17:39.292 --> 00:17:44.363 of people are moving to for cloud services, years ago, 00:17:44.363 --> 00:17:47.433 obviously you have strong permission models but again some 00:17:47.433 --> 00:17:50.102 kind of log in coming out but how you get these actual events 00:17:50.102 --> 00:17:54.173 it's not a lot. Then finally Join is the other big 00:17:54.173 --> 00:17:57.810 infrastructure as a service that everyone has been going to, 00:17:57.810 --> 00:18:02.448 strong to factor, no single sign in. These are thing you want to 00:18:02.448 --> 00:18:06.819 look for when you're kind of selecting where you want to send 00:18:06.819 --> 00:18:10.756 your stuff in the cloud. On the services side, we're looking for 00:18:10.756 --> 00:18:13.326 the same kind of thing but probably more logging because at 00:18:13.326 --> 00:18:16.762 that level we are fully trusting the platform, fully trusting the 00:18:16.762 --> 00:18:19.365 software and we need to see what events are actually there not 00:18:19.365 --> 00:18:25.371 able to implement our own on the operating system level. Obvious 00:18:31.277 --> 00:18:36.983 office 365 like I said not going to read through all of them, one 00:18:36.983 --> 00:18:40.853 thing I'm point out the log inside they just started 00:18:40.853 --> 00:18:44.190 offering -- offered for -- exchange, sorry. For exchange 00:18:44.190 --> 00:18:48.060 they offered it through Powershell to be able to 00:18:48.060 --> 00:18:52.365 moderate. However just recently rolled out this new management 00:18:52.365 --> 00:18:56.469 activity API back in April. Now, it's a nice to see them taking 00:18:56.469 --> 00:18:59.572 step in the right direction of offering these kind of log in 00:18:59.572 --> 00:19:02.074 events that everyone can take and monitor it was limited 00:19:02.074 --> 00:19:05.144 release was focused on a lot of these vendors that were offering 00:19:05.144 --> 00:19:08.247 the cloud solutions you had to request access to it. I'm not 00:19:08.247 --> 00:19:11.350 sure the current state much it today but seems like it's 00:19:11.350 --> 00:19:14.754 rolling forward as they have list of I think 20 or so 00:19:14.754 --> 00:19:18.057 partners that actually capture this data. It's good to see 00:19:18.057 --> 00:19:20.793 you're able to get that traditional log-in data out of 00:19:20.793 --> 00:19:25.431 there infrastructure that you would normally have yourself. On 00:19:25.431 --> 00:19:29.301 the Google apps side, again, another strong case similar to 00:19:29.301 --> 00:19:32.304 the Amazon side that they have grown and adapted, strong 00:19:32.304 --> 00:19:36.909 permission model, strong two factor, having SAML which is 00:19:36.909 --> 00:19:41.614 great on the log inside, yes, they have the reports, API log 00:19:41.614 --> 00:19:45.217 in activity. I'll go through a little bit of that in a minute 00:19:45.217 --> 00:19:49.255 here we'll get through the rest of these so we don't eat up too 00:19:49.255 --> 00:19:52.425 much time. On the Dropbox side, strong model. Logging is offered 00:19:52.425 --> 00:19:56.996 through their audit log, API and point. For some reason people 00:19:56.996 --> 00:20:03.702 are going to Dropbox, box also offers log in. They do offer 00:20:03.702 --> 00:20:08.841 SAML they offer it by request through your account manager. 00:20:08.841 --> 00:20:11.377 So, I don't know that there is an additional charge or offer as 00:20:11.377 --> 00:20:14.480 feature. But there's no way to automatically enable it to my 00:20:14.480 --> 00:20:18.217 knowledge. They do also offer log in like I said through kind 00:20:18.217 --> 00:20:22.488 of a more verbose of all the log in platforms through events API 00:20:22.488 --> 00:20:24.924 able to get a lot of this information in regards to the 00:20:24.924 --> 00:20:29.061 files were downloaded, uploaded to that level beyond just 00:20:29.061 --> 00:20:31.597 somebody connected, somebody logged in that gives you that 00:20:31.597 --> 00:20:35.434 anomaly data to be able to see, I just saw someone download all 00:20:35.434 --> 00:20:40.239 of this folder, all of this data what is going on here. And 00:20:40.239 --> 00:20:44.543 another strong case Salesforce, but we all know about Salesforce 00:20:44.543 --> 00:20:47.713 probably by now log-in history which is going to be log-in 00:20:47.713 --> 00:20:52.985 trail. List goes on of all thee. I tried to call out the big 00:20:52.985 --> 00:20:56.288 ones. These are the key things I think when you're looking for 00:20:56.288 --> 00:20:58.858 what you're going to host your cloud services, what you need to 00:20:58.858 --> 00:21:02.862 look for. Make sure that you can have unique log ins for every 00:21:02.862 --> 00:21:05.698 person, not having a shared account. Depending what services 00:21:05.698 --> 00:21:09.135 able to take in enable or disable people who have their 00:21:09.135 --> 00:21:11.971 unique accounts. Being able to tighten up the permissions 00:21:11.971 --> 00:21:15.407 instead of just, admin, have fun, able to limit to certain 00:21:15.407 --> 00:21:18.711 level. They have two factor or two step. Authentication. 00:21:20.913 --> 00:21:26.318 Whether it be through TOTP which is the standard that does base 00:21:26.318 --> 00:21:31.323 on time, office line. Or the SMS which again requires live cell 00:21:31.323 --> 00:21:35.461 connectivity which I hate, by the way. Single sign out. Wi-Fi 00:21:35.461 --> 00:21:41.500 on planes and to factor does not mix. It's not fun. Single sign 00:21:41.500 --> 00:21:46.605 on using SAML that is standard. If you're able to roll 00:21:46.605 --> 00:21:50.242 authentication back to your side to control the access at a 00:21:50.242 --> 00:21:52.645 single centralized source instead of across a large number 00:21:52.645 --> 00:21:56.081 of platforms. And then obviously the key thing I like to think of 00:21:56.081 --> 00:21:59.852 to look for to see far they are in their platform is the 00:21:59.852 --> 00:22:04.123 capabilities they have on the audit trail side. What they are 00:22:04.123 --> 00:22:07.459 providing on log-in perspective. Now, obviously whenever there's 00:22:07.459 --> 00:22:11.430 a problem, the industry has jumped to it said, I can fix 00:22:11.430 --> 00:22:16.268 that. They have always had this magic security bullet. By the 00:22:16.268 --> 00:22:21.373 way, I've noticed, included some silicon valley stuff, how many 00:22:21.373 --> 00:22:26.712 people have seen the TV show? Good, it's not lost on everyone. 00:22:26.712 --> 00:22:32.184 If you haven't seen it, I love it, it's fun, I like my TV 00:22:32.184 --> 00:22:36.488 shows, this times it's silicon valley, last year it was archer. 00:22:36.488 --> 00:22:41.026 Sorry for you fans I still love them. On the magic bullet side 00:22:41.026 --> 00:22:44.763 of being able to fix everything, they really come in these five 00:22:44.763 --> 00:22:50.636 flavors. Transparent proxy or visible proxy. Some kind of 00:22:50.636 --> 00:22:54.440 client end point program, some level of monitoring through an 00:22:54.440 --> 00:22:58.944 API or Webhook. Or proxy. Identity management that's the 00:22:58.944 --> 00:23:05.117 buzz word for three years. And obviously leveraging API to get 00:23:05.117 --> 00:23:09.889 information in a pretty fancy way. So, on the encryption side 00:23:09.889 --> 00:23:13.259 this is where the proxies really shine. A lot of these cloud 00:23:13.259 --> 00:23:16.095 security providers have started offering these proxies whether 00:23:16.095 --> 00:23:21.100 it through encryption or on the web level side. So on the 00:23:21.100 --> 00:23:24.403 transparent proxy on the web level side or non-transparent, 00:23:24.403 --> 00:23:28.807 the problem you run into is that it doesn't work with non-web 00:23:28.807 --> 00:23:33.012 applications. You are limited to using only the web applications, 00:23:33.012 --> 00:23:38.384 only API endpoints through the limited subset, so really it 00:23:38.384 --> 00:23:41.387 breaks a lot of functionality when these transparent proxies. 00:23:41.387 --> 00:23:45.591 Vendors will argue both ways. May vary. Requires leveraging 00:23:45.591 --> 00:23:52.865 said proxy for access whether it's behind your fire wall which 00:23:52.865 --> 00:23:57.536 basically defeats the person of having cloud. Or having it where 00:23:57.536 --> 00:24:01.373 you have to have an external end point which again is having 00:24:01.373 --> 00:24:03.442 cloud all over again just a different kind much cloud on the 00:24:03.442 --> 00:24:06.478 cloud of the cloud. Doesn't really solve the problems to my 00:24:06.478 --> 00:24:11.450 mind. Then host level encryption mostly comes to file hosting, 00:24:11.450 --> 00:24:13.752 provides virtual folder that encrypts the file before it even 00:24:13.752 --> 00:24:20.993 hits. So, this could be in and of itself a 20 minute rant but 00:24:20.993 --> 00:24:25.731 I'll be fast on this. Certain cloud providers, remain 00:24:25.731 --> 00:24:30.069 nameless, have offered function preserving encryption. So, this 00:24:30.069 --> 00:24:35.207 in a lot of cases is not encryption to the standard we 00:24:35.207 --> 00:24:40.779 think it is. So, basically what happens is, in order to -- to 00:24:40.779 --> 00:24:44.216 preserve the function of the application you're leveraging it 00:24:44.216 --> 00:24:48.153 will do some certain things, need to be able to search, need 00:24:48.153 --> 00:24:52.424 to be able to sort those are the two key features is searching 00:24:52.424 --> 00:24:56.028 and sorting what good is cloud application if you break it 00:24:56.028 --> 00:24:58.964 completely because you encrypted everything you're not able to 00:24:58.964 --> 00:25:02.668 search for things when what is the point. What happens is in 00:25:02.668 --> 00:25:05.738 order to make it searchable you have to make it so this word is 00:25:05.738 --> 00:25:08.340 the same word across everywhere -- every field, everywhere 00:25:08.340 --> 00:25:15.881 reference that needs to be seeing the exact same way. So 00:25:15.881 --> 00:25:19.284 what you effectively create is a substitution cipher which is 00:25:19.284 --> 00:25:23.889 basically saying, dog is cat. Instead of using plain English 00:25:23.889 --> 00:25:27.993 we see it leverages UTF depending on the support of the 00:25:27.993 --> 00:25:31.563 individual application, you'll see a bunch of Arabic or 00:25:31.563 --> 00:25:34.733 Mandarin characters or Japanese characters it's using full 00:25:34.733 --> 00:25:38.270 character set visible and invisible in order to render 00:25:38.270 --> 00:25:42.508 with that field and be compliant with the application. But again 00:25:42.508 --> 00:25:47.046 no matter whether it's visible or not, to a program it's still 00:25:47.046 --> 00:25:49.848 there. It's a simple substitution cipher that given 00:25:49.848 --> 00:25:54.520 enough time, given enough review you can figure out what this 00:25:54.520 --> 00:25:58.390 jumble bunch much characters is. Now on the other side where it 00:25:58.390 --> 00:26:02.461 comes to sort you have to be able to preserve the order. So 00:26:02.461 --> 00:26:06.965 in order to be able to preserve the order you have to make A 00:26:06.965 --> 00:26:11.770 less than B, C, D, so son, so forth. The length as well has to 00:26:11.770 --> 00:26:15.908 remain similar in order to be able to take and say this word 00:26:15.908 --> 00:26:20.412 is shorter than this word when I do the sort, I'm able to know 00:26:20.412 --> 00:26:24.216 which is less. And be able to reference each character. So 00:26:24.216 --> 00:26:26.318 what happens is with these function preserving encryption 00:26:26.318 --> 00:26:30.088 that support sort you have created a dictionary that you 00:26:30.088 --> 00:26:34.193 can sort in order of all the crypto data go, okay, this is at 00:26:34.193 --> 00:26:38.297 the top I'm assume this is A, this next letter is maybe a B, 00:26:38.297 --> 00:26:41.567 figures it out over time because you have this large set of data 00:26:41.567 --> 00:26:44.536 that you're able to happen map. To granted this is only when you 00:26:44.536 --> 00:26:47.072 use this function preserving encryption this is not to blast 00:26:47.072 --> 00:26:52.110 any product completely as a problem, but that feature set 00:26:52.110 --> 00:26:56.215 that people are being sold on it's snake oil. I hate to say 00:26:56.215 --> 00:27:00.953 it: I probably will get some flack for it. There's a little 00:27:00.953 --> 00:27:05.324 URL if you're interested in reading up on the agriculture of 00:27:05.324 --> 00:27:10.128 the DMCA take down this certain vendor for looking at it. Not 00:27:10.128 --> 00:27:14.533 just -- other ones as well. Again product side. I know I'm 00:27:14.533 --> 00:27:16.735 running short on time I'm going to speed it up here a little bit 00:27:16.735 --> 00:27:20.105 if I haven't been going fast enough. So, on the being able to 00:27:20.105 --> 00:27:23.509 grab the logs that weep were talking about very dependent on 00:27:23.509 --> 00:27:26.612 what API provides. Some cases implement a proxy that they're 00:27:26.612 --> 00:27:29.715 required to go through without encryption feature set to be 00:27:29.715 --> 00:27:33.285 able to log all the user activity, but then requires you 00:27:33.285 --> 00:27:37.623 to come from a certain API. On the identity management side, 00:27:37.623 --> 00:27:42.661 obviously being able to bring that in they use SAML to connect 00:27:42.661 --> 00:27:46.865 to existing database -- user data stores, determine, hey, I'm 00:27:46.865 --> 00:27:52.337 going to connect, can I connect to radius use that as my store 00:27:52.337 --> 00:27:56.542 and provide these SAML. Then on the API side obviously 00:27:56.542 --> 00:27:59.912 leveraging existing APIs you're insecure in these ten 00:27:59.912 --> 00:28:04.917 configurations I can see that through the web portal if I had 00:28:04.917 --> 00:28:09.955 to walk through, okay, thank you. Cool to give me a little 00:28:09.955 --> 00:28:14.159 score. I always like to say, sure, use expensive products 00:28:14.159 --> 00:28:19.197 works great with large number of users. You don't have the budget 00:28:19.197 --> 00:28:24.136 to handle this. I like to always say, build it yourself, fix it 00:28:24.136 --> 00:28:28.674 yourself. Figure out how you can take and make the most with what 00:28:28.674 --> 00:28:31.510 you have for now. Obviously if you can afford it you can afford 00:28:31.510 --> 00:28:34.246 it. Obviously the basic 101, hard net which is obviously 00:28:34.246 --> 00:28:37.983 simple. The key thing I want to point out here is, if you're 00:28:37.983 --> 00:28:41.186 using some kind of tool chain associated with one of these 00:28:41.186 --> 00:28:44.656 cloud providers, a lot of them will cache the tokens on the 00:28:44.656 --> 00:28:48.393 system for a long period of time. Like I was saying on the 00:28:48.393 --> 00:28:51.897 heroic side, if you don't log out, you have the forever. 00:28:51.897 --> 00:28:56.301 Obviously watch where your code repo is especially using some 00:28:56.301 --> 00:29:00.205 kind of automated continuous integration or leveraging it for 00:29:00.205 --> 00:29:05.043 something like chef or puppet. Make sure that that area is 00:29:05.043 --> 00:29:10.616 hardened and secure not anyone can come in like I said, then 00:29:10.616 --> 00:29:15.654 impact all the things down the line. Modern integrity is 00:29:15.654 --> 00:29:18.190 interesting side that I don't think when it comes to cloud 00:29:18.190 --> 00:29:22.394 enough people do. Infrastructure is not as easy. Traditional 00:29:22.394 --> 00:29:25.764 integrity monitoring handles the actual operating system and the 00:29:25.764 --> 00:29:29.434 host. When it comes to the platform side and software side 00:29:29.434 --> 00:29:33.071 you really have to rely on the platform side you can obviously 00:29:33.071 --> 00:29:35.273 script your own thing to check if to see if a page is changed 00:29:35.273 --> 00:29:38.076 or change to something you've referenced or java script you 00:29:38.076 --> 00:29:42.981 can script that out as I touched on later on in this list is, 00:29:42.981 --> 00:29:47.486 building your own cron job to moderate see if there is any 00:29:47.486 --> 00:29:50.489 difference. Notifying you that there is, hey, I've noticed my 00:29:50.489 --> 00:29:53.158 homepage has changed. I've noticed that this java script 00:29:53.158 --> 00:29:56.495 library now includes another line. That's externally 00:29:56.495 --> 00:30:00.232 referenced. On the SaaS side there's not really anything you 00:30:00.232 --> 00:30:04.536 can monitor. It's not like you can monitor the changes of their 00:30:04.536 --> 00:30:08.473 code because they're changing all the time. You have to rely 00:30:08.473 --> 00:30:11.810 on available APIs on the log inside. Back to the whole 00:30:11.810 --> 00:30:14.813 authentication side, implementing single sign on is 00:30:14.813 --> 00:30:18.650 not as hard as everyone tries to make it out to be unless 100 --> 000 00:30:18.650 --> 00:30:22.854 users. When it comes to implementing SAML there is some 00:30:22.854 --> 00:30:27.959 existing open source tools that are out there that will let you 00:30:27.959 --> 00:30:33.865 do it. Glue is a front end Gui package of -- which is java 00:30:33.865 --> 00:30:38.537 based. Also Ruby library that all of the identity providers in 00:30:38.537 --> 00:30:41.473 it. SAML is a talk in and of itself, so I am sorry if I am 00:30:41.473 --> 00:30:46.411 covering it very high level. On the SAML side there are 00:30:46.411 --> 00:30:48.413 different roles and you need to provide the different identity 00:30:48.413 --> 00:30:50.415 role. The key thing is no matter how you implement single sign 00:30:50.415 --> 00:30:53.618 on, you need to make sure you have some form of multi factor 00:30:53.618 --> 00:30:56.555 on that single sign on that you protect those certificates and 00:30:56.555 --> 00:31:02.160 those keys, and see where the support for those single sign on 00:31:02.160 --> 00:31:05.397 applications are In a lot of cases you still have to generate 00:31:05.397 --> 00:31:09.935 per application passwords, which in some cases This provides 00:31:09.935 --> 00:31:15.941 interesting logging aspect to be able to capture all the log 00:31:20.579 --> 00:31:27.886 innings on your own time. But obviously not subsequent action 00:31:27.886 --> 00:31:30.889 logs. If you're cloud provider, did I just lose signal they lost 00:31:30.889 --> 00:31:33.892 signal, good. No more words. So, back to the API key side. Again, 00:31:33.892 --> 00:31:36.228 with it being distributed across everywhere, it's real easy to 00:31:36.228 --> 00:31:39.231 build API proxy. It's a few lines ever code to be able to 00:31:39.231 --> 00:31:43.235 take and there's a sample up on that tiny URL to build a proxy 00:31:43.235 --> 00:31:49.241 that you can basically write your own API abstraction layer 00:31:52.511 --> 00:31:56.515 that says here are my internal API keys I'm going to protect 00:31:56.515 --> 00:31:59.551 these really tight within this little proxy I'm writing. Then 00:31:59.551 --> 00:32:02.487 you can write your own level of source limitations, dynamically 00:32:02.487 --> 00:32:06.024 provisioned really provide a nice little layer in front of 00:32:06.024 --> 00:32:09.694 whatever the cloud provider is which may have a more rigid kind 00:32:09.694 --> 00:32:15.700 of key -- OAF key layer. Or -- sorry. Another big thing if 00:32:18.570 --> 00:32:21.873 you're not able to use single sign on you have to use shared 00:32:21.873 --> 00:32:25.944 accounts when it comes to two factors for the shared accounts 00:32:25.944 --> 00:32:30.348 make sure it's enabled if they support TOTP being able to take 00:32:30.348 --> 00:32:34.352 leverage your own factor because TOTP is open RFC standard that 00:32:34.352 --> 00:32:38.290 you can get online and log in when someone requests. Again, 00:32:38.290 --> 00:32:44.729 very easy to script up and there's Ruby and python and 00:32:44.729 --> 00:32:49.968 pearl, the TOTP stuff. Then finally since I am running out 00:32:49.968 --> 00:32:55.707 of time, is audit, audit, audit, log, log, log. My last talk was 00:32:55.707 --> 00:32:59.644 about logging all the things, but we need to start monitoring 00:32:59.644 --> 00:33:03.181 logging our own activities on these service providers -- or 00:33:03.181 --> 00:33:07.919 software as a service cloud size. So, again, it's very 00:33:07.919 --> 00:33:12.324 largely dependent upon -- one of those things as you select cloud 00:33:12.324 --> 00:33:15.894 service you need to make sure you focus on when it comes 00:33:15.894 --> 00:33:19.664 office 365 it's very Powershell focused. Make sure you have 00:33:19.664 --> 00:33:22.601 something that is Powershell friendly. Admin events API is 00:33:22.601 --> 00:33:26.872 brand new except for the exchange side which has existing 00:33:26.872 --> 00:33:30.742 structure. But it works. Dropbox, box, AWS, Google, few 00:33:30.742 --> 00:33:34.579 others, they're polling based. When you build this application 00:33:34.579 --> 00:33:39.284 you have to poll at regular interval or whatever interval to 00:33:39.284 --> 00:33:44.656 set, not like Webhook or an event that you're able to say, 00:33:44.656 --> 00:33:47.225 when this event fires send me notification. There are a few 00:33:47.225 --> 00:33:49.728 platforms that offer but majority do not offer that kind 00:33:49.728 --> 00:33:54.232 of level. You need to make sure you are able to have some kind 00:33:54.232 --> 00:33:57.736 of application to poll at a regular basis. Send them 00:33:57.736 --> 00:34:00.872 somewhere you actually monitor or general operate poll alert 00:34:00.872 --> 00:34:04.376 something that you'll see, holding on to them means nothing 00:34:04.376 --> 00:34:08.980 unless you follow up on them and quick little script up of that 00:34:08.980 --> 00:34:12.851 tiny URL for script called stormy the cloud. Which kind of 00:34:12.851 --> 00:34:17.789 works. That is it. I'm going -- I've been told since I was short 00:34:17.789 --> 00:34:21.660 on time, I'm going to take questions, that's the exit sign? 00:34:21.660 --> 00:34:25.897 I'll be out there this anyone wants to ask any questions and 00:34:25.897 --> 00:34:30.135 get text talk in here because I took time to cycle through. 00:34:30.135 --> 00:34:34.439 Other than that. There is my contact information. Welcome to 00:34:34.439 --> 00:34:38.510 DEF CON. Have a great week.