Skip to content

Improve DGA/LotL doc's Installation Procedures - #10476

Merged
jmcarlock merged 21 commits into
mainfrom
rseldner-patch-1
Jul 29, 2024
Merged

Improve DGA/LotL doc's Installation Procedures#10476
jmcarlock merged 21 commits into
mainfrom
rseldner-patch-1

Conversation

@rseldner

@rseldner rseldner commented Jul 12, 2024

Copy link
Copy Markdown
Contributor

Proposed commit message

The Living off the Land integration's installation procedure could use these improvements:

  1. Noted that one of the listed ingest pipeline methods should be used
  2. added a missing mapping step that is required for the ML job card to appear as an option (as described here: https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration)
  3. added optional step of creating a data view that is specific to the windows process data (rather than selecting logs-* which hits impertinent indices)
  4. noted that the ML job card can also be missing if the mapping is not in place

Ask for Reviewers:

  • - evaluate these doc changes are appropriate
1 - Noted that one of the listed ingest pipeline methods should be used
2 - added the missing mapping that is required for the ML job card to appear as an option
3 - added optional step of creating a data view that is specific to the windows process data (rather than selecting `logs-*` which hits impertinent indices)
4 - noted that the ML job card can also be missing if the mapping is not in place
@rseldner rseldner added documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. enhancement New feature or request labels Jul 12, 2024
@rseldner
rseldner requested review from a team as code owners July 12, 2024 17:53
@rseldner
rseldner requested a review from susan-shu-c July 12, 2024 17:59
@jmcarlock

Copy link
Copy Markdown
Contributor

@rseldner Thank you for your contribution to this documentation!

I do not believe the index mapping changes are still necessary as they now are handled in custom.yml

Also, when would a user need to use the Rollover API?

@jmcarlock jmcarlock self-assigned this Jul 15, 2024
@rseldner

Copy link
Copy Markdown
Contributor Author

I found the mapping was needed while assisting a user in troubleshooting the missing ML job card despite adding the ingest pipeline and confirming the problemchild fields had been enriched.

I reproduced this myself and can demonstrate. I will reach out internally.

The rollover would be needed after defining the mapping in the index/component template so that the subsequent index picks up the mapping.

@jmcarlock

Copy link
Copy Markdown
Contributor

@rseldner Can you confirm the version of Kibana?

@rseldner

Copy link
Copy Markdown
Contributor Author

User was on Elastic's Govcloud 8.13.4
I tested on ESS deployments running 8.13.4 and 8.14.2

@willemdh

Copy link
Copy Markdown

Please also add what data from what Agent is required. I once lost time testing this while it needs Agent events to work? Or has that changed since

@susan-shu-c

susan-shu-c commented Jul 17, 2024

Copy link
Copy Markdown
Member

Thank you for the PR, @jmcarlock on our team has been investigating some related details, and will provide more feedback + keep you posted

@andrewkroh andrewkroh added the Integration:problemchild Living off the Land Attack Detection label Jul 19, 2024
@jmcarlock
jmcarlock requested a review from sodhikirti07 July 19, 2024 19:31
@jmcarlock jmcarlock changed the title Improve LotL doc's Installation Procedures Jul 19, 2024
@jmcarlock

jmcarlock commented Jul 19, 2024

Copy link
Copy Markdown
Contributor

@rseldner , I changed the instructions to runtime mappings, which doesn't require a rollover. Can you give it one more test on your end?

We also needed to make the changes for DGA, which had the same issue. I also bumped the version number, added a changelog entry, and tested both with elastic-package and with cloud deployments.

@andrewkroh andrewkroh added the Integration:dga Domain Generation Algorithm Detection label Jul 19, 2024
sodhikirti07
sodhikirti07 previously approved these changes Jul 22, 2024

@sodhikirti07 sodhikirti07 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New instructions to add Mappings lgtm!

@rseldner

Copy link
Copy Markdown
Contributor Author

At least in the current state where these fields are not getting mapped, We are missing the point that if the mappings do not exist (runtime or not), they need to be added to the relevant index/component template. Doing PUT INDEX_NAME*/_mapping will solely apply it to the specified index.
If using time series data (which I imagine everyone would be for this integration...), then the index will eventually rollover, and the new resulting index will not contain these mappings. If not defined in the template, PUT INDEX_NAME*/_mapping would be needed every time there's a rollover.

Adding runtime mappings to an index do not get around this and do not quite make sense to me (if we are adding a mapping to an index, why make it a runtime mapping? We prefer query overhead v.s. storage overhead?)

Unless you meant to instead apply a runtime field on the data view to emit these field values from _source. In which case, I believe that might work; but that is a separate step to perform within Kibana UI or Kibana API.

Sidenote, shouldn't prediction_probability be float? I see that got changed from my original commit.

          "problemchild": {
            "prediction": "0",
            "prediction_probability": 0.9999999537601167
          }
@jmcarlock
jmcarlock dismissed sodhikirti07’s stale review July 22, 2024 16:59

per @rseldner, will require additional changes

@jmcarlock

Copy link
Copy Markdown
Contributor

@rseldner , ok, I understand! Thank you for the explanation. I will change the method back to your suggestions and test again.

Will also change prediction_probability to the correct data type.

Comment thread packages/dga/docs/README.md
@jmcarlock
jmcarlock requested a review from sodhikirti07 July 23, 2024 19:18
Comment thread packages/dga/docs/README.md
Comment thread packages/problemchild/docs/README.md
@jmcarlock
jmcarlock requested a review from sodhikirti07 July 25, 2024 19:02
Comment thread packages/dga/docs/README.md Outdated
Comment thread packages/dga/docs/README.md Outdated
Comment thread packages/dga/docs/README.md Outdated
Comment thread packages/dga/docs/README.md Outdated
Comment thread packages/problemchild/docs/README.md Outdated
Comment thread packages/problemchild/docs/README.md Outdated
@jmcarlock

jmcarlock commented Jul 26, 2024

Copy link
Copy Markdown
Contributor

Thank you for the review, @susan-shu-c !

@jmcarlock
jmcarlock requested a review from susan-shu-c July 26, 2024 19:34
@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @jmcarlock

@sodhikirti07 sodhikirti07 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmcarlock Nicely done! LGTM!

@susan-shu-c susan-shu-c left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks all for the contributions, and Gus for the research and testing!

@jmcarlock
jmcarlock merged commit c8c2018 into main Jul 29, 2024
@elasticmachine

Copy link
Copy Markdown

Package dga - 2.0.3 containing this change is available at https://epr.elastic.co/search?package=dga

@elasticmachine

Copy link
Copy Markdown

Package problemchild - 2.1.4 containing this change is available at https://epr.elastic.co/search?package=problemchild

@jmcarlock
jmcarlock deleted the rseldner-patch-1 branch July 30, 2024 18:09
@rseldner

Copy link
Copy Markdown
Contributor Author

☝️ ➕ Thanks for your attention on this @jmcarlock !

harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
* Update README.md

1 - Noted that one of the listed ingest pipeline methods should be used
2 - added the missing mapping that is required for the ML job card to appear as an option
3 - added optional step of creating a data view that is specific to the windows process data (rather than selecting `logs-*` which hits impertinent indices)
4 - noted that the ML job card can also be missing if the mapping is not in place

* remove non-functional field mappings

* add correct index name for elastic defend and remove windows agent reference

* add runtime mapping install for DGA

* change lotl instructions to use runtime mappings

* add changelog, bump manifest version

* update lotl docs

* small fixes

* add dga instructions

* fix wording

* finish network log sentence

* fix field mappings in dga

* add custom pipeline instructions

* formatting fixes

* formatting try 2

* formatting fix 3

* formatting fix 4

* fix typo

* fix tab indentation for numbering

* clarify UI vs instruction steps

* remove problemchild reference from dga

---------

Co-authored-by: Gus Carlock <10844131+jmcarlock@users.noreply.github.com>
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
* Update README.md

1 - Noted that one of the listed ingest pipeline methods should be used
2 - added the missing mapping that is required for the ML job card to appear as an option
3 - added optional step of creating a data view that is specific to the windows process data (rather than selecting `logs-*` which hits impertinent indices)
4 - noted that the ML job card can also be missing if the mapping is not in place

* remove non-functional field mappings

* add correct index name for elastic defend and remove windows agent reference

* add runtime mapping install for DGA

* change lotl instructions to use runtime mappings

* add changelog, bump manifest version

* update lotl docs

* small fixes

* add dga instructions

* fix wording

* finish network log sentence

* fix field mappings in dga

* add custom pipeline instructions

* formatting fixes

* formatting try 2

* formatting fix 3

* formatting fix 4

* fix typo

* fix tab indentation for numbering

* clarify UI vs instruction steps

* remove problemchild reference from dga

---------

Co-authored-by: Gus Carlock <10844131+jmcarlock@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. enhancement New feature or request Integration:dga Domain Generation Algorithm Detection Integration:problemchild Living off the Land Attack Detection

7 participants