-
Notifications
You must be signed in to change notification settings - Fork 444
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
[Lateral Movement Detection] Add dashboard and release to production #4974
Conversation
Lateral Movement Detection package updated for version Anomaly detection jobs created and started: Detection rules enabled and started without warnings:
Dashboard asset installed and available without any errors: |
packages/lmd/kibana/dashboard/lmd-17fea180-8c4c-11ed-bb03-41a73f349362.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Ship it!
Great work getting this done so fast! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
packages/lmd/docs/README.md
Outdated
Before going to the dashboard, make sure you have the following settings configured in your Kibana. | ||
1. You have started the above anomaly detection jobs. | ||
2. After enabling the jobs, go to **Management > Stack Management > Kibana > Data Views**. | ||
3. Click on **Create data view** button and create a data view with an **Index pattern** of **.ml-anomalies***. Make sure you assign the same value to **Name** and **Custom data view ID** under **Show advanced settings**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed with @sodhikirti07, note that anyone viewing the dashboard will also need read access to the .ml-anomalies*
index to be able to see the visualizations which query that index directly. To create the data view you also need to enable Allow hidden and system indices
inside the Advanced settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for catching this. I've made the changes.
packages/lmd/manifest.yml
Outdated
@@ -2,7 +2,8 @@ format_version: 2.2.0 | |||
name: lmd | |||
title: "Lateral Movement Detection" | |||
version: 1.0.0 | |||
license: "Elastic-2.0" | |||
source: | |||
license: "Elastic-2.0" | |||
description: "ML package to detect lateral movement based on file transfer activity. Requires a Platinum subscription." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package-spec [^1] appears to allow you to codify this with:
conditions:
elastic:
subscription: platinum
I'm not sure what the behavior is, but thought I would mention it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
packages/lmd/docs/README.md
Outdated
|
||
The **Lateral Movement Detection Dashboard** is available under **Analytics > Dashboard**. This dashboard gives an overview of anomalies triggered for the lateral movement detection package. | ||
|
||
Before going to the dashboard, make sure you have the following settings configured in your Kibana. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before going to the dashboard, make sure you have the following settings configured in your Kibana. | |
For the dashboard to work as expected, the following settings need to be configured in Kibana. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
packages/lmd/docs/README.md
Outdated
1. You have started the above anomaly detection jobs. | ||
2. You have **read** access to **.ml-anomalies*** index or are assigned **machine_learning_user** role. For more information on roles, please refer to [Built-in roles in Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-roles.html). | ||
3. After enabling the jobs, go to **Management > Stack Management > Kibana > Data Views**. | ||
4. Click on **Create data view** button and create a data view with an **Index pattern** of **.ml-anomalies***. Make sure you assign the same value to **Name** and **Custom data view ID** under **Show advanced settings**. You also need to enable **Allow hidden and system indices** inside the **Advanced settings**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow hidden and system indices should happen before they can proceed to naming the pattern, so maybe that should be the first sentence in the bullet.
Also maybe explicitly mention what the Name and Data View ID must be, since I'm guessing the dashboard is relying on a specific ID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
}, | ||
"references": [ | ||
{ | ||
"id": ".ml-anomalies*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider making this index pattern more specific. I believe the job results go to .ml-anomalies-shared
by default, unless you're specifying custom indices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out! Changed the dashboard to include .ml-anomalies-shared
index-pattern.
packages/lmd/kibana/security_rule/2577e749-ed63-4b58-ac32-4f8a94d73e60.json
Outdated
Show resolved
Hide resolved
packages/lmd/kibana/security_rule/282cd7e6-9d51-421e-93b4-ebc2d422eb44.json
Outdated
Show resolved
Hide resolved
@@ -16,7 +16,8 @@ | |||
"tags": [ | |||
"Elastic", | |||
"Lateral Movement Detection", | |||
"host" | |||
"host", | |||
"ML" | |||
], | |||
"type": "machine_learning", | |||
"version": 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump the version number since you're updating the rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
packages/lmd/kibana/security_rule/aa00d5db-7732-440a-97fc-8f9a3dc5314b.json
Outdated
Show resolved
Hide resolved
packages/lmd/kibana/security_rule/e5ebb55f-97f0-4815-b05b-59b223b1d4df.json
Outdated
Show resolved
Hide resolved
@andrewkroh Thanks for mentioning this. Added the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
manifest.yml changes LGTM,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
version: 1.0.0 | ||
source: | ||
license: "Elastic-2.0" | ||
description: "ML package to detect lateral movement based on file transfer activity." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see Requires a Platinum subscription
got removed <-- is this no longer true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is true for our package but I added it under condition
property in manifest.yml
. So, it will appear on right hand side of the package's main page (see the screenshot above).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I dislike how github doesn't have a way to insert screenshots into the code review view, so I was just looking at the code when I wrote that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, in the future this is the kind of thing you could put in the description of the PR (it's ok to update that as you go along).
Co-authored-by: Sam Zeitlin <samantha.zeitlin@elastic.co>
packages/lmd/docs/README.md
Outdated
|
||
For the dashboard to work as expected, the following settings need to be configured in Kibana. | ||
1. You have started the above anomaly detection jobs. | ||
2. You have **read** access to **.ml-anomalies*** index or are assigned the **machine_learning_user** role. For more information on roles, please refer to [Built-in roles in Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-roles.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Directly granting access to machine learning results indices has implications for using spaces to control ML job visibility. I think this should be made clear. Something along the lines of this:
2. You have **read** access to **.ml-anomalies*** index or are assigned the **machine_learning_user** role. For more information on roles, please refer to [Built-in roles in Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-roles.html). | |
2. You have **read** access to **.ml-anomalies*** index or are assigned the **machine_learning_user** role. For more information on roles, please refer to [Built-in roles in Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-roles.html). Please be aware that a user who has access to the underlying machine learning results indices can see the results of _all_ jobs in _all_ spaces. Do not grant these permissions if you use Kibana spaces to control which users can see which machine learning results. For more information on machine learning privileges see [here](https://www.elastic.co/guide/en/machine-learning/current/setup.html#setup-privileges). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! Nice work! 🚢
Co-authored-by: Apoorva Joshi <30438249+ajosh0504@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ML permissions documentation LGTM.
Package lmd - 1.0.0 containing this change is available at https://epr.elastic.co/search?package=lmd |
What does this PR do?
This PR adds the following enhancements in the Lateral Movement Detection package:
README
with instructions to add dashboardchangelog
andmanifest
yml files: added a newcondition
property for premium subscription, changed packageversion
for production release and addedlicense
.ML
tags and bumped version in security rulesChecklist
changelog.yml
file.Author's Checklist
How to test this PR locally
Related issues
Screenshots
Refer to below comment for screenshots!