Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.15] [Security Solution] [Attack discovery] Includes the `user.target.name` field in the default Anonymization allow list to improve Attack discoveries (#193496) #193563

Merged
merged 4 commits into from
Sep 23, 2024

Conversation

kibanamachine
Copy link
Contributor

…` field in the default Anonymization allow list to improve Attack discoveries (elastic#193496)

## [Security Solution] [Attack discovery] Includes the `user.target.name` field in the default Anonymization allow list to improve Attack discoveries

### Summary

This PR implements <elastic#193350> by adding the `user.target.name` field to the default Anonymization allow list.

The `user.target.name` field will be allowed and anonymized by default.

The _Background_ section below describes the purpose of this field, and how it improves Attack discoveries.

### Background

In the Elastic Common Schema (ECS), the `user.target.name` field represents the targeted user of an action taken. It is a member of the [Field sets that can be nested under User](https://www.elastic.co/guide/en/ecs/current/ecs-user.html#ecs-user-nestings).

Some detection rules make a distinction between the user taking action, and another account that's the _target_ of that action.

For example, in the [User Added to Privileged Group](https://www.elastic.co/guide/en/security/current/user-added-to-privileged-group.html) detection rule:

- The `user.name` field in the alert identifies the account taking action; in this example the user _adding_ a member to the `Administrators` group
- The `user.target.name` field in the alert specifies the account that's the _target_ of the action; in this example it's the account _being added to_ the `Administrators` group

Including the `user.target.name` field in the default Anonymization settings  improves Attack discoveries, because it enables the model to distinguish between the user taking action and the target of that action when the `user.target.name` field is available, as illustrated by the _Before_ and _After_ images below:

**Before**

![before](https://github.com/user-attachments/assets/440d25ee-0d91-4c2a-8763-ae6ee2d6a572)

**After**

![after](https://github.com/user-attachments/assets/d241be88-1cb1-4e13-a9ae-6328407c26ee)

### Desk testing

1) Start a new (development) instance of Elasticsearch:

```sh
yarn es snapshot -E path.data=/Users/$USERNAME/data-2024-09-19a
```

2) Start a local (development) instance of Kibana:

```
yarn start --no-base-path
````

3) Login to Kibana as the `elastic` user

4) Navigate to Stack Management > License management

5) Click Start trial

6) Navigate to Stack Management > AI Assistants

7) Click `Manage Settings` for the security assistant

8) Click Anonymization

9) Enter `user.target.name` in the search field

**Expected results**

- The `user.target.name` field is `Allowed`
- The `user.target.name` field is `Anonymized`

as illustrated by the screenshot below:

![anonymization_settings](https://github.com/user-attachments/assets/625dda96-d77a-416f-b78b-d4ef57fd4890)

(cherry picked from commit 349a307)
@andrew-goldstein
Copy link
Contributor

@elasticmachine merge upstream

@andrew-goldstein
Copy link
Contributor

@elasticmachine merge upstream

@andrew-goldstein
Copy link
Contributor

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @andrew-goldstein

@kibanamachine kibanamachine merged commit fc16411 into elastic:8.15 Sep 23, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants