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

[Security Solution] Refactor RDP ML job for field changes #91910

Closed
randomuserid opened this issue Feb 18, 2021 · 6 comments
Closed

[Security Solution] Refactor RDP ML job for field changes #91910

randomuserid opened this issue Feb 18, 2021 · 6 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. triage_needed v7.14.0

Comments

@randomuserid
Copy link
Contributor

randomuserid commented Feb 18, 2021

Describe the bug:

The RDP job windows_rare_user_type10_remote_login needs a field change, event.type for type 10 RDP auth events is now start. The job will need to be either versioned, replaced or forked.

@randomuserid randomuserid added bug Fixes for quality problems that affect the customer experience Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. labels Feb 18, 2021
@randomuserid randomuserid self-assigned this Feb 18, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@spong spong added the Team:Detections and Resp Security Detection Response Team label Feb 18, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@spong
Copy link
Member

spong commented Feb 23, 2021

Note: Detection ML Job Setting UI only goes back two weeks, larger lookbacks need to be done via ML App.

@randomuserid
Copy link
Contributor Author

randomuserid commented May 12, 2021

So I have the OK from @blaklaybul to make an update to the data feed query for this job, which should not require shipping a new job. I am going to plan and get this into 7.13.1 - or 7.13.2 at worst.

@randomuserid
Copy link
Contributor Author

randomuserid commented May 12, 2021

Some research is needed here. At present, both successful and unsuccessful auth events appear to be mapped to event.type:start in the authentication category. Maybe use event.action but we mostly stopped using that field last fall?

image

@randomuserid
Copy link
Contributor Author

randomuserid commented May 12, 2021

So it looks like event.outcome is mapped to success for event 4624 (a windows login.) However, we need to use either
winlog.logon.type or winlog.event_data.LogonType today to match a remote RDP login for a few reasons. Eventually, these fields will be deprecated when new fields like session.type are implemented, and this query will break again and need to be refactored.

The quickest fix here would be to do this, which evals true on newer events as well as the older events from when the query was first written. This makes it winlogbeat specific, but the job already is winlogbeat specific - the winlog* fields are beats fields, and the manifest is tied to the winlogbeat index - so we will need to ship a new version of this job to be portable across data types, that cannot be done by changing the data feed query.

{
  "query": {
    "bool": {
      "filter": [
      {"term": {"winlog.event_data.LogonType": "10"}},
      {"term": {"event.code": "4624"}}
      ],
      "must": [
        {
          "bool": {
            "should": [
              {
                "match": {
                  "event.type": {
                    "query": "authentication_success",
                    "operator": "OR"
                  }
                }
              },
              {
                "match": {
                  "event.action": {
                    "query": "logged-in",
                    "operator": "OR"
                  }
                }
              }
            ]
          }
        }
      ]
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. triage_needed v7.14.0
Projects
None yet
Development

No branches or pull requests

4 participants