Skip to content

Conversation

@susan-shu-c
Copy link
Member

@susan-shu-c susan-shu-c commented Jun 6, 2025

Summary

Create a new version of v3_windows_anomalous_script with a rare detector on powershell.file.script_block_hash

This is a hash of the script block contents so it can be used to see how common the script block is in a population and would indicate custom commands or a new script that hasn't been run before.

Installed job on dev Kibana
Screenshot 2025-06-06 at 2 57 15 PM

Successful install from the Windows prebuilt anomaly detection (bottom most job)
Screenshot 2025-06-06 at 2 54 35 PM

Related issue

Documentation update: elastic/docs-content#1651

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@susan-shu-c susan-shu-c marked this pull request as ready for review June 9, 2025 13:10
@susan-shu-c susan-shu-c requested a review from a team as a code owner June 9, 2025 13:10
Copy link
Member

@qn895 qn895 left a comment

Choose a reason for hiding this comment

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

ML changes LGTM 🎉

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #128 / alerting api integration security and spaces enabled - Group 2 Alerts alert deletion schedule alert deletion superuser at space1 should delete the correct of alerts - all category inactive alerts

Metrics [docs]

✅ unchanged

@peteharverson peteharverson added release_note:enhancement backport:version Backport to applied version labels labels Jun 9, 2025
@peteharverson peteharverson changed the title Add rare scripts job Adds rare scripts job to preconfigured Security:Windows anomaly detection jobs Jun 9, 2025
@peteharverson
Copy link
Contributor

@susan-shu-c I just made a slight edit to the PR title to clarify the enhancement, and also added the release_note:enhancement label. Do please tweak the title if it isn't quite right.

@susan-shu-c
Copy link
Member Author

Appreciate it @peteharverson the new title is much clearer!
By the way, do you think the labels I've applied look correct? I wasn't sure if I should add both 8.19.0 candidate and v8.19.0. Also in addition to v9.0.0 should I also add other releases after that such as v9.1.0 or if it's covered already

@peteharverson
Copy link
Contributor

@susan-shu-c - as this is a new feature (rather than a bug fix), I've removed the v9.0.0 label and switched it to v9.1.0. It should also go into v8.19.0.

The 8.19.0 candidate is a label that some teams use when planning what is targeting 8.19, but the v8.19.0 is the important one which ensures it will make the 8.19.

@susan-shu-c susan-shu-c merged commit c6d9ed5 into main Jun 10, 2025
31 checks passed
@susan-shu-c susan-shu-c deleted the rare-scripts-job branch June 10, 2025 13:01
@susan-shu-c
Copy link
Member Author

Thank you @peteharverson !

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

https://github.com/elastic/kibana/actions/runs/15560227049

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 10, 2025
…tion jobs (elastic#223041)

## Summary

Create a new version of
[v3_windows_anomalous_script](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_script.json)
with a rare detector on powershell.file.script_block_hash

This is a hash of the script block contents so it can be used to see how
common the script block is in a population and would indicate custom
commands or a new script that hasn't been run before.

Installed job on dev Kibana
<img width="1699" alt="Screenshot 2025-06-06 at 2 57 15 PM"
src="https://github.com/user-attachments/assets/9f05bb5e-80fc-425d-a454-a80141a01f49"
/>

Successful install from the Windows prebuilt anomaly detection (bottom
most job)
<img width="1122" alt="Screenshot 2025-06-06 at 2 54 35 PM"
src="https://github.com/user-attachments/assets/1092ea69-f096-43eb-9d8b-cc18a97f848a"
/>

## Related issue

Documentation update: elastic/docs-content#1651

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

(cherry picked from commit c6d9ed5)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jun 10, 2025
…y detection jobs (#223041) (#223234)

# Backport

This will backport the following commits from `main` to `8.19`:
- [Adds rare scripts job to preconfigured Security:Windows anomaly
detection jobs (#223041)](#223041)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT
[{"author":{"name":"Susan","email":"23287722+susan-shu-c@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-06-10T13:01:53Z","message":"Adds
rare scripts job to preconfigured Security:Windows anomaly detection
jobs (#223041)\n\n## Summary\n\nCreate a new version
of\n[v3_windows_anomalous_script](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_script.json)\nwith
a rare detector on powershell.file.script_block_hash\n\nThis is a hash
of the script block contents so it can be used to see how\ncommon the
script block is in a population and would indicate custom\ncommands or a
new script that hasn't been run before.\n\nInstalled job on dev
Kibana\n<img width=\"1699\" alt=\"Screenshot 2025-06-06 at 2 57
15 PM\"\nsrc=\"https://github.com/user-attachments/assets/9f05bb5e-80fc-425d-a454-a80141a01f49\"\n/>\n\nSuccessful
install from the Windows prebuilt anomaly detection (bottom\nmost
job)\n<img width=\"1122\" alt=\"Screenshot 2025-06-06 at 2 54
35 PM\"\nsrc=\"https://github.com/user-attachments/assets/1092ea69-f096-43eb-9d8b-cc18a97f848a\"\n/>\n\n##
Related issue\n\nDocumentation update:
https://github.com/elastic/docs-content/pull/1651\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\nDoes this PR introduce any risks? For example,
consider risks like hard\nto test bugs, performance regression,
potential of data loss.\n\nDescribe the risk, its severity, and
mitigation for each identified\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\n\n- [ ] [See some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ]
...","sha":"c6d9ed53124a1b7a9e2455adf7752fbe6e138fbf","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","Feature:Anomaly
Detection","backport:version","8.19
candidate","v9.1.0","v8.19.0"],"title":"Adds rare scripts job to
preconfigured Security:Windows anomaly detection
jobs","number":223041,"url":"https://github.com/elastic/kibana/pull/223041","mergeCommit":{"message":"Adds
rare scripts job to preconfigured Security:Windows anomaly detection
jobs (#223041)\n\n## Summary\n\nCreate a new version
of\n[v3_windows_anomalous_script](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_script.json)\nwith
a rare detector on powershell.file.script_block_hash\n\nThis is a hash
of the script block contents so it can be used to see how\ncommon the
script block is in a population and would indicate custom\ncommands or a
new script that hasn't been run before.\n\nInstalled job on dev
Kibana\n<img width=\"1699\" alt=\"Screenshot 2025-06-06 at 2 57
15 PM\"\nsrc=\"https://github.com/user-attachments/assets/9f05bb5e-80fc-425d-a454-a80141a01f49\"\n/>\n\nSuccessful
install from the Windows prebuilt anomaly detection (bottom\nmost
job)\n<img width=\"1122\" alt=\"Screenshot 2025-06-06 at 2 54
35 PM\"\nsrc=\"https://github.com/user-attachments/assets/1092ea69-f096-43eb-9d8b-cc18a97f848a\"\n/>\n\n##
Related issue\n\nDocumentation update:
https://github.com/elastic/docs-content/pull/1651\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\nDoes this PR introduce any risks? For example,
consider risks like hard\nto test bugs, performance regression,
potential of data loss.\n\nDescribe the risk, its severity, and
mitigation for each identified\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\n\n- [ ] [See some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ]
...","sha":"c6d9ed53124a1b7a9e2455adf7752fbe6e138fbf"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223041","number":223041,"mergeCommit":{"message":"Adds
rare scripts job to preconfigured Security:Windows anomaly detection
jobs (#223041)\n\n## Summary\n\nCreate a new version
of\n[v3_windows_anomalous_script](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_script.json)\nwith
a rare detector on powershell.file.script_block_hash\n\nThis is a hash
of the script block contents so it can be used to see how\ncommon the
script block is in a population and would indicate custom\ncommands or a
new script that hasn't been run before.\n\nInstalled job on dev
Kibana\n<img width=\"1699\" alt=\"Screenshot 2025-06-06 at 2 57
15 PM\"\nsrc=\"https://github.com/user-attachments/assets/9f05bb5e-80fc-425d-a454-a80141a01f49\"\n/>\n\nSuccessful
install from the Windows prebuilt anomaly detection (bottom\nmost
job)\n<img width=\"1122\" alt=\"Screenshot 2025-06-06 at 2 54
35 PM\"\nsrc=\"https://github.com/user-attachments/assets/1092ea69-f096-43eb-9d8b-cc18a97f848a\"\n/>\n\n##
Related issue\n\nDocumentation update:
https://github.com/elastic/docs-content/pull/1651\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\nDoes this PR introduce any risks? For example,
consider risks like hard\nto test bugs, performance regression,
potential of data loss.\n\nDescribe the risk, its severity, and
mitigation for each identified\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\n\n- [ ] [See some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ]
...","sha":"c6d9ed53124a1b7a9e2455adf7752fbe6e138fbf"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Susan <23287722+susan-shu-c@users.noreply.github.com>
pmuellr pushed a commit to pmuellr/kibana that referenced this pull request Jun 11, 2025
…tion jobs (elastic#223041)

## Summary

Create a new version of
[v3_windows_anomalous_script](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_script.json)
with a rare detector on powershell.file.script_block_hash

This is a hash of the script block contents so it can be used to see how
common the script block is in a population and would indicate custom
commands or a new script that hasn't been run before.

Installed job on dev Kibana
<img width="1699" alt="Screenshot 2025-06-06 at 2 57 15 PM"
src="https://github.com/user-attachments/assets/9f05bb5e-80fc-425d-a454-a80141a01f49"
/>

Successful install from the Windows prebuilt anomaly detection (bottom
most job)
<img width="1122" alt="Screenshot 2025-06-06 at 2 54 35 PM"
src="https://github.com/user-attachments/assets/1092ea69-f096-43eb-9d8b-cc18a97f848a"
/>

## Related issue

Documentation update: elastic/docs-content#1651

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
susan-shu-c added a commit to elastic/docs-content that referenced this pull request Jun 12, 2025
## Overview

This PR documents the changes introduced by
* elastic/kibana#223041
nickpeihl pushed a commit to nickpeihl/kibana that referenced this pull request Jun 12, 2025
…tion jobs (elastic#223041)

## Summary

Create a new version of
[v3_windows_anomalous_script](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_script.json)
with a rare detector on powershell.file.script_block_hash

This is a hash of the script block contents so it can be used to see how
common the script block is in a population and would indicate custom
commands or a new script that hasn't been run before.

Installed job on dev Kibana
<img width="1699" alt="Screenshot 2025-06-06 at 2 57 15 PM"
src="https://github.com/user-attachments/assets/9f05bb5e-80fc-425d-a454-a80141a01f49"
/>

Successful install from the Windows prebuilt anomaly detection (bottom
most job)
<img width="1122" alt="Screenshot 2025-06-06 at 2 54 35 PM"
src="https://github.com/user-attachments/assets/1092ea69-f096-43eb-9d8b-cc18a97f848a"
/>

## Related issue

Documentation update: elastic/docs-content#1651

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
iblancof pushed a commit to iblancof/kibana that referenced this pull request Jun 16, 2025
…tion jobs (elastic#223041)

## Summary

Create a new version of
[v3_windows_anomalous_script](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/ml/server/models/data_recognizer/modules/security_windows/ml/v3_windows_anomalous_script.json)
with a rare detector on powershell.file.script_block_hash

This is a hash of the script block contents so it can be used to see how
common the script block is in a population and would indicate custom
commands or a new script that hasn't been run before.

Installed job on dev Kibana
<img width="1699" alt="Screenshot 2025-06-06 at 2 57 15 PM"
src="https://github.com/user-attachments/assets/9f05bb5e-80fc-425d-a454-a80141a01f49"
/>

Successful install from the Windows prebuilt anomaly detection (bottom
most job)
<img width="1122" alt="Screenshot 2025-06-06 at 2 54 35 PM"
src="https://github.com/user-attachments/assets/1092ea69-f096-43eb-9d8b-cc18a97f848a"
/>

## Related issue

Documentation update: elastic/docs-content#1651

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants