WEBVTT

00:00.000 --> 00:02.180
So we're talking about security logs.

00:02.180 --> 00:03.380
They're not good enough.

00:06.790 --> 00:09.050
So I think you're logging everything important.

00:09.050 --> 00:11.110
You turned on logging in all your critical systems.

00:11.110 --> 00:13.670
You set up a logs management tool.

00:13.670 --> 00:16.850
You created rules to alert you when something is not right.

00:16.850 --> 00:18.450
You're totally covered.

00:18.450 --> 00:21.770
If a customer accuses your employees of looking at user data.

00:21.770 --> 00:22.610
Right?

00:23.190 --> 00:24.230
Right?

00:27.280 --> 00:28.400
Nope.

00:30.020 --> 00:41.080
If you're relying solely on security logs to protect your user's data, you almost certainly won't be able to tell what's happened in the event of employee access to employee abuse of user data.

00:41.140 --> 00:47.220
Security logs aren't enough to protect your users or you from malicious activity targeting user data.

00:48.980 --> 00:50.600
So first off, who am I?

00:50.600 --> 00:53.740
Why do I think I can talk about user data access logs?

00:53.740 --> 00:55.240
My name is Alicia clock.

00:55.240 --> 00:57.240
I'm a privacy TPM at Lyft.

00:57.240 --> 01:00.500
Before Lyft, I was a security engineer in privacy at Google.

01:00.800 --> 01:04.600
Before that, I worked for Boeing building security systems for government customers.

01:04.600 --> 01:06.820
My entire career has been about protecting data.

01:09.600 --> 01:14.860
So now that you know who I am, what's all this about security logs not being good enough to protect your user's data?

01:19.530 --> 01:21.230
So let's start with the basics.

01:22.490 --> 01:25.410
Why do we log anything at all?

01:25.830 --> 01:26.430
Anybody?

01:26.730 --> 01:27.510
6 o'clock p.m.

01:27.510 --> 01:29.330
I'm totally making this an interactive presentation.

01:29.330 --> 01:30.430
You ought to talk to me here.

01:30.810 --> 01:32.270
So why do we log stuff?

01:32.770 --> 01:37.690
Something untoward happens.

01:38.510 --> 01:39.630
Audit.

01:40.030 --> 01:40.690
Yeah.

01:43.510 --> 01:44.630
Regulations.

01:46.610 --> 01:48.250
Developers left it in.

01:48.410 --> 01:50.850
So accountability.

01:51.030 --> 01:51.270
Yeah.

01:51.270 --> 02:00.470
Generally speaking, what I'm hearing from a lot of you is we want to provide a record of an event and specifically to aid in future investigations.

02:00.830 --> 02:06.910
Broadly speaking, we need to be able, if an investigation is needed, we need to be able to tell what happened.

02:07.670 --> 02:08.270
All right.

02:08.270 --> 02:11.290
But when I say an event, what does that mean?

02:13.090 --> 02:17.330
So I'm assuming y'all being here at DEF CON that you're familiar with security events.

02:17.330 --> 02:19.630
But just in case, here's a real quick review.

02:20.210 --> 02:27.530
A security event can be broadly defined as an unauthorized access to one or more systems.

02:27.690 --> 02:29.890
There's a lot of possible motives for this.

02:30.030 --> 02:34.890
Money, by stealing data that can be sold to third parties or just stealing money.

02:34.990 --> 02:47.670
Political or ideological motivations that result in vandalization or destruction, fame and fortune by stamping over a customer's company's website with, I hacked this.

02:47.810 --> 02:50.530
Or even just laying the groundwork for future attacks.

02:55.650 --> 03:00.370
So when you're faced with a security event, you need to know three key things.

03:00.430 --> 03:06.410
When it happened, where or on what system it happened and what exactly happened.

03:06.490 --> 03:10.870
Let's say you get an alert that someone tried to log in as root on your system.

03:10.930 --> 03:14.530
When you go to investigate, you need to find out these three things.

03:14.710 --> 03:17.170
What, when and where.

03:21.950 --> 03:31.670
You have to forgive me for having the awkward speaker's notes here and computer here because Windows 10 does not agree with multiple displays.

03:33.590 --> 03:48.790
So a typical security log like these sample SSH logs provides all the information, the when, the where, the beginning, you have your time stamp, you have your host name and the what at the end.

03:48.970 --> 03:59.090
So you can look at a set of logs like this and see that somebody tried to log in as root or two people tried to log in as root or possibly the same person from two different IPs.

03:59.310 --> 04:01.930
One failed and then one succeeded.

04:02.590 --> 04:15.190
With this information, you can determine whether the attack was successful, whether any information was accessed, how long the attack lasted and then you can use that information to increase your security.

04:15.190 --> 04:22.570
Maybe change the root password or implement stronger SSH policies or even just banning those IPs.

04:26.270 --> 04:26.870
All right.

04:26.870 --> 04:28.610
So that's a security event.

04:28.610 --> 04:30.110
Security investigation.

04:30.110 --> 04:32.750
What's the big deal about user data access events?

04:33.050 --> 04:34.670
How are they any different?

04:36.670 --> 04:40.410
Let's take a look at what constitutes a user data access event.

04:40.570 --> 04:43.150
For starters, the definition is different.

04:43.210 --> 04:47.010
It's an access to user data without business justification.

04:47.010 --> 04:49.630
The key point here is business justification.

04:49.850 --> 04:59.090
In most companies, employees do have reasons to access user data, like fixing bugs or providing customer support, things like that.

04:59.150 --> 05:04.630
A user data access event is when an employee doesn't have a legitimate reason to access user data.

05:05.550 --> 05:08.570
So there's a lot of reasons why someone might look at user data.

05:08.570 --> 05:10.770
They might be maliciously stalking someone.

05:10.770 --> 05:17.730
They might have spotted a family member's or celebrity's account, got curious, decided to, you know, poke around, see what they could see.

05:19.130 --> 05:20.830
They might be trying to commit fraud.

05:21.270 --> 05:30.190
Maybe they're going to access a family member's account, provide a few extra services that aren't being paid for, erase a balance, something like that.

05:30.350 --> 05:34.650
They may even be simply trying to help someone but aren't going through the proper channels.

05:37.680 --> 05:46.500
When you're investigating a user data access event, you need to know the same thing as a security event, where it happened, when it happened and what was done.

05:46.620 --> 05:52.140
But you also need three more pieces of information in order to successfully investigate.

05:52.420 --> 05:54.120
You need to know the who and the whom.

05:54.120 --> 05:56.160
That's not just a grammar thing.

05:56.160 --> 05:59.480
There's two specific separate things there.

05:59.680 --> 06:02.960
Who made the access and whose data was accessed.

06:03.260 --> 06:05.820
You also need to know why the access was made.

06:05.820 --> 06:08.540
The business justification for it if one exists.

06:08.680 --> 06:16.640
Typically business justifications are represented by things like bug IDs, customer support tickets or specific job role or project.

06:16.840 --> 06:21.720
These three things work together to determine whether an access was business justified or not.

06:21.720 --> 06:30.080
For example, if employee John Smith accesses his wife Jane Smith's account and doesn't provide a business justification, that's kind of sketchy.

06:30.300 --> 06:39.440
But if John Smith accesses Jane Doe's account and provides a customer support ticket where Jane Doe called in for help with her account, probably fine.

06:40.280 --> 06:43.520
Typical business activity, not really anything to worry about.

06:43.520 --> 06:52.660
But John Smith accesses his wife Jane Smith's account and provides that customer support ticket for Jane Doe, that's sketchy.

06:53.020 --> 06:59.040
All three of these pieces of information work together to indicate whether an access was appropriate.

07:02.800 --> 07:08.160
So of course in order to know these three things during an investigation, you need to have them in your logs.

07:08.200 --> 07:16.860
This means that in addition to the when, where and what of a security event, you also need to log the who, the whom and the why.

07:21.020 --> 07:25.640
So right about now you're probably thinking, that sounds like a lot of work.

07:25.640 --> 07:27.840
Why should I even care?

07:30.220 --> 07:33.660
So yes, protecting user data is hard.

07:33.940 --> 07:37.420
Yes, implementing a new type of log is time consuming and difficult.

07:37.500 --> 07:44.020
I'm not going to stand up here and tell you that it's easy, that it's going to be quick job, plug and play, you're done.

07:44.400 --> 07:47.140
But this is DEF CON, we know security is hard work.

07:47.140 --> 07:51.600
We know that we're used to putting in an effort to defend ourselves from malicious attackers.

07:52.200 --> 07:56.860
Shouldn't we want at least as much protection from insider access to our user data?

08:01.080 --> 08:03.040
All it takes is one bad egg.

08:03.480 --> 08:05.780
One person who can compromise your privacy.

08:06.200 --> 08:10.800
These are all real headlines written about real employees who abuse their access to user data.

08:11.500 --> 08:14.440
Some of the organizations that I have blacked out are household names.

08:14.440 --> 08:16.660
Others are less well known to the general public.

08:17.220 --> 08:24.060
But either way, you can bet that the abuses had a really big effect on the organizations in question and an even bigger effect on the victims.

08:27.430 --> 08:34.270
And if bad publicity and customers being afraid to use your product isn't enough to motivate you, how about some cold hard law?

08:34.610 --> 08:35.830
You like law, right?

08:36.130 --> 08:37.170
It's a good thing.

08:37.270 --> 08:45.170
Most companies, countries have some form of privacy law that dictates the requirement for companies to reasonably protect their users data.

08:45.230 --> 09:00.310
Depending on the exact country, the exact law, the exact situation in question, you or your company or both could be subject to civil fines, criminal fines, even jail time if you don't adequately protect your user data.

09:00.630 --> 09:06.410
And if all of that isn't enough to convince you, it's just the right thing to do.

09:06.910 --> 09:16.450
It fosters trust in your users because they know you're trying to protect them and if something bad does happen, they're going to be a lot more willing to forgive an honest mistake than willful recklessness.

09:17.190 --> 09:20.730
Nowadays, companies even sell products based on privacy.

09:20.730 --> 09:26.370
Look at all the apps where their user model is basically we don't store your data, we don't store your messages.

09:27.250 --> 09:29.470
Or you can think about it from a selfish standpoint.

09:29.790 --> 09:31.410
You want your data protected, right?

09:31.430 --> 09:35.230
You got all these companies that have your data, you want to make sure they're protecting it.

09:35.810 --> 09:38.230
And when it comes down to the wire, we're human.

09:38.270 --> 09:40.030
We like to think we're doing the right thing.

09:40.170 --> 09:42.150
Protecting user data is part of that.

09:46.960 --> 09:47.760
Okay.

09:47.800 --> 09:50.840
So protecting user data is good for business, good for users, good for me.

09:50.840 --> 09:51.980
All right, we like this.

09:51.980 --> 09:54.620
But you might be thinking, all right, I don't have any user data.

09:55.280 --> 10:01.680
I'm a simple coupon company or maybe a news website or a security vendor.

10:02.600 --> 10:04.080
Totally don't have anything.

10:04.160 --> 10:05.060
It's all good.

10:06.120 --> 10:07.060
Are you sure?

10:08.140 --> 10:09.480
Absolutely sure?

10:10.820 --> 10:12.480
You probably have user data.

10:16.720 --> 10:22.380
It's nearly impossible to conduct business in the modern world without involving user data in some way.

10:22.640 --> 10:26.140
Even buying groceries involves user data if you have a store loyalty card.

10:26.980 --> 10:36.180
And things that might seem innocuous at first glance, such as, for example, someone's contact list might turn out to be a treasure trove of information to a malicious user.

10:37.020 --> 10:44.100
An abusive husband, for example, spying on his wife might look at her contacts list and see a women's shelter or a divorce lawyer.

10:44.100 --> 10:45.860
That's going to be really bad for her.

10:46.600 --> 10:54.520
A curious employee might look at a celebrity's calendar and see multiple appointments with a doctor who specializes in a particularly sensitive medical condition.

10:54.520 --> 10:57.500
That employee could sell that information to the tabloids.

10:57.500 --> 10:58.920
That's bad for the celebrity.

10:59.420 --> 11:05.000
Even a grocery store loyalty card can reveal a frightening amount of information about a person.

11:05.660 --> 11:14.820
You may remember there's a famous article from 2012 about a very popular grocery store chain that sent pregnancy related coupons to a teenage girl before her father knew she was pregnant.

11:15.240 --> 11:16.820
He was not happy about that.

11:17.180 --> 11:18.720
So take a close look at your business.

11:18.720 --> 11:23.360
If you collect any data at all from your users, that's user data and you need to protect it.

11:27.690 --> 11:28.410
All right.

11:28.410 --> 11:29.630
So you got user data.

11:29.630 --> 11:30.910
You want to protect it.

11:31.210 --> 11:32.990
How do you go about actually doing that?

11:36.750 --> 11:38.230
I'm scaring everybody away.

11:40.330 --> 11:45.370
So before we even get to the logging part of user data protection, we need to start with the people side of things.

11:45.530 --> 11:47.630
Logs only tell you what happened after the fact.

11:47.630 --> 11:51.510
It's much better to invest effort in preventing abuse before it happens at all.

11:52.450 --> 11:55.130
So you want to make sure employees' job roles are clear.

11:55.370 --> 12:04.490
Knowing exactly what any given employee is supposed to be doing at any given time lets you define what accesses they need and conversely what accesses they do not need.

12:04.950 --> 12:06.370
Then enforce those job roles.

12:06.370 --> 12:07.270
Use strong ACLs.

12:07.270 --> 12:10.950
Keep them up to date as employees join and leave and change positions.

12:11.190 --> 12:14.630
You can't abuse data access if you don't have any data access.

12:15.230 --> 12:20.830
You also need to make sure that you're storing your data in a way that allows you to create and enforce good ACLs.

12:20.830 --> 12:31.030
For example, instead of dumping everything into one gigantic MySQL database, break out your data into multiple individual tables or even multiple individual databases with separate ACLs.

12:31.070 --> 12:39.030
This way you can allow, for example, customer service to access a customer's billing account without seeing their message data.

12:39.310 --> 12:48.530
Or vice versa, you can allow an engineer who needs to debug the messaging system, view the broken messages, but not any of the billing data.

12:49.810 --> 12:55.050
Another part of proper data storage is ensuring that everyone who accesses the data store has their own unique ID.

12:55.210 --> 13:01.330
Just like you wouldn't give all your employees the root passwords for all your servers, don't give them the admin password for all your user data stores.

13:02.290 --> 13:03.490
It's more common than you think.

13:03.490 --> 13:04.410
It's kind of scary.

13:05.270 --> 13:06.610
I've heard stories.

13:07.270 --> 13:13.290
So once your hardware and software are set up to protect user data, you also need to set up your employees as well.

13:13.470 --> 13:20.170
You want to create clear policies and rules about when and for what purpose employees are allowed to access user data.

13:20.190 --> 13:23.370
And make sure your employees know and understand those policies.

13:23.590 --> 13:26.050
Finally, you need to enforce the policies.

13:26.450 --> 13:33.430
Yeah, it sucks if you have to fire someone for accessing user data, but would you rather do that or be the subject of one of those headlines I showed earlier?

13:38.260 --> 13:38.960
Alright.

13:39.320 --> 13:43.520
So now once you've implemented the basic data protection mechanisms, you can focus on your logging.

13:43.660 --> 13:50.200
Because while good data protection practices will stop the merely curious, they might not be enough to stop a malicious actor.

13:51.180 --> 13:55.080
How you implement data access logging depends on where you get your software .

13:55.440 --> 13:58.640
If you write all of your own data access software, then great.

13:58.640 --> 14:00.380
You build in your logging system.

14:00.380 --> 14:02.800
Logging function records everything that you want it to.

14:02.820 --> 14:06.980
And tailor it to your specific company, your specific environment, your specific data set.

14:07.380 --> 14:10.200
It's easier said than done and we'll go into details in a minute.

14:10.560 --> 14:15.080
But generally, if you write your own software, you're in a pretty good position.

14:17.320 --> 14:23.340
On the other hand, if you use hot software, commercial off the shelf software, your job is a little trickier.

14:23.480 --> 14:27.460
If you have the resources for it, you could write a custom interface for your data store.

14:27.460 --> 14:32.040
For example, an admin tool that sits between your database and your employees.

14:32.360 --> 14:34.780
And handles all the direct interactions with the data.

14:34.880 --> 14:47.460
This option is ideal because again, aside from allowing you to implement proper data access logging, it also gives you greater control over what your employees can access, what data they see, and how they do it.

14:47.460 --> 14:53.280
It also allows you to, you know, track metrics, implement custom tools, do a lot of useful things that you can't with a database alone.

14:53.940 --> 15:00.760
But if building and maintaining a custom data access tool is too costly for you, and let's face it, sometimes it is.

15:00.760 --> 15:02.060
That's a lot of work.

15:02.460 --> 15:11.380
You can work with your COTS software vendors, existing logging tools to cobble together something that more or less covers what you need.

15:11.460 --> 15:18.300
You may not be able to capture everything that we're going to talk about to make up a complete data access log, but you can probably get pretty close.

15:18.300 --> 15:20.120
And close is a lot better than nothing.

15:21.160 --> 15:27.560
You can also encourage the company that makes your software to implement better logging, to implement data access logging.

15:28.500 --> 15:39.040
It's unlikely to solve your problem in the short term, but over time, if enough people speak out and say, you know, hey, we want to protect our users' data, companies will start building this in from the get go.

15:44.090 --> 15:44.670
All right.

15:44.670 --> 15:46.790
So you're ready to implement data access logging.

15:46.790 --> 15:50.490
You need to figure out what your data access log, your DAO, is going to look like.

15:50.790 --> 15:54.690
So, reminder, you need to log six things.

15:54.690 --> 15:59.730
Who, whom, what, where, when and why.

16:03.800 --> 16:07.180
Let's cover some of the terminology of DAOs to start.

16:07.180 --> 16:10.720
First off, we have actors and targets, the who and the whom.

16:10.880 --> 16:16.400
The actor is the human performing the data access, the person doing the thing being logged.

16:16.480 --> 16:20.320
Each actor gets their own DAO, just like in regular logs.

16:20.500 --> 16:24.040
Notably, you shouldn't log when a machine accesses user data.

16:24.420 --> 16:29.580
For one, machines are going to be providing all of the services and you're going to make a bunch of noise to clutter up your logs.

16:29.580 --> 16:32.360
For two, machines can't abuse user data.

16:32.360 --> 16:34.900
By definition, they only access what you tell them to access.

16:34.900 --> 16:37.880
So they're not going to be able to go off and do unauthorized things.

16:38.760 --> 16:42.300
You also shouldn't log a user's access to their own data.

16:42.380 --> 16:43.880
For much the same reasons.

16:45.180 --> 16:48.900
Targets, on the other hand, are the subject of the data access.

16:49.000 --> 16:50.960
They're the human whose data was looked up.

16:51.340 --> 16:55.120
A DAO can have zero or more targets, which makes a little more sense than it sounds.

16:55.520 --> 17:01.820
Let's say an actor searches for John Jacob Jingleheimer Smith, but there is no user in your database with that name.

17:02.180 --> 17:05.100
The actor is still attempting to look up a user.

17:05.100 --> 17:06.400
He still issued a query.

17:06.880 --> 17:11.460
And the fact that no results were returned doesn't mean that the action isn't log worthy.

17:11.740 --> 17:14.180
For example, they may have misspelled Jingleheimer.

17:14.280 --> 17:17.480
So they try again, spell it right, and this time they get a result.

17:18.360 --> 17:26.320
These kind of actions together like that, depending on their business justification, could potentially indicate something suspicious.

17:29.530 --> 17:32.570
So what do I mean when I say the actor issued a query?

17:33.010 --> 17:38.510
In a DAO, the query is the input from the actor that determines what user data is displayed.

17:38.890 --> 17:44.950
This might be a user name entered into a search box, might be a SQL query, might be a link in a tool that they click on.

17:46.490 --> 17:49.970
And yes, you need both the target and the query fields.

17:50.030 --> 17:54.150
Because what an actor searched for may not necessarily be the thing that they end up accessing.

17:54.510 --> 18:03.410
For example, let's say an actor needs to look up the account of one William Gates, insurance salesman from Wyoming.

18:03.450 --> 18:07.970
He searches, gets back results that include Bill Gates, the Microsoft billionaire.

18:08.170 --> 18:16.590
If he then clicks on Bill Gates, the Microsoft billionaire, but inputs the justification of William Gates from Wyoming, that's pretty sketchy.

18:16.790 --> 18:23.910
On the other hand, if he searches for Bill Gates, because hey, billionaires aren't immune to bugs, that's probably okay.

18:28.860 --> 18:32.480
Which leads me into what exactly is a business justification?

18:32.940 --> 18:35.200
That is the why of an access attempt.

18:35.580 --> 18:42.880
Before looking up a particular user, an actor should be able to provide a concrete reason why they need to look at that user data.

18:43.120 --> 18:49.540
In other words, why they can't use anonymous statistics or maybe a test account or something else that isn't user data.

18:50.240 --> 18:57.840
So like I said earlier, typical justifications include bugs, support tickets, a specific project or task and specific job roles.

18:58.440 --> 19:05.520
Justification by job role isn't ideal, since it makes it much harder to spot when someone in that job role actively abuses their access.

19:05.520 --> 19:12.900
But depending on your company and your data situation, it might be the only option that doesn't drive employees in that job role absolutely insane.

19:13.500 --> 19:17.920
Business justifications do not include any of these other things over here.

19:18.240 --> 19:21.960
And yes, these are all reasons that people have provided for accessing user data.

19:22.120 --> 19:25.360
No, because isn't a reason, unless you're the parent of a toddler.

19:26.420 --> 19:28.100
Neither is I wanted to.

19:28.580 --> 19:31.580
Yes, we do, in fact, look at these.

19:31.940 --> 19:45.250
And no, helping a child isn't, I was helping my friend a good enough reason.

19:45.650 --> 19:48.830
If they're helping someone, isn't that a valid thing?

19:48.970 --> 19:49.970
Not exactly.

19:50.210 --> 19:56.450
So first off, if they're legitimately helping someone, there should be a bug or a customer support ticket and they should have put that instead of I was helping.

19:57.050 --> 20:02.330
Second, as a matter of policy, you generally shouldn't allow people to work on a relative's or a friend's account.

20:02.570 --> 20:10.950
Not only is there the potential for abuse, so hey, while I'm in my girlfriend's account, I'm going to look at who she's been talking to, maybe what messages she's been sending.

20:11.590 --> 20:15.970
But it also completely negates the point of having a customer support or a bug system.

20:16.030 --> 20:21.830
Friends and family of your employees should go through the exact same help process as everyone else.

20:21.830 --> 20:29.510
Both to make sure that any fixes get applied to everyone , cowboy engineering over there, and to avoid even the perception of abuse.

20:30.530 --> 20:37.790
So what I mean by the perception of abuse, that's when a reasonable observer might believe that abuse is happening, even if it's not.

20:37.950 --> 20:42.450
And it's almost as bad as actual abuse because it causes many of the same consequences.

20:42.570 --> 20:51.450
You lose user trust, you might get legal liabilities depending on, again, the specific laws of the country and the company.

20:51.970 --> 20:54.750
So, don't even allow the perception.

20:58.150 --> 20:59.210
Story time.

20:59.810 --> 21:01.390
I said this was going to be interactive.

21:01.990 --> 21:07.250
If you were investigating this access, what would you determine from these facts?

21:14.820 --> 21:15.900
Sketchy?

21:16.120 --> 21:16.960
Why?

21:20.070 --> 21:20.710
Okay.

21:20.710 --> 21:22.430
No bug I.D.?

21:34.830 --> 21:38.350
So, those two are the main points.

21:38.350 --> 21:45.830
We've got somebody, they are using multiple search terms, they are trying to find a specific person with an unusual spelling.

21:46.510 --> 21:50.830
When returning the name didn't work, they looked by e-mail which returned a user account.

21:51.470 --> 21:53.830
Then they provided an invalid bug I.D.

21:53.830 --> 21:55.190
as a business justification.

21:56.990 --> 21:58.270
Yeah, that could be benign.

21:58.270 --> 22:01.450
They might have typoed the bug I.D., they typoed Jane Smith the first time.

22:02.290 --> 22:05.310
But it could indicate that they knew they shouldn't be searching for her at all.

22:05.570 --> 22:07.370
And they provided a fake justification.

22:08.490 --> 22:11.790
So this means that you are logging both success and failure.

22:12.250 --> 22:12.690
Yes.

22:12.750 --> 22:13.470
Yes.

22:13.470 --> 22:15.390
And I'll talk about that a little more in a minute.

22:16.710 --> 22:20.110
So, consider the pieces of information I just gave you here.

22:20.490 --> 22:24.270
This is the who, the whom, the what and the why.

22:24.710 --> 22:27.710
Typical security logs would only give you the where, the when and the what.

22:27.710 --> 22:29.930
It wouldn't be enough for you to figure out what was going on here.

22:34.470 --> 22:41.530
Now that we've established what all the pieces of a dial are and why they are important, let's look at a very basic dial written in plain English.

22:41.850 --> 22:44.050
There's multiple ways you can format your dials.

22:44.170 --> 22:46.290
Protobufs are good for it.

22:46.470 --> 22:47.490
So is XML.

22:47.490 --> 22:50.510
You can use a syslog style if you want, just a text string.

22:50.510 --> 22:53.430
That's harder to parse for logging systems.

22:53.610 --> 22:56.810
But if that's what works for you, go for it.

22:58.590 --> 23:05.850
Here's the same dial written in human readable protobuf over there and XML format.

23:06.010 --> 23:06.810
Pretty simple.

23:06.810 --> 23:07.790
Easy to read.

23:12.800 --> 23:14.340
Now let's get complicated.

23:15.640 --> 23:20.080
Just like any log, there are endless varieties of user data access logs.

23:20.080 --> 23:25.080
So these are some of the more common complications that you'll come across when you're trying to implement user data access logging.

23:27.560 --> 23:30.100
First off, front end versus back end.

23:30.180 --> 23:32.600
Where should you capture your logs?

23:32.880 --> 23:39.760
At the data access front end used by employees or on a central authentication or authorization back end server.

23:40.280 --> 23:53.200
While a back end such as an authentication system has the advantage of being centralized so you don't have to implement logging in as many places, it's unlikely to have enough information to make a complete dial.

23:53.200 --> 23:57.900
Back ends typically don't know anything about queries, about justifications, about any of that.

23:57.900 --> 23:59.820
They're just there to respond to requests.

24:00.660 --> 24:10.320
A good rule of thumb about logging in general is to log as close to the source of the action as possible and in the case of user data access events, the source of the event is the actor.

24:10.320 --> 24:13.500
So you want to log close to the actor, which means logging in the front end.

24:17.110 --> 24:18.430
Multiple targets.

24:19.570 --> 24:24.930
Depending on the exact interface used to access user data, you might see any or all of these situations.

24:25.630 --> 24:28.190
Incidentally, none of them are wrong or bad.

24:28.190 --> 24:31.170
They're all perfectly legitimate ways to access user data.

24:31.170 --> 24:35.270
Again, depending on the situation, on the system, on what they're trying to do.

24:35.470 --> 24:40.930
You just need to make sure you log all the targets accessed by a given query.

24:42.090 --> 24:43.830
Which is pretty simple.

24:45.690 --> 24:51.660
You just use repeated fields.

24:52.080 --> 24:53.240
Pretty straightforward.

24:56.320 --> 25:03.040
Even in string sys log, comma separated, again, a lot harder to parse, but it's doable.

25:05.660 --> 25:07.460
So what about multiple tools?

25:07.460 --> 25:08.960
That should be the same thing, right?

25:08.960 --> 25:10.260
Repeated fields?

25:10.300 --> 25:11.540
Probably not.

25:11.680 --> 25:18.660
You should log a new record for each actor, tool, query, combination, rather than stuffing multiple tools in a single DAO.

25:19.380 --> 25:19.940
Why?

25:19.940 --> 25:21.980
Because different tools have different purposes.

25:21.980 --> 25:23.280
They store data differently.

25:23.280 --> 25:24.780
There's different reasons for accessing them.

25:24.780 --> 25:26.360
They're going to show data differently.

25:26.720 --> 25:31.200
And therefore, each actor is going to have a different motivation for using each different tool.

25:31.580 --> 25:38.840
For example, an actor looking up someone in an administrative front end that everyone in their job role uses, probably not too suspicious.

25:39.260 --> 25:47.220
An actor who normally looks up users in a front end, but then turns around and looks someone up in the database, that's pretty sketchy.

25:47.880 --> 25:53.020
Breaking out your DAOs by tool makes these discrepancies a lot easier to spot.

25:53.240 --> 26:01.440
And since each access to user data should have a business justification, you want to make sure to capture the business justification for using that specific tool.

26:01.620 --> 26:13.480
If you allow users to provide a blanket justification for multiple accesses using multiple tools, it becomes much easier for them to hide a single malicious access in a sea of benign ones.

26:17.920 --> 26:19.400
So how about no query?

26:19.960 --> 26:26.720
You might find situations where in your system where an actor is able to access user data without issuing a specific query.

26:26.940 --> 26:29.920
So without manually typing something into a search box.

26:30.100 --> 26:34.480
You still need to find a way to capture what exactly the actor was trying to look for.

26:34.980 --> 26:43.260
Remember, knowing what an actor was trying to see as well as what they actually looked at can tell you much more than either piece alone.

26:44.060 --> 26:49.720
For mouse based interactions, the link an actor clicked on is usually enough.

26:50.720 --> 26:52.040
It's good stand in.

26:52.640 --> 27:01.120
It's not going to be perfect but a lot of the times if you look at it, it will have data, you know, click on John Doe.

27:01.820 --> 27:02.940
Pretty close.

27:03.280 --> 27:12.540
In cases where a tool automatically supplies user data without a specific query by user, you should probably first look at why your tool does that.

27:13.260 --> 27:18.500
Can you modify it to only display user data when an actor specifically requests it?

27:18.920 --> 27:26.220
If that doesn't make sense for your tool, then investigate ways to have the tool itself supply the query to the DAO along with the data.

27:26.460 --> 27:33.240
So if it's a bug report, you can log the bug ID as the query or perhaps the ID of the user who filed the bug.

27:34.920 --> 27:40.920
Sometimes you'll find that a tool displays user data even though it's not needed for the thing that they're doing.

27:40.920 --> 27:41.860
It's just there.

27:42.160 --> 27:49.980
For example, your customer support system might show a user's purchase history and billing information even if they're just calling in for a password reset.

27:50.560 --> 27:58.240
Or your database is structured so that it is faster and easier to pull all of the user's data instead of the one little subset that the actor needs.

28:00.940 --> 28:11.340
In those cases, rather than trying to log around the problem, you should look at why your systems behave that way and try and restructure them so that they're only supplying data when it is specifically requested.

28:14.900 --> 28:16.380
No business justification.

28:17.120 --> 28:21.860
The business justification is very often the hardest part of a DAO to capture.

28:21.960 --> 28:26.760
You can get the other five parts by just recording what is going on in the system, the bits and bytes flowing across the wire.

28:27.040 --> 28:29.460
But the business justification comes from the actor.

28:29.580 --> 28:37.520
The moment you put a human in the equation, you're dealing with a whole new set of problems than when you're just yanking data off the wire.

28:37.940 --> 28:42.500
The most obvious problem is that your tool might not have anywhere to enter a business justification.

28:42.500 --> 28:45.620
If you haven't been logging DAOs yet, you don't have it set up yet.

28:46.000 --> 28:54.640
If you build your own tool, you can easily remedy this by adding in a little text box that a user has to fill out with a business justification before they can click search.

28:57.780 --> 29:02.940
However, this leads to the second potential problem, which is that the employees aren't going to like this.

29:02.940 --> 29:03.800
It's time consuming.

29:03.800 --> 29:04.380
It's frustrating.

29:04.380 --> 29:05.460
They have to go look up a bug number.

29:05.460 --> 29:06.800
They have to type in a bug number.

29:17.700 --> 29:20.120
This isn't an easy problem to solve.

29:21.180 --> 29:27.880
Yes, you are giving up a little bit of employee convenience in order to make a lot of gains in user data protection.

29:28.660 --> 29:34.180
You can solve this with user education, work with your employees to teach them why it's worth it.

29:34.700 --> 29:43.930
Or if your systems allow it, remove manual aspect altogether and program the tool to automatically enter the justification for them so they don't ever have to do it.

29:44.390 --> 29:48.230
What happens if there is no easily available clear justification?

29:48.750 --> 29:53.530
For example, front line customer support reps might take dozens of calls from users an hour.

29:54.010 --> 29:56.730
They don't have time to open a new support ticket for each one.

29:57.150 --> 29:59.210
You could require them to do it anyway.

29:59.310 --> 30:00.390
It would suck.

30:00.410 --> 30:02.710
Slow down your customer support by a lot.

30:03.870 --> 30:07.690
You could allow them to all use a single blanket justification like customer call.

30:08.210 --> 30:10.550
You could just allow them to use no justification.

30:11.110 --> 30:21.670
In those cases, it's really kind of up to you to look at your system, look at the accesses, look at the risk and weigh what's the best thing to do there.

30:29.510 --> 30:30.970
Now the fun part.

30:31.490 --> 30:32.510
Good examples.

30:34.930 --> 30:37.850
So first, quick disclaimer, these are all fictional.

30:40.210 --> 30:43.010
So with that out of the way, take a look at this dial.

30:43.470 --> 30:45.830
Is there anything that jumps out at you immediately?

30:47.270 --> 30:48.150
Family?

30:49.850 --> 30:53.090
So, yeah, that's not a great justification.

30:53.690 --> 30:57.070
And you can then look and see the actor and the target have the same last name.

30:58.150 --> 30:59.890
What about the tool you used?

31:00.670 --> 31:02.090
Customer support billing?

31:02.730 --> 31:04.610
Kind of sensitive data there.

31:06.270 --> 31:11.250
Employee Rose, we see, is looking at her relative Roxy's billing data.

31:11.910 --> 31:13.390
Maybe it's benign.

31:13.510 --> 31:15.530
Maybe Roxy is having a problem with her account.

31:15.530 --> 31:19.210
And Rose, being the good relative that she is, offered to help her out.

31:19.390 --> 31:20.950
Still not good.

31:20.950 --> 31:26.330
Rose should have directed Roxy to the proper customer support channels rather than trying to do it herself.

31:27.590 --> 31:28.810
Could be benign.

31:28.810 --> 31:30.390
But it could also be malicious.

31:30.410 --> 31:32.410
Maybe Roxy is Rose's daughter.

31:32.710 --> 31:34.530
And Rose doesn't want her having an account.

31:34.530 --> 31:38.970
She might go in and mess around with Roxy's account to prevent her from having one.

31:39.650 --> 31:41.130
Maybe they're in cahoots.

31:41.130 --> 31:44.450
Rose might be granting Roxy benefits that Roxy hasn't paid for.

31:48.990 --> 31:52.050
How about this one?

31:52.790 --> 31:54.370
What do you see here that looks sketchy?

31:59.370 --> 32:00.170
Targets?

32:00.830 --> 32:03.010
I'll give you an extra hint because this one is not obvious.

32:03.270 --> 32:06.790
The bug number is not me being lazy when I made up data for this slide.

32:12.790 --> 32:18.110
So here we have an actor looking at the accounts of current and former presidents.

32:18.110 --> 32:22.590
He searched for accounts at white house.gov email addresses.

32:22.650 --> 32:25.590
The tool that he is using is message viewer admin.

32:25.590 --> 32:29.610
So he probably went in and looked at the messages in our president's accounts.

32:29.970 --> 32:33.070
But the bug number he provided is almost certainly bogus.

32:33.330 --> 32:41.550
Sometimes actors with malicious intent, when they have to enter a business justification, will try and hide their activity by using keyboard strings.

32:41.550 --> 32:44.430
By providing fake justifications with keyboard strings.

32:45.030 --> 32:52.110
Things like 1, 2, 3, 4, ASDF, whatever the right hand version of that is that I can't remember right now.

32:52.110 --> 32:53.250
I've seen that one too.

32:53.290 --> 32:55.550
Those are all giant red flags for investigators.

32:58.150 --> 32:59.210
One more.

32:59.690 --> 33:01.250
You get three dells this time.

33:02.730 --> 33:06.090
And time stamps in a readable format because they are important here.

33:07.850 --> 33:09.370
What do you guys see here?

33:10.170 --> 33:11.830
What is sketchy about these?

33:17.020 --> 33:18.880
Same action on different dates.

33:19.660 --> 33:20.820
Anything else?

33:25.430 --> 33:26.850
I count deep dive.

33:27.330 --> 33:34.650
The combination of repeated accesses over a long period of time is pretty suspicious.

33:34.650 --> 33:40.550
We've also got the automatic customer support justification which doesn't provide a lot of information.

33:40.630 --> 33:43.230
And they are using this account deep dive tool.

33:44.930 --> 33:48.650
I talked earlier about setting automatic justifications for some job roles.

33:48.650 --> 33:50.290
This is why it's not a great idea.

33:50.290 --> 33:58.510
You can't really tell here if Romeo is working on a particularly long standing customer support ticket or if he's actively stalking Juliet.

33:59.430 --> 34:04.090
So cases like this are where your investigation team's expertise and knowledge will come into play.

34:04.390 --> 34:11.770
For example, an investigator might be able to dig up a customer support ticket for each of those events which would indicate a business justification.

34:12.770 --> 34:22.070
Alternatively, they might know that Romeo's coworkers almost never use the account deep dive tool and they might check Romeo's history and see he only uses it to access Juliet.

34:22.150 --> 34:23.530
It's a big red flag.

34:26.760 --> 34:28.720
So what's this about an investigation team?

34:28.720 --> 34:29.940
Where did this come from?

34:32.060 --> 34:35.320
So what's the point of logging all this data if no one is looking at it?

34:36.980 --> 34:41.400
Now the slide clicks over.

34:42.320 --> 34:43.160
There it goes.

34:43.560 --> 34:49.760
Now that you have your user data access logs, you need a team dedicated to investigating the events generated by these logs.

34:49.940 --> 34:56.960
This could be its own team adjacent to your existing SOC if you have the resources or you can include it in your SOC's regular duties.

34:57.600 --> 35:04.680
There's quite a bit of overlap between a typical security event investigator and a data event, data access event investigator.

35:04.940 --> 35:10.060
It's the log sources are different but otherwise it's much the same skill set and tools.

35:10.800 --> 35:14.380
You also need to make sure that the investigation team has legal support.

35:14.580 --> 35:18.120
Security events are typically caused by people outside your organization.

35:18.320 --> 35:24.340
Maybe in a few really high profile cases there might be legal action taken but for the most part it's going to be handled internally.

35:24.480 --> 35:27.600
There's no external legal ramifications.

35:28.340 --> 35:32.140
User data access events, however, come from your own employees.

35:32.140 --> 35:40.700
Depending on the consequences you lay out in your user data access policy, you may find yourself firing people for abuse or taking other employment related actions.

35:41.160 --> 35:44.960
You need to have a legal support team to make sure you're doing everything by the book.

35:49.050 --> 35:59.190
Just like with security logs and security events, you'll want to set up an automatic logs parsing system, logs analysis system to help your investigation team sort out the sketchy from the benign.

35:59.910 --> 36:01.570
This isn't a complete list.

36:01.570 --> 36:07.970
Exactly what you look for is going to depend on your organization, the type of user data you collect, what resources you have to investigate.

36:08.510 --> 36:12.910
Not all accesses that match one or more of these are going to necessarily be malicious.

36:13.370 --> 36:20.670
But they're a good start and your investigation team will be able to develop new rules, more precise rules over time.

36:24.740 --> 36:25.660
So that's a lot.

36:25.660 --> 36:27.520
That was a lot of information.

