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

Fixed RemoteIP field parsing in FailedLogonAttempts_UnknownUser.yaml #8995

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

0ccupi3R
Copy link
Contributor

The parse operator is incorrectly parsing the events that has more fields after rhost= as given below:

| parse SyslogMessage with * "rhost=" RemoteIP

SyslogMessage
------------------------------------------------
pam_sss(sshd:auth): authentication   failure  logname= uid=0 euid=0 tty=ssh   ruser= rhost=10.65.17.140 user=factory
pam_unix(sshd:auth): authentication   failure  logname= uid=0 euid=0 tty=ssh   ruser= rhost=10.65.17.130
pam_sss(sshd:auth): authentication   failure  logname= uid=0 euid=0 tty=ssh   ruser= rhost=10.65.17.122 user=USERID
pam_unix(sshd:auth): authentication   failure  logname= uid=0 euid=0 tty=ssh   ruser= rhost=10.65.17.110
pam_sss(sshd:auth): authentication   failure  logname= uid=0 euid=0 tty=ssh   ruser= rhost=10.65.17.120 user=admin
pam_unix(sshd:auth): authentication   failure  logname= uid=0 euid=0 tty=ssh   ruser= rhost=10.65.17.150

Current Output:

RemoteIP
--------------------------
10.65.17.140 user=factory
10.65.17.130
10.65.17.122 user=USERID
10.65.17.110
10.65.17.120 user=admin
10.65.17.140

Output After Change (Fixed by using extract function)

RemoteIP
------------
10.65.17.140
10.65.17.130
10.65.17.122
10.65.17.110
10.65.17.120
10.65.17.150

Required items, please complete

Change(s):

  • See guidance below

Reason for Change(s):

  • See guidance below

Version Updated:

  • Required only for Detections/Analytic Rule templates
  • See guidance below

Testing Completed:

  • See guidance below

Checked that the validations are passing and have addressed any issues that are present:

  • See guidance below

Guidance <- remove section before submitting


Before submitting this PR please ensure that you have read the following sections and filled out the changes, reason for change and testing complete sections:

Thank you for your contribution to the Microsoft Sentinel Github repo.

Details of the code changes in your submitted PR. Providing descriptions for pull requests ensures there is context to changes being made and greatly enhances the code review process. Providing associated Issues that this resolves also easily connects the reason.

Change(s):

  • Updated syntax for XYZ.yaml

Reason for Change(s):

Version updated:

  • Yes
  • Detections/Analytic Rule templates are required to have the version updated

The code should have been tested in a Microsoft Sentinel environment that does not have any custom parsers, functions or tables, so that you validate no incorrect syntax and execution functions properly. If your submission requires a custom parser or function, it must be submitted with the PR.

Testing Completed:

  • Yes/No/Need Help

Note: If updating a detection, you must update the version field.

Before the submission has been made, please look at running the KQL and Yaml Validation Checks locally.
https://github.com/Azure/Azure-Sentinel#run-kql-validation-locally

Checked that the validations are passing and have addressed any issues that are present:

  • Yes/No/Need Help

Note: Let us know if you have tried fixing the validation error and need help.

References:


Since few events were missing, fixed the RemoteIP field extraction by using `extract` function.
@0ccupi3R 0ccupi3R requested review from a team as code owners September 12, 2023 15:52
@v-atulyadav v-atulyadav self-assigned this Sep 13, 2023
@v-atulyadav v-atulyadav added Analytic Rules Solution Solution specialty review needed labels Sep 13, 2023
v-atulyadav
v-atulyadav previously approved these changes Sep 13, 2023
@v-atulyadav v-atulyadav merged commit ef77d7b into Azure:master Sep 13, 2023
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Analytic Rules Solution Solution specialty review needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants