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

[FN Tuning] Shared Object Created or Changed by Previously Unknown Pr… #4529

Merged
merged 7 commits into from
Apr 8, 2025

Conversation

Aegrah
Copy link
Contributor

@Aegrah Aegrah commented Mar 11, 2025

Summary

Updating this rule to detect more paths that store shared objects + adding coverage for shared objects that leverage the .so.$int naming format such as so.2, as this was currently not detected.

Copy link
Contributor

Rule: Tuning - Guidelines

These guidelines serve as a reminder set of considerations when tuning an existing rule.

Documentation and Context

  • Detailed description of the suggested changes.
  • Provide example JSON data or screenshots.
  • Provide evidence of reducing benign events mistakenly identified as threats (False Positives).
  • Provide evidence of enhancing detection of true threats that were previously missed (False Negatives).
  • Provide evidence of optimizing resource consumption and execution time of detection rules (Performance).
  • Provide evidence of specific environment factors influencing customized rule tuning (Contextual Tuning).
  • Provide evidence of improvements made by modifying sensitivity by changing alert triggering thresholds (Threshold Adjustments).
  • Provide evidence of refining rules to better detect deviations from typical behavior (Behavioral Tuning).
  • Provide evidence of improvements of adjusting rules based on time-based patterns (Temporal Tuning).
  • Provide reasoning of adjusting priority or severity levels of alerts (Severity Tuning).
  • Provide evidence of improving quality integrity of our data used by detection rules (Data Quality).
  • Ensure the tuning includes necessary updates to the release documentation and versioning.

Rule Metadata Checks

  • updated_date matches the date of tuning PR merged.
  • min_stack_version should support the widest stack versions.
  • name and description should be descriptive and not include typos.
  • query should be inclusive, not overly exclusive. Review to ensure the original intent of the rule is maintained.

Testing and Validation

  • Validate that the tuned rule's performance is satisfactory and does not negatively impact the stack.
  • Ensure that the tuned rule has a low false positive rate.

@tradebot-elastic
Copy link

tradebot-elastic commented Mar 11, 2025

⛔️ Tests failed:

"systemd" or "root" or "sshd" or "pip" or "jlink" or python* or "update-alternatives" or pip* or
"installer.bin.inst" or "uninstall-bin" or "linux_agent.inst" or crio or ssm-agent-worker or packagekitd
"systemd" or "root" or "sshd" or "pip" or "jlink" or python* or "update-alternatives" or pip* or "crio" or
"ssm-agent-worker" or "packagekitd"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we see if the SSM agent is created the SO because it's running a custom document? If so, this would be very suspicious IMO. AWS-managed SSM docs may do things on Linux systems as a requirement for managing these nodes, however, custom SSM docs can be abused to run whatever on that EC2 instance.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case we just have the file creation event, so all I have is a process name and file path. The file path for this FP pattern is: /usr/lib/jvm/java-17-openjdk-17.0.14.0.7-3.el8.x86_64/lib/{file}.so.

As the pattern is easy to exclude based on process/path, I added the following exclusion (process.name:"ssm-agent-worker" and file.path:/usr/lib/jvm/java*) rather than just on process.name. Thanks for the review @terrancedejesus !

Copy link
Contributor

@DefSecSentinel DefSecSentinel left a comment

Choose a reason for hiding this comment

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

LGTM

@tradebot-elastic
Copy link

tradebot-elastic commented Mar 14, 2025

⛔️ Tests failed:

  • ❌ Shared Object Created or Changed by Previously Unknown Process (kuery)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@tradebot-elastic
Copy link

tradebot-elastic commented Mar 14, 2025

⛔️ Tests failed:

  • ❌ Shared Object Created or Changed by Previously Unknown Process (kuery)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@tradebot-elastic
Copy link

tradebot-elastic commented Mar 15, 2025

⛔️ Tests failed:

  • ❌ Shared Object Created or Changed by Previously Unknown Process (kuery)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

Copy link
Contributor

@eric-forte-elastic eric-forte-elastic left a comment

Choose a reason for hiding this comment

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

🟢 Manual review, looks good to me! 👍

@tradebot-elastic
Copy link

tradebot-elastic commented Apr 3, 2025

⛔️ Test failed

Results
  • ❌ Shared Object Created or Changed by Previously Unknown Process (kuery)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@tradebot-elastic
Copy link

tradebot-elastic commented Apr 8, 2025

⛔️ Test failed

Results
  • ❌ Shared Object Created or Changed by Previously Unknown Process (kuery)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@tradebot-elastic
Copy link

tradebot-elastic commented Apr 8, 2025

⛔️ Test failed

Results
  • ❌ Shared Object Created or Changed by Previously Unknown Process (kuery)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@Aegrah Aegrah merged commit 05c9f6b into main Apr 8, 2025
11 checks passed
@Aegrah Aegrah deleted the rule-tuning-shared-object-creation branch April 8, 2025 16:19
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