36:29.620 --> 36:30.500
TLDR.

36:31.920 --> 36:37.780
Basically, if you have user data in your systems and you almost certainly do, you need to make sure that it is protected.

36:37.900 --> 36:44.260
But typical security logs don't capture nearly enough information to investigate potential access abuse events.

36:44.260 --> 36:52.120
You need data access logs, DALs, which captures six key pieces of information about every access made by your employees to user data.

36:52.180 --> 37:09.060
The who, who made the access, whom, whose data was accessed, what, what data was accessed, where, which is what tool or system was used, when the access occurred, and why, which is the business justification for the access.

37:09.520 --> 37:16.700
Without all six pieces of information, it can be difficult or impossible to determine if a particular access was benign or abusive.

37:17.660 --> 37:21.820
Once you have all of these DALs, you need a team dedicated to investigating them.

37:22.080 --> 37:27.120
They'll use many of the same tools as your existing SOC, but they'll need legal support to back them up.

37:27.260 --> 37:35.380
They'll create a set of rules to monitor for suspicious behavior, and they'll investigate events using the information provided by the DALs.

37:37.970 --> 37:41.470
Data access logging sounds complicated, sounds like hard work.

37:41.470 --> 37:42.630
It is hard work.

37:43.210 --> 37:47.730
But we've never let a little hard work stand in the way of securing our user's data.

37:48.190 --> 37:52.290
So why would we let it stand in the way of making sure our user's data is protected?

37:52.510 --> 38:00.930
By protecting your user's data, you're keeping your headlines positive, you're maintaining your user's trust, and above all, you're protecting your users.

38:02.990 --> 38:04.170
Questions?

38:18.800 --> 38:23.100
I don't have any experience with DLP systems.

38:23.160 --> 38:36.660
So it would probably depend on, I guess, exactly what you're doing, what data you are collecting, and how much risk you're willing to accept.

38:39.800 --> 38:42.920
So... Okay.

38:51.020 --> 38:52.140
Potentially.

38:52.140 --> 39:05.440
You need to make sure that you aren't either breaching HIPAA yourself in the way that you are implementing the logging, or also you're not abusing your employee's right to privacy when you're doing this.

39:08.220 --> 39:09.620
Any others?

39:27.900 --> 39:29.920
Good change management.

39:30.700 --> 39:35.320
A large enough team that not one person is responsible for everything.

39:35.360 --> 39:42.920
It's a lot harder to slip something by if, you know, you have to have your code reviewed, for example, or if there's multiple people working on a system.

39:43.280 --> 39:47.820
Or even if you just have multiple people watching the logs.

39:47.820 --> 39:49.660
Because somebody is going to notice.

39:50.200 --> 40:00.020
It's basically who watches the watcher's situation and you have to just make sure that you have enough people that no single person is doing all of one job.

40:12.860 --> 40:19.240
Because machine learning is still relatively in its infancy here.

40:19.580 --> 40:21.200
You can use it.

40:21.400 --> 40:25.040
Again, you want to be careful that you're not generating a lot of noise.

40:25.080 --> 40:26.420
And that's the hard thing.

40:26.860 --> 40:37.960
Especially when you're just implementing a user data access logging, there's going to be a lot of noise because you're still figuring out what data you have, how people use it, what are typical use patterns.

40:38.580 --> 40:47.320
And so in my experience, it hasn't been that helpful yet because we're still figuring out, like, where to start the machine learning off.

40:47.320 --> 40:59.140
It probably, as we develop it more, it will be a really useful tool because then that way no one single, like, log watcher, event analyst has to try and keep all of this in their head.

40:59.140 --> 41:11.860
Like the machine can say, hey, you know, the last 30 accesses by this one person were made using the customer support billing tool and they made two with user min pro deep dive.

41:12.120 --> 41:15.600
That's harder for a human to spot but easy for a machine to spot.

41:16.920 --> 41:27.580
So just as we develop, as we get a better understanding of what the rules, we know what security logs should be, you know, things to log for, to watch for in those logs, we're still learning what that is in privacy logs.

41:31.170 --> 41:32.230
Anybody else?

41:58.300 --> 42:03.380
So they were asking what templates and what kinds of strings to search for.

42:04.020 --> 42:08.540
So that was, let me hop back a few slides here.

42:17.190 --> 42:25.450
So this is where I would start with the strings and what the string exactly is going to work out to be is going to depend on how your logging tool works.

42:25.950 --> 42:28.910
But for example, you can search for, like, well-known people.

42:28.910 --> 42:32.470
So maybe put, you know, whoever our current president is, search for that string.

42:32.470 --> 42:43.970
Or like the CEO of your company or if somebody is having their 15 minutes of fame, you know, you want to be watching out for them because somebody might say, oh, hey, you know, who's this whoever person?

42:43.970 --> 42:47.250
I'm going to go look up and see if they have an account because I just heard about them in the news.

42:48.690 --> 42:55.550
Looking for unusual job role and tool pairs.

42:56.130 --> 43:01.650
So for, like, that's where I was saying, you know, last 30 accesses they made were using this one tool.

43:01.870 --> 43:04.930
Everybody else in their job role only uses this one tool.

43:05.190 --> 43:09.750
And now you've got this one person with this job role using an unusual tool.

43:10.830 --> 43:15.570
And then the format exactly is going to depend on your system and exactly what you can do.

43:15.570 --> 43:24.130
If you have the ability to write your own custom logs, then you can use, you know, protobufs or XML or whatever makes sense for your system.

43:24.130 --> 43:26.110
And then you can just format them however you want.

43:26.350 --> 43:35.950
If you're working with COT software and maybe you're working off of CIS logs or AWS logs or something, it's going to be kind of restricted by what those logs give you.

43:38.230 --> 43:40.030
Anybody else?

43:41.450 --> 43:44.210
Going once, going twice.

43:44.210 --> 43:45.350
Thank you very much.

