Skip to content

Conversation

w0rk3r
Copy link
Contributor

@w0rk3r w0rk3r commented Jul 24, 2023

Issues

Resolves #2954

Summary

  • Threat Intel URL Indicator Match:
    • Drops the domain fields on this rule, as it is more noisy than expected, as a lot of commonly used web services are included in threat intel fields. Such as Github, dropbox, discord, google drive, etc.
  • Threat Intel Hash Indicator Match
    • Drops the support to dll.pe.imphash, as integrations such as abusech contain events with this field empty, which can match the target field in specific conditions in which it is not populated by Elastic Endpoint, generating thousands of unintended matches:

image

Some other approaches considered:

I've looked at using QueryDSL as a filter in the Indicator index query but excluding indicators that don't populate certain fields will cause the other fields which contain the information to be excluded, causing FNs.

Other potential solutions to the problem:

As this matches a specific condition on the endpoint, we could add a filter that excludes the events which cause this, here is a working query that we could ship as a filter:

Query
{
  "bool": {
    "must": [],
    "filter": [],
    "should": [],
    "must_not": [
      {
        "match_phrase": {
          "dll.hash.md5": ""
        }
      },
      {
        "match_phrase": {
          "dll.hash.sha1": ""
        }
      },
      {
        "match_phrase": {
          "dll.hash.sha256": ""
        }
      },
      {
        "match_phrase": {
          "dll.pe.imphash": ""
        }
      }
    ]
  }
}

@w0rk3r w0rk3r added Rule: Tuning tweaking or tuning an existing rule Domain: Endpoint labels Jul 24, 2023
@w0rk3r w0rk3r self-assigned this Jul 24, 2023
@MakoWish
Copy link
Contributor

Could we consider changing the URL Indicator rule to use both url.full and url.original? I have found some events that include one without the other, and other events with the opposite. I did a PATCH on our copy of the rule to do exactly that, and it is working well so far.

Copy link
Contributor

@Aegrah Aegrah left a comment

Choose a reason for hiding this comment

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

LGTM

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

@w0rk3r w0rk3r merged commit 0ff50ac into main Jul 26, 2023
@w0rk3r w0rk3r deleted the ti_hash_empty branch July 26, 2023 18:12
protectionsmachine pushed a commit that referenced this pull request Jul 26, 2023
* [Rule Tuning] Tune Threat Indicator Match Rules

* Update threat_intel_indicator_match_url.toml

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>

(cherry picked from commit 0ff50ac)
protectionsmachine pushed a commit that referenced this pull request Jul 26, 2023
* [Rule Tuning] Tune Threat Indicator Match Rules

* Update threat_intel_indicator_match_url.toml

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>

(cherry picked from commit 0ff50ac)
protectionsmachine pushed a commit that referenced this pull request Jul 26, 2023
* [Rule Tuning] Tune Threat Indicator Match Rules

* Update threat_intel_indicator_match_url.toml

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>

(cherry picked from commit 0ff50ac)
protectionsmachine pushed a commit that referenced this pull request Jul 26, 2023
* [Rule Tuning] Tune Threat Indicator Match Rules

* Update threat_intel_indicator_match_url.toml

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>

(cherry picked from commit 0ff50ac)
protectionsmachine pushed a commit that referenced this pull request Jul 26, 2023
* [Rule Tuning] Tune Threat Indicator Match Rules

* Update threat_intel_indicator_match_url.toml

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>

(cherry picked from commit 0ff50ac)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport: auto Domain: Endpoint Rule: Tuning tweaking or tuning an existing rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Threat Intel Hash Indicator Matches Empty Hash Fields

4 participants