-
Notifications
You must be signed in to change notification settings - Fork 610
[Rule Tuning] Node.js Pre or Post-Install Script Execution to Cross-Platform #5403
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
Conversation
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
Rule: Tuning - GuidelinesThese guidelines serve as a reminder set of considerations when tuning an existing rule. Documentation and Context
Rule Metadata Checks
Testing and Validation
|
|
@terrancedejesus these should be compatible with CrowdStrike, as there are no incompatible fields. |
|
⛔️ Test failed Results
|
rules/cross-platform/execution_nodejs_pre_or_post_install_script_execution.toml
Show resolved
Hide resolved
…pt_execution.toml Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>
| sequence by host.id with maxspan=10s | ||
| [process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "ProcessRollup2") and process.name == "node" and process.args == "install"] by process.entity_id | ||
| [process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "ProcessRollup2") and process.parent.name == "node"] by process.parent.entity_id | ||
| [process where host.os.type in ("linux", "macos") and event.type == "start" and event.action in ("exec", "ProcessRollup2") and process.name == "node" and process.args == "install"] by process.entity_id | ||
| [process where host.os.type in ("linux", "macos") and event.type == "start" and event.action in ("exec", "ProcessRollup2") and process.parent.name == "node"] by process.parent.entity_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.
I wrote this logic while testing for Linux; I would assume it to be compatible with macOS as well; but it was not tested. cc @DefSecSentinel
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.
No worries, I tested the query on the data generated from my macbook when emulating this.
Aegrah
left a comment
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!
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
rules/cross-platform/execution_nodejs_pre_or_post_install_script_execution.toml
Outdated
Show resolved
Hide resolved
…pt_execution.toml
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
Fixes #5402
Pull Request
Issue link(s):
Summary - What I changed
Adjusts the rule to be cross-platform with macos added. Adds Shai-Hulud 2.0 reference and T1204.005 as another mapping. Please see the issue for more details.
How To Test
Emulated with custom NPM package that leveraged pre-install hook to gather CSP CLI creds locally. Query results in related issue.
Checklist
bug,enhancement,schema,maintenance,Rule: New,Rule: Deprecation,Rule: Tuning,Hunt: New, orHunt: Tuningso guidelines can be generatedmeta:rapid-mergelabel if planning to merge within 24 hoursContributor checklist