[00:00.000 --> 00:08.010] So we're talking about security logs. They're not good enough. So I think you're logging [00:08.010 --> 00:12.310] everything important. You turned on logging in all your critical systems. You set up a logs [00:12.310 --> 00:17.430] management tool. You created rules to alert you when something is not right. You're totally [00:17.430 --> 00:30.580] covered. If a customer accuses your employees of looking at user data. Right? Right? Nope. If [00:30.580 --> 00:35.280] you're relying solely on security logs to protect your user's data, you almost certainly won't [00:35.280 --> 00:40.280] be able to tell what's happened in the event of employee access to employee abuse of user [00:40.280 --> 00:45.800] data. Security logs aren't enough to protect your users or you from malicious activity [00:45.800 --> 00:52.920] targeting user data. So first off, who am I? Why do I think I can talk about user data access [00:52.920 --> 00:58.700] logs? My name is Alicia clock. I'm a privacy TPM at Lyft. Before Lyft, I was a security [00:58.700 --> 01:03.560] engineer in privacy at Google. Before that, I worked for Boeing building security systems for [01:03.560 --> 01:10.760] government customers. My entire career has been about protecting data. So now that you know who [01:10.760 --> 01:14.860] I am, what's all this about security logs not being good enough to protect your user's data? [01:19.530 --> 01:27.630] So let's start with the basics. Why do we log anything at all? Anybody? 6 o'clock p.m. I'm [01:27.630 --> 01:31.570] totally making this an interactive presentation. You ought to talk to me here. So why do we log [01:31.570 --> 01:48.890] stuff? Something untoward happens. Audit. Yeah. Regulations. Developers left it in. So [01:49.730 --> 01:54.070] accountability. Yeah. Generally speaking, what I'm hearing from a lot of you is we want to [01:54.070 --> 02:01.550] provide a record of an event and specifically to aid in future investigations. Broadly speaking, [02:01.570 --> 02:06.110] we need to be able, if an investigation is needed, we need to be able to tell what [02:06.110 --> 02:14.410] happened. All right. But when I say an event, what does that mean? So I'm assuming y'all being [02:14.410 --> 02:18.770] here at DEF CON that you're familiar with security events. But just in case, here's a real [02:18.770 --> 02:26.450] quick review. A security event can be broadly defined as an unauthorized access to one or more [02:26.450 --> 02:32.490] systems. There's a lot of possible motives for this. Money, by stealing data that can be [02:32.490 --> 02:37.690] sold to third parties or just stealing money. Political or ideological motivations that [02:37.690 --> 02:44.010] result in vandalization or destruction, fame and fortune by stamping over a customer's [02:44.830 --> 02:50.530] company's website with, I hacked this. Or even just laying the groundwork for future attacks. [02:55.650 --> 03:00.710] So when you're faced with a security event, you need to know three key things. When [03:00.710 --> 03:07.330] it happened, where or on what system it happened and what exactly happened. Let's say you [03:07.330 --> 03:11.490] get an alert that someone tried to log in as root on your system. When you go to [03:11.490 --> 03:22.410] investigate, you need to find out these three things. What, when and where. You have to [03:22.410 --> 03:29.470] forgive me for having the awkward speaker's notes here and computer here because Windows 10 [03:29.470 --> 03:39.290] does not agree with multiple displays. So a typical security log like these sample SSH logs [03:39.850 --> 03:45.210] provides all the information, the when, the where, the beginning, you have your time stamp, [03:45.210 --> 03:50.850] you have your host name and the what at the end. So you can look at a set of logs like this and [03:50.850 --> 03:56.910] see that somebody tried to log in as root or two people tried to log in as root or possibly the [03:56.910 --> 04:02.890] same person from two different IPs. One failed and then one succeeded. With this [04:02.890 --> 04:08.070] information, you can determine whether the attack was successful, whether any information was [04:08.070 --> 04:14.430] accessed, how long the attack lasted and then you can use that information to increase your [04:14.430 --> 04:20.530] security. Maybe change the root password or implement stronger SSH policies or even just [04:20.530 --> 04:30.470] banning those IPs. All right. So that's a security event. Security investigation. What's the [04:30.470 --> 04:37.770] big deal about user data access events? How are they any different? Let's take a look at what [04:37.770 --> 04:43.850] constitutes a user data access event. For starters, the definition is different. It's an [04:43.850 --> 04:48.550] access to user data without business justification. The key point here is business [04:48.550 --> 04:55.910] justification. In most companies, employees do have reasons to access user data, like fixing [04:55.910 --> 05:01.250] bugs or providing customer support, things like that. A user data access event is when an [05:01.250 --> 05:07.010] employee doesn't have a legitimate reason to access user data. So there's a lot of reasons why [05:07.010 --> 05:11.370] someone might look at user data. They might be maliciously stalking someone. They might have [05:11.370 --> 05:16.130] spotted a family member's or celebrity's account, got curious, decided to, you know, poke [05:16.130 --> 05:22.830] around, see what they could see. They might be trying to commit fraud. Maybe they're going to [05:23.490 --> 05:28.110] access a family member's account, provide a few extra services that aren't being paid for, [05:28.110 --> 05:32.570] erase a balance, something like that. They may even be simply trying to help someone but [05:32.570 --> 05:40.580] aren't going through the proper channels. When you're investigating a user data access event, [05:40.580 --> 05:45.380] you need to know the same thing as a security event, where it happened, when it happened and [05:45.380 --> 05:51.140] what was done. But you also need three more pieces of information in order to successfully [05:51.140 --> 05:56.560] investigate. You need to know the who and the whom. That's not just a grammar thing. There's [05:56.560 --> 06:03.600] two specific separate things there. Who made the access and whose data was accessed. You also [06:03.600 --> 06:08.540] need to know why the access was made. The business justification for it if one exists. [06:08.680 --> 06:13.640] Typically business justifications are represented by things like bug IDs, customer support [06:13.640 --> 06:19.300] tickets or specific job role or project. These three things work together to determine whether [06:19.300 --> 06:25.160] an access was business justified or not. For example, if employee John Smith accesses his [06:25.160 --> 06:29.100] wife Jane Smith's account and doesn't provide a business justification, that's kind of [06:29.100 --> 06:34.600] sketchy. But if John Smith accesses Jane Doe's account and provides a customer support [06:34.600 --> 06:41.180] ticket where Jane Doe called in for help with her account, probably fine. Typical business [06:41.180 --> 06:47.280] activity, not really anything to worry about. But John Smith accesses his wife Jane Smith's [06:47.280 --> 06:53.900] account and provides that customer support ticket for Jane Doe, that's sketchy. All three of [06:53.900 --> 07:03.360] these pieces of information work together to indicate whether an access was appropriate. So [07:03.360 --> 07:07.000] of course in order to know these three things during an investigation, you need to have them [07:07.000 --> 07:14.000] in your logs. This means that in addition to the when, where and what of a security event, [07:14.000 --> 07:22.480] you also need to log the who, the whom and the why. So right about now you're probably [07:22.480 --> 07:32.500] thinking, that sounds like a lot of work. Why should I even care? So yes, protecting user data [07:32.500 --> 07:37.960] is hard. Yes, implementing a new type of log is time consuming and difficult. I'm not going [07:37.960 --> 07:43.260] to stand up here and tell you that it's easy, that it's going to be quick job, plug and play, [07:43.260 --> 07:48.560] you're done. But this is DEF CON, we know security is hard work. We know that we're used to [07:48.560 --> 07:53.160] putting in an effort to defend ourselves from malicious attackers. Shouldn't we want at least [07:53.160 --> 08:04.120] as much protection from insider access to our user data? All it takes is one bad egg. One person [08:04.120 --> 08:08.780] who can compromise your privacy. These are all real headlines written about real employees [08:08.780 --> 08:13.400] who abuse their access to user data. Some of the organizations that I have blacked out are [08:13.400 --> 08:18.260] household names. Others are less well known to the general public. But either way, you can [08:18.260 --> 08:22.620] bet that the abuses had a really big effect on the organizations in question and an even bigger [08:22.620 --> 08:31.530] effect on the victims. And if bad publicity and customers being afraid to use your product [08:31.530 --> 08:36.430] isn't enough to motivate you, how about some cold hard law? You like law, right? It's a good [08:36.430 --> 08:41.530] thing. Most companies, countries have some form of privacy law that dictates the [08:41.530 --> 08:46.270] requirement for companies to reasonably protect their users data. Depending on the exact [08:46.270 --> 08:52.290] country, the exact law, the exact situation in question, you or your company or both could be [08:52.290 --> 08:59.250] subject to civil fines, criminal fines, even jail time if you don't adequately protect your [08:59.250 --> 09:06.410] user data. And if all of that isn't enough to convince you, it's just the right thing to do. [09:06.910 --> 09:11.470] It fosters trust in your users because they know you're trying to protect them and if [09:11.470 --> 09:14.390] something bad does happen, they're going to be a lot more willing to forgive an honest [09:14.390 --> 09:20.730] mistake than willful recklessness. Nowadays, companies even sell products based on privacy. [09:20.730 --> 09:25.390] Look at all the apps where their user model is basically we don't store your data, we don't [09:25.390 --> 09:30.390] store your messages. Or you can think about it from a selfish standpoint. You want your data [09:30.390 --> 09:34.050] protected, right? You got all these companies that have your data, you want to make sure [09:34.050 --> 09:38.890] they're protecting it. And when it comes down to the wire, we're human. We like to think we're [09:38.890 --> 09:48.860] doing the right thing. Protecting user data is part of that. Okay. So protecting user data is [09:48.860 --> 09:52.440] good for business, good for users, good for me. All right, we like this. But you might be [09:52.440 --> 09:58.480] thinking, all right, I don't have any user data. I'm a simple coupon company or maybe a [09:59.680 --> 10:07.060] news website or a security vendor. Totally don't have anything. It's all good. Are you sure? [10:08.140 --> 10:19.680] Absolutely sure? You probably have user data. It's nearly impossible to conduct business in the [10:19.680 --> 10:24.280] modern world without involving user data in some way. Even buying groceries involves user data [10:24.280 --> 10:30.140] if you have a store loyalty card. And things that might seem innocuous at first glance, such [10:30.140 --> 10:34.980] as, for example, someone's contact list might turn out to be a treasure trove of information to [10:35.080 --> 10:40.240] a malicious user. An abusive husband, for example, spying on his wife might look at her [10:40.240 --> 10:45.100] contacts list and see a women's shelter or a divorce lawyer. That's going to be really bad for [10:45.100 --> 10:51.120] her. A curious employee might look at a celebrity's calendar and see multiple appointments [10:51.120 --> 10:55.040] with a doctor who specializes in a particularly sensitive medical condition. That employee [10:55.040 --> 11:00.260] could sell that information to the tabloids. That's bad for the celebrity. Even a grocery store [11:00.260 --> 11:06.820] loyalty card can reveal a frightening amount of information about a person. You may remember [11:06.820 --> 11:10.780] there's a famous article from 2012 about a very popular grocery store chain that sent [11:10.780 --> 11:15.760] pregnancy related coupons to a teenage girl before her father knew she was pregnant. He was not [11:15.760 --> 11:20.280] happy about that. So take a close look at your business. If you collect any data at all from [11:20.280 --> 11:29.750] your users, that's user data and you need to protect it. All right. So you got user data. You [11:29.750 --> 11:40.770] want to protect it. How do you go about actually doing that? I'm scaring everybody away. So [11:40.770 --> 11:44.110] before we even get to the logging part of user data protection, we need to start with the [11:44.110 --> 11:48.450] people side of things. Logs only tell you what happened after the fact. It's much better to [11:48.450 --> 11:53.370] invest effort in preventing abuse before it happens at all. So you want to make sure [11:53.370 --> 11:57.710] employees' job roles are clear. Knowing exactly what any given employee is supposed to be [11:57.710 --> 12:03.190] doing at any given time lets you define what accesses they need and conversely what accesses [12:03.190 --> 12:08.130] they do not need. Then enforce those job roles. Use strong ACLs. Keep them up to date as [12:08.130 --> 12:13.330] employees join and leave and change positions. You can't abuse data access if you don't have [12:13.330 --> 12:18.450] any data access. You also need to make sure that you're storing your data in a way that allows [12:18.450 --> 12:22.830] you to create and enforce good ACLs. For example, instead of dumping everything into one [12:22.830 --> 12:28.450] gigantic MySQL database, break out your data into multiple individual tables or even multiple [12:28.450 --> 12:33.090] individual databases with separate ACLs. This way you can allow, for example, customer [12:33.090 --> 12:39.670] service to access a customer's billing account without seeing their message data. Or vice [12:39.670 --> 12:45.970] versa, you can allow an engineer who needs to debug the messaging system, view the broken [12:45.970 --> 12:51.970] messages, but not any of the billing data. Another part of proper data storage is ensuring [12:51.970 --> 12:55.930] that everyone who accesses the data store has their own unique ID. Just like you wouldn't give [12:55.930 --> 12:59.690] all your employees the root passwords for all your servers, don't give them the admin password [12:59.690 --> 13:05.810] for all your user data stores. It's more common than you think. It's kind of scary. I've heard [13:05.810 --> 13:11.410] stories. So once your hardware and software are set up to protect user data, you also need to [13:11.410 --> 13:17.050] set up your employees as well. You want to create clear policies and rules about when and for [13:17.050 --> 13:21.770] what purpose employees are allowed to access user data. And make sure your employees know and [13:21.770 --> 13:27.750] understand those policies. Finally, you need to enforce the policies. Yeah, it sucks if you [13:27.750 --> 13:31.750] have to fire someone for accessing user data, but would you rather do that or be the subject of [13:31.750 --> 13:40.900] one of those headlines I showed earlier? Alright. So now once you've implemented the basic [13:40.900 --> 13:44.640] data protection mechanisms, you can focus on your logging. Because while good data [13:44.640 --> 13:49.380] protection practices will stop the merely curious, they might not be enough to stop a [13:49.380 --> 13:54.680] malicious actor. How you implement data access logging depends on where you get your [13:54.680 --> 13:59.600] software. If you write all of your own data access software, then great. You build in your [13:59.600 --> 14:03.680] logging system. Logging function records everything that you want it to. And tailor it to [14:03.680 --> 14:07.980] your specific company, your specific environment, your specific data set. It's easier said [14:07.980 --> 14:12.160] than done and we'll go into details in a minute. But generally, if you write your own [14:12.160 --> 14:20.200] software, you're in a pretty good position. On the other hand, if you use hot software, [14:20.200 --> 14:24.360] commercial off the shelf software, your job is a little trickier. If you have the resources [14:24.360 --> 14:28.580] for it, you could write a custom interface for your data store. For example, an admin tool [14:28.580 --> 14:33.440] that sits between your database and your employees. And handles all the direct [14:33.440 --> 14:38.540] interactions with the data. This option is ideal because again, aside from allowing you to [14:38.540 --> 14:43.080] implement proper data access logging, it also gives you greater control over what your [14:43.080 --> 14:48.480] employees can access, what data they see, and how they do it. It also allows you to, you [14:48.480 --> 14:52.460] know, track metrics, implement custom tools, do a lot of useful things that you can't with a [14:52.460 --> 14:58.280] database alone. But if building and maintaining a custom data access tool is too costly for [14:58.280 --> 15:03.440] you, and let's face it, sometimes it is. That's a lot of work. You can work with your [15:03.440 --> 15:10.160] COTS software vendors, existing logging tools to cobble together something that more or [15:10.160 --> 15:13.920] less covers what you need. You may not be able to capture everything that we're going to [15:13.920 --> 15:18.400] talk about to make up a complete data access log, but you can probably get pretty close. And [15:18.400 --> 15:23.280] close is a lot better than nothing. You can also encourage the company that makes your [15:23.280 --> 15:29.480] software to implement better logging, to implement data access logging. It's unlikely to [15:29.480 --> 15:34.260] solve your problem in the short term, but over time, if enough people speak out and say, [15:34.260 --> 15:38.040] you know, hey, we want to protect our users' data, companies will start building this in [15:38.040 --> 15:47.130] from the get go. All right. So you're ready to implement data access logging. You need to [15:47.130 --> 15:52.810] figure out what your data access log, your DAO, is going to look like. So, reminder, you [15:52.810 --> 16:04.620] need to log six things. Who, whom, what, where, when and why. Let's cover some of the [16:04.620 --> 16:11.060] terminology of DAOs to start. First off, we have actors and targets, the who and the whom. The [16:11.060 --> 16:16.760] actor is the human performing the data access, the person doing the thing being logged. Each [16:16.760 --> 16:22.260] actor gets their own DAO, just like in regular logs. Notably, you shouldn't log when a [16:22.260 --> 16:26.940] machine accesses user data. For one, machines are going to be providing all of the services [16:26.940 --> 16:31.380] and you're going to make a bunch of noise to clutter up your logs. For two, machines can't [16:31.380 --> 16:35.240] abuse user data. By definition, they only access what you tell them to access. So they're not [16:35.240 --> 16:40.920] going to be able to go off and do unauthorized things. You also shouldn't log a user's access [16:40.920 --> 16:47.800] to their own data. For much the same reasons. Targets, on the other hand, are the subject of [16:47.800 --> 16:52.800] the data access. They're the human whose data was looked up. A DAO can have zero or more [16:52.800 --> 16:57.640] targets, which makes a little more sense than it sounds. Let's say an actor searches for [16:57.640 --> 17:02.580] John Jacob Jingleheimer Smith, but there is no user in your database with that name. The [17:02.580 --> 17:07.580] actor is still attempting to look up a user. He still issued a query. And the fact that no [17:07.580 --> 17:12.560] results were returned doesn't mean that the action isn't log worthy. For example, they may [17:12.560 --> 17:16.720] have misspelled Jingleheimer. So they try again, spell it right, and this time they get a [17:16.720 --> 17:22.500] result. These kind of actions together like that, depending on their business [17:22.500 --> 17:30.750] justification, could potentially indicate something suspicious. So what do I mean when I [17:30.750 --> 17:36.570] say the actor issued a query? In a DAO, the query is the input from the actor that [17:36.570 --> 17:40.910] determines what user data is displayed. This might be a user name entered into a search [17:40.910 --> 17:47.330] box, might be a SQL query, might be a link in a tool that they click on. And yes, you need [17:47.330 --> 17:51.750] both the target and the query fields. Because what an actor searched for may not [17:51.750 --> 17:58.090] necessarily be the thing that they end up accessing. For example, let's say an actor needs [17:58.090 --> 18:03.770] to look up the account of one William Gates, insurance salesman from Wyoming. He [18:03.770 --> 18:08.490] searches, gets back results that include Bill Gates, the Microsoft billionaire. If he [18:08.490 --> 18:13.330] then clicks on Bill Gates, the Microsoft billionaire, but inputs the justification of [18:13.330 --> 18:18.610] William Gates from Wyoming, that's pretty sketchy. On the other hand, if he searches for [18:18.610 --> 18:29.340] Bill Gates, because hey, billionaires aren't immune to bugs, that's probably okay. Which [18:29.340 --> 18:34.340] leads me into what exactly is a business justification? That is the why of an access [18:34.340 --> 18:39.940] attempt. Before looking up a particular user, an actor should be able to provide a [18:39.940 --> 18:44.380] concrete reason why they need to look at that user data. In other words, why they can't [18:44.380 --> 18:49.540] use anonymous statistics or maybe a test account or something else that isn't user data. [18:50.240 --> 18:54.660] So like I said earlier, typical justifications include bugs, support tickets, a specific [18:54.660 --> 19:01.220] project or task and specific job roles. Justification by job role isn't ideal, since it [19:01.220 --> 19:05.520] makes it much harder to spot when someone in that job role actively abuses their access. [19:05.520 --> 19:09.780] But depending on your company and your data situation, it might be the only option that [19:09.780 --> 19:14.880] doesn't drive employees in that job role absolutely insane. Business justifications do [19:14.880 --> 19:19.740] not include any of these other things over here. And yes, these are all reasons that people [19:19.740 --> 19:24.540] have provided for accessing user data. No, because isn't a reason, unless you're the parent [19:24.540 --> 19:42.470] of a toddler. Neither is I wanted to. Yes, we do, in fact, look at these. And no, helping a [19:42.470 --> 19:46.690] child isn't, I was helping my friend a good enough reason. If they're helping someone, [19:46.690 --> 19:52.230] isn't that a valid thing? Not exactly. So first off, if they're legitimately helping someone, [19:52.230 --> 19:55.570] there should be a bug or a customer support ticket and they should have put that instead of [19:55.570 --> 20:00.490] I was helping. Second, as a matter of policy, you generally shouldn't allow people to work [20:00.490 --> 20:05.590] on a relative's or a friend's account. Not only is there the potential for abuse, so hey, [20:05.590 --> 20:09.210] while I'm in my girlfriend's account, I'm going to look at who she's been talking to, maybe [20:09.210 --> 20:14.110] what messages she's been sending. But it also completely negates the point of having a [20:14.110 --> 20:19.730] customer support or a bug system. Friends and family of your employees should go through the [20:19.730 --> 20:24.170] exact same help process as everyone else. Both to make sure that any fixes get applied to [20:24.170 --> 20:31.470] everyone, cowboy engineering over there, and to avoid even the perception of abuse. So what I [20:31.470 --> 20:35.730] mean by the perception of abuse, that's when a reasonable observer might believe that abuse is [20:35.730 --> 20:41.070] happening, even if it's not. And it's almost as bad as actual abuse because it causes many of [20:41.070 --> 20:47.810] the same consequences. You lose user trust, you might get legal liabilities depending on, [20:47.810 --> 20:53.850] again, the specific laws of the country and the company. So, don't even allow the [20:53.850 --> 21:03.450] perception. Story time. I said this was going to be interactive. If you were investigating this [21:03.450 --> 21:22.430] access, what would you determine from these facts? Sketchy? Why? Okay. No bug I.D.? [21:34.830 --> 21:41.170] So, those two are the main points. We've got somebody, they are using multiple search [21:41.170 --> 21:47.550] terms, they are trying to find a specific person with an unusual spelling. When returning the name [21:47.550 --> 21:53.070] didn't work, they looked by e-mail which returned a user account. Then they provided an invalid [21:53.070 --> 21:58.910] bug I.D. as a business justification. Yeah, that could be benign. They might have typoed the [21:58.910 --> 22:03.570] bug I.D., they typoed Jane Smith the first time. But it could indicate that they knew they [22:03.570 --> 22:08.930] shouldn't be searching for her at all. And they provided a fake justification. So this means [22:08.930 --> 22:14.710] that you are logging both success and failure. Yes. Yes. And I'll talk about that a little more [22:14.710 --> 22:21.810] in a minute. So, consider the pieces of information I just gave you here. This is the who, the [22:21.810 --> 22:27.130] whom, the what and the why. Typical security logs would only give you the where, the when and [22:27.130 --> 22:35.110] the what. It wouldn't be enough for you to figure out what was going on here. Now that we've [22:35.110 --> 22:39.270] established what all the pieces of a dial are and why they are important, let's look at a very [22:39.270 --> 22:44.050] basic dial written in plain English. There's multiple ways you can format your dials. [22:44.170 --> 22:49.770] Protobufs are good for it. So is XML. You can use a syslog style if you want, just a text [22:49.770 --> 22:56.150] string. That's harder to parse for logging systems. But if that's what works for you, go for [22:56.150 --> 23:06.230] it. Here's the same dial written in human readable protobuf over there and XML format. Pretty [23:06.230 --> 23:17.600] simple. Easy to read. Now let's get complicated. Just like any log, there are endless [23:17.600 --> 23:22.040] varieties of user data access logs. So these are some of the more common complications that [23:22.040 --> 23:28.620] you'll come across when you're trying to implement user data access logging. First off, [23:28.620 --> 23:34.360] front end versus back end. Where should you capture your logs? At the data access front end [23:34.360 --> 23:40.660] used by employees or on a central authentication or authorization back end server. While a [23:40.660 --> 23:47.980] back end such as an authentication system has the advantage of being centralized so you [23:47.980 --> 23:51.980] don't have to implement logging in as many places, it's unlikely to have enough information [23:51.980 --> 23:56.420] to make a complete dial. Back ends typically don't know anything about queries, [23:56.420 --> 24:01.100] about justifications, about any of that. They're just there to respond to requests. A good [24:01.100 --> 24:05.460] rule of thumb about logging in general is to log as close to the source of the action as [24:05.460 --> 24:10.400] possible and in the case of user data access events, the source of the event is the actor. So [24:10.400 --> 24:18.430] you want to log close to the actor, which means logging in the front end. Multiple targets. [24:19.570 --> 24:23.990] Depending on the exact interface used to access user data, you might see any or all of these [24:23.990 --> 24:29.630] situations. Incidentally, none of them are wrong or bad. They're all perfectly legitimate [24:29.630 --> 24:33.930] ways to access user data. Again, depending on the situation, on the system, on what [24:33.930 --> 24:39.870] they're trying to do. You just need to make sure you log all the targets accessed by a [24:39.870 --> 24:52.280] given query. Which is pretty simple. You just use repeated fields. Pretty [24:52.280 --> 25:02.120] straightforward. Even in string sys log, comma separated, again, a lot harder to parse, but [25:02.120 --> 25:09.360] it's doable. So what about multiple tools? That should be the same thing, right? Repeated [25:09.360 --> 25:15.100] fields? Probably not. You should log a new record for each actor, tool, query, [25:15.100 --> 25:20.540] combination, rather than stuffing multiple tools in a single DAO. Why? Because different [25:20.540 --> 25:24.100] tools have different purposes. They store data differently. There's different reasons for [25:24.100 --> 25:28.400] accessing them. They're going to show data differently. And therefore, each actor is going [25:28.400 --> 25:32.980] to have a different motivation for using each different tool. For example, an actor looking [25:32.980 --> 25:37.840] up someone in an administrative front end that everyone in their job role uses, probably not [25:37.840 --> 25:43.600] too suspicious. An actor who normally looks up users in a front end, but then turns around [25:43.600 --> 25:49.240] and looks someone up in the database, that's pretty sketchy. Breaking out your DAOs by [25:49.940 --> 25:55.400] tool makes these discrepancies a lot easier to spot. And since each access to user data should [25:55.400 --> 25:59.100] have a business justification, you want to make sure to capture the business justification [25:59.100 --> 26:04.680] for using that specific tool. If you allow users to provide a blanket justification for [26:04.680 --> 26:09.660] multiple accesses using multiple tools, it becomes much easier for them to hide a single [26:09.660 --> 26:21.160] malicious access in a sea of benign ones. So how about no query? You might find situations [26:21.160 --> 26:25.920] where in your system where an actor is able to access user data without issuing a specific [26:25.920 --> 26:31.420] query. So without manually typing something into a search box. You still need to find a way to [26:31.420 --> 26:37.000] capture what exactly the actor was trying to look for. Remember, knowing what an actor was [26:37.000 --> 26:42.440] trying to see as well as what they actually looked at can tell you much more than either piece [26:42.440 --> 26:51.060] alone. For mouse based interactions, the link an actor clicked on is usually enough. It's good [26:51.060 --> 26:56.340] stand in. It's not going to be perfect but a lot of the times if you look at it, it will have [26:56.880 --> 27:06.200] data, you know, click on John Doe. Pretty close. In cases where a tool automatically supplies user [27:06.200 --> 27:11.880] data without a specific query by user, you should probably first look at why your tool does [27:11.880 --> 27:19.100] that. Can you modify it to only display user data when an actor specifically requests it? If [27:19.100 --> 27:22.860] that doesn't make sense for your tool, then investigate ways to have the tool itself supply [27:22.860 --> 27:30.000] the query to the DAO along with the data. So if it's a bug report, you can log the bug ID as the [27:30.000 --> 27:36.760] query or perhaps the ID of the user who filed the bug. Sometimes you'll find that a tool [27:36.760 --> 27:41.160] displays user data even though it's not needed for the thing that they're doing. It's just [27:41.160 --> 27:46.340] there. For example, your customer support system might show a user's purchase history and [27:46.340 --> 27:51.720] billing information even if they're just calling in for a password reset. Or your database is [27:51.720 --> 27:55.960] structured so that it is faster and easier to pull all of the user's data instead of the one [27:55.960 --> 28:03.700] little subset that the actor needs. In those cases, rather than trying to log around the [28:03.700 --> 28:08.540] problem, you should look at why your systems behave that way and try and restructure them so [28:08.540 --> 28:15.480] that they're only supplying data when it is specifically requested. No business [28:15.480 --> 28:21.080] justification. The business justification is very often the hardest part of a DAO to [28:21.080 --> 28:24.900] capture. You can get the other five parts by just recording what is going on in the system, [28:24.900 --> 28:28.760] the bits and bytes flowing across the wire. But the business justification comes from the [28:28.760 --> 28:33.420] actor. The moment you put a human in the equation, you're dealing with a whole new set of [28:33.420 --> 28:39.480] problems than when you're just yanking data off the wire. The most obvious problem is that [28:39.480 --> 28:42.900] your tool might not have anywhere to enter a business justification. If you haven't been [28:42.900 --> 28:47.780] logging DAOs yet, you don't have it set up yet. If you build your own tool, you can easily [28:47.780 --> 28:52.640] remedy this by adding in a little text box that a user has to fill out with a business [28:52.640 --> 29:00.020] justification before they can click search. However, this leads to the second potential [29:00.020 --> 29:03.900] problem, which is that the employees aren't going to like this. It's time consuming. It's [29:03.900 --> 29:06.800] frustrating. They have to go look up a bug number. They have to type in a bug number. [29:17.700 --> 29:23.640] This isn't an easy problem to solve. Yes, you are giving up a little bit of employee [29:23.640 --> 29:29.700] convenience in order to make a lot of gains in user data protection. You can solve this [29:29.700 --> 29:35.550] with user education, work with your employees to teach them why it's worth it. Or if your [29:35.550 --> 29:41.190] systems allow it, remove manual aspect altogether and program the tool to automatically enter [29:41.190 --> 29:45.710] the justification for them so they don't ever have to do it. What happens if there is no [29:45.710 --> 29:51.350] easily available clear justification? For example, front line customer support reps might [29:51.350 --> 29:55.670] take dozens of calls from users an hour. They don't have time to open a new support ticket [29:55.670 --> 30:01.290] for each one. You could require them to do it anyway. It would suck. Slow down your customer [30:01.290 --> 30:06.530] support by a lot. You could allow them to all use a single blanket justification like [30:06.530 --> 30:12.310] customer call. You could just allow them to use no justification. In those cases, it's [30:12.310 --> 30:18.830] really kind of up to you to look at your system, look at the accesses, look at the risk and [30:18.830 --> 30:36.230] weigh what's the best thing to do there. Now the fun part. Good examples. So first, quick [30:36.230 --> 30:43.630] disclaimer, these are all fictional. So with that out of the way, take a look at this dial. Is [30:43.630 --> 30:52.170] there anything that jumps out at you immediately? Family? So, yeah, that's not a great [30:52.170 --> 30:56.410] justification. And you can then look and see the actor and the target have the same last [30:56.410 --> 31:04.610] name. What about the tool you used? Customer support billing? Kind of sensitive data there. [31:06.270 --> 31:13.390] Employee Rose, we see, is looking at her relative Roxy's billing data. Maybe it's benign. [31:13.510 --> 31:17.130] Maybe Roxy is having a problem with her account. And Rose, being the good relative that she [31:17.130 --> 31:23.030] is, offered to help her out. Still not good. Rose should have directed Roxy to the proper [31:23.030 --> 31:29.010] customer support channels rather than trying to do it herself. Could be benign. But it [31:29.010 --> 31:34.130] could also be malicious. Maybe Roxy is Rose's daughter. And Rose doesn't want her having an [31:34.130 --> 31:38.290] account. She might go in and mess around with Roxy's account to prevent her from having [31:38.290 --> 31:43.810] one. Maybe they're in cahoots. Rose might be granting Roxy benefits that Roxy hasn't paid [31:43.810 --> 32:01.330] for. How about this one? What do you see here that looks sketchy? Targets? I'll give you an [32:01.330 --> 32:05.410] extra hint because this one is not obvious. The bug number is not me being lazy when I made [32:05.410 --> 32:17.050] up data for this slide. So here we have an actor looking at the accounts of current and [32:17.050 --> 32:23.030] former presidents. He searched for accounts at white house.gov email addresses. The tool [32:23.030 --> 32:27.410] that he is using is message viewer admin. So he probably went in and looked at the messages [32:27.410 --> 32:33.070] in our president's accounts. But the bug number he provided is almost certainly bogus. [32:33.330 --> 32:37.710] Sometimes actors with malicious intent, when they have to enter a business justification, will [32:37.710 --> 32:43.310] try and hide their activity by using keyboard strings. By providing fake justifications with [32:43.310 --> 32:51.030] keyboard strings. Things like 1, 2, 3, 4, ASDF, whatever the right hand version of that is [32:51.030 --> 32:54.690] that I can't remember right now. I've seen that one too. Those are all giant red flags for [32:54.690 --> 33:04.090] investigators. One more. You get three dells this time. And time stamps in a readable [33:04.090 --> 33:10.970] format because they are important here. What do you guys see here? What is sketchy about [33:10.970 --> 33:28.730] these? Same action on different dates. Anything else? I count deep dive. The combination of [33:28.730 --> 33:35.290] repeated accesses over a long period of time is pretty suspicious. We've also got the [33:35.290 --> 33:40.690] automatic customer support justification which doesn't provide a lot of information. And [33:40.690 --> 33:46.630] they are using this account deep dive tool. I talked earlier about setting automatic [33:46.630 --> 33:51.010] justifications for some job roles. This is why it's not a great idea. You can't really tell [33:51.010 --> 33:56.950] here if Romeo is working on a particularly long standing customer support ticket or if he's [33:56.950 --> 34:02.230] actively stalking Juliet. So cases like this are where your investigation team's expertise [34:02.230 --> 34:07.430] and knowledge will come into play. For example, an investigator might be able to dig up a [34:07.430 --> 34:10.730] customer support ticket for each of those events which would indicate a business [34:10.730 --> 34:16.350] justification. Alternatively, they might know that Romeo's coworkers almost never use the [34:16.350 --> 34:21.010] account deep dive tool and they might check Romeo's history and see he only uses it to [34:21.010 --> 34:28.980] access Juliet. It's a big red flag. So what's this about an investigation team? Where did [34:28.980 --> 34:37.420] this come from? So what's the point of logging all this data if no one is looking at it? Now [34:37.420 --> 34:46.300] the slide clicks over. There it goes. Now that you have your user data access logs, you need a [34:46.300 --> 34:51.260] team dedicated to investigating the events generated by these logs. This could be its own [34:51.260 --> 34:55.900] team adjacent to your existing SOC if you have the resources or you can include it in your [34:55.900 --> 35:02.200] SOC's regular duties. There's quite a bit of overlap between a typical security event [35:02.200 --> 35:06.420] investigator and a data event, data access event investigator. It's the log sources are [35:06.420 --> 35:11.780] different but otherwise it's much the same skill set and tools. You also need to make sure [35:11.780 --> 35:16.280] that the investigation team has legal support. Security events are typically caused by [35:16.280 --> 35:21.000] people outside your organization. Maybe in a few really high profile cases there might be [35:21.000 --> 35:25.060] legal action taken but for the most part it's going to be handled internally. There's no [35:25.680 --> 35:32.140] external legal ramifications. User data access events, however, come from your own employees. [35:32.140 --> 35:36.520] Depending on the consequences you lay out in your user data access policy, you may find [35:36.520 --> 35:41.960] yourself firing people for abuse or taking other employment related actions. You need to have a [35:41.960 --> 35:50.290] legal support team to make sure you're doing everything by the book. Just like with security [35:50.290 --> 35:55.610] logs and security events, you'll want to set up an automatic logs parsing system, logs [35:55.610 --> 36:00.310] analysis system to help your investigation team sort out the sketchy from the benign. This [36:00.450 --> 36:04.050] isn't a complete list. Exactly what you look for is going to depend on your organization, [36:04.050 --> 36:09.370] the type of user data you collect, what resources you have to investigate. Not all accesses [36:09.370 --> 36:14.030] that match one or more of these are going to necessarily be malicious. But they're a good [36:14.030 --> 36:19.910] start and your investigation team will be able to develop new rules, more precise rules over [36:19.910 --> 36:33.180] time. So that's a lot. That was a lot of information. TLDR. Basically, if you have user [36:33.180 --> 36:37.780] data in your systems and you almost certainly do, you need to make sure that it is protected. [36:37.900 --> 36:42.740] But typical security logs don't capture nearly enough information to investigate potential [36:42.740 --> 36:48.200] access abuse events. You need data access logs, DALs, which captures six key pieces of [36:48.200 --> 36:54.060] information about every access made by your employees to user data. The who, who made the [36:54.060 --> 37:02.520] access, whom, whose data was accessed, what, what data was accessed, where, which is what [37:02.520 --> 37:07.480] tool or system was used, when the access occurred, and why, which is the business [37:07.480 --> 37:12.780] justification for the access. Without all six pieces of information, it can be difficult or [37:12.780 --> 37:18.800] impossible to determine if a particular access was benign or abusive. Once you have all of [37:18.800 --> 37:23.100] these DALs, you need a team dedicated to investigating them. They'll use many of the same [37:23.100 --> 37:28.020] tools as your existing SOC, but they'll need legal support to back them up. They'll create a [37:28.020 --> 37:33.460] set of rules to monitor for suspicious behavior, and they'll investigate events using the [37:33.460 --> 37:40.870] information provided by the DALs. Data access logging sounds complicated, sounds like hard [37:40.870 --> 37:46.530] work. It is hard work. But we've never let a little hard work stand in the way of securing [37:46.530 --> 37:51.510] our user's data. So why would we let it stand in the way of making sure our user's data is [37:51.510 --> 37:56.550] protected? By protecting your user's data, you're keeping your headlines positive, you're [37:56.550 --> 38:04.170] maintaining your user's trust, and above all, you're protecting your users. Questions? [38:18.800 --> 38:30.420] I don't have any experience with DLP systems. So it would probably depend on, I guess, [38:30.440 --> 38:35.700] exactly what you're doing, what data you are collecting, and how much risk you're willing to [38:35.700 --> 38:56.200] accept. So... Okay. Potentially. You need to make sure that you aren't either breaching [38:56.200 --> 39:01.000] HIPAA yourself in the way that you are implementing the logging, or also you're not [39:01.000 --> 39:09.620] abusing your employee's right to privacy when you're doing this. Any others? [39:27.900 --> 39:34.400] Good change management. A large enough team that not one person is responsible for [39:34.400 --> 39:38.240] everything. It's a lot harder to slip something by if, you know, you have to have your code [39:38.240 --> 39:44.300] reviewed, for example, or if there's multiple people working on a system. Or even if you [39:44.300 --> 39:50.520] just have multiple people watching the logs. Because somebody is going to notice. It's [39:50.520 --> 39:54.180] basically who watches the watcher's situation and you have to just make sure that you have [39:54.820 --> 40:15.180] enough people that no single person is doing all of one job. Because machine learning is [40:15.180 --> 40:22.700] still relatively in its infancy here. You can use it. Again, you want to be careful that [40:22.700 --> 40:28.040] you're not generating a lot of noise. And that's the hard thing. Especially when you're [40:28.040 --> 40:33.320] just implementing a user data access logging, there's going to be a lot of noise because [40:33.320 --> 40:37.140] you're still figuring out what data you have, how people use it, what are typical use [40:37.140 --> 40:43.220] patterns. And so in my experience, it hasn't been that helpful yet because we're still [40:43.220 --> 40:48.940] figuring out, like, where to start the machine learning off. It probably, as we develop it [40:48.940 --> 40:54.280] more, it will be a really useful tool because then that way no one single, like, log [40:54.280 --> 40:59.900] watcher, event analyst has to try and keep all of this in their head. Like the machine can [40:59.900 --> 41:06.620] say, hey, you know, the last 30 accesses by this one person were made using the customer [41:06.620 --> 41:13.060] support billing tool and they made two with user min pro deep dive. That's harder for [41:13.140 --> 41:19.020] a human to spot but easy for a machine to spot. So just as we develop, as we get a better [41:19.020 --> 41:23.120] understanding of what the rules, we know what security logs should be, you know, things to [41:23.120 --> 41:27.580] log for, to watch for in those logs, we're still learning what that is in privacy logs. [41:31.170 --> 42:04.420] Anybody else? So they were asking what templates and what kinds of strings to search for. So [42:04.420 --> 42:19.570] that was, let me hop back a few slides here. So this is where I would start with the [42:19.570 --> 42:23.370] strings and what the string exactly is going to work out to be is going to depend on how [42:23.370 --> 42:28.910] your logging tool works. But for example, you can search for, like, well-known people. So [42:28.910 --> 42:33.070] maybe put, you know, whoever our current president is, search for that string. Or like [42:33.070 --> 42:38.110] the CEO of your company or if somebody is having their 15 minutes of fame, you know, you [42:38.110 --> 42:41.870] want to be watching out for them because somebody might say, oh, hey, you know, who's [42:41.870 --> 42:45.950] this whoever person? I'm going to go look up and see if they have an account because I just [42:45.950 --> 42:56.930] heard about them in the news. Looking for unusual job role and tool pairs. So for, like, [42:56.930 --> 43:01.650] that's where I was saying, you know, last 30 accesses they made were using this one tool. [43:01.870 --> 43:07.090] Everybody else in their job role only uses this one tool. And now you've got this one person [43:07.090 --> 43:13.770] with this job role using an unusual tool. And then the format exactly is going to depend on [43:13.770 --> 43:19.090] your system and exactly what you can do. If you have the ability to write your own custom [43:19.090 --> 43:24.130] logs, then you can use, you know, protobufs or XML or whatever makes sense for your system. [43:24.130 --> 43:27.970] And then you can just format them however you want. If you're working with COT software and [43:27.970 --> 43:32.850] maybe you're working off of CIS logs or AWS logs or something, it's going to be kind of [43:32.850 --> 43:44.690] restricted by what those logs give you. Anybody else? Going once, going twice. Thank you very [43:44.690 --> 43:45.350] much.