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

Update error codes for Sysmon DNS #16040

Merged

Conversation

andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Feb 3, 2020

This generates a list of error numbers / symbolic names from winerror.h. I included errors that began with "DNS_" and some additional error codes as reported in #15685.

Fixes #15685

@elasticmachine
Copy link
Collaborator

Pinging @elastic/siem (Team:SIEM)

var dnsQueryStatusCodes = {
"0": "SUCCESS",
"2329": "DNS_ERROR_RCODE_FORMAT_ERROR",
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure where I got these codes from originally because they don't seem to exist 🤷‍♂ .

Copy link
Contributor

Choose a reason for hiding this comment

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

This is really weird. The ID for all this removed error codes is in hex, while they have been re-added in decimal. For example:

-       "2330": "DNS_ERROR_RCODE_NXRRSET",
+       "9008": "DNS_ERROR_RCODE_NXRRSET",

DNS_ERROR_RCODE_NXRRSET 9008 (0x2330)

And all the errors where the hex code included an non-decimal hex digit were missing.

@andrewkroh
Copy link
Member Author

jenkins, test this

@andrewkroh andrewkroh added the needs_backport PR is waiting to be backported to other branches. label Feb 5, 2020
This generates a list of error numbers / symbolic names from winerror.h. I included errors that began with "DNS_" and some additional error codes as reported in elastic#15685.

Fixes elastic#15685
@andrewkroh andrewkroh force-pushed the feature/wlb/more-sysmon-dns-error-codes branch from 8d6cf58 to 281ff90 Compare February 25, 2020 14:32
var dnsQueryStatusCodes = {
"0": "SUCCESS",
"2329": "DNS_ERROR_RCODE_FORMAT_ERROR",
Copy link
Contributor

Choose a reason for hiding this comment

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

This is really weird. The ID for all this removed error codes is in hex, while they have been re-added in decimal. For example:

-       "2330": "DNS_ERROR_RCODE_NXRRSET",
+       "9008": "DNS_ERROR_RCODE_NXRRSET",

DNS_ERROR_RCODE_NXRRSET 9008 (0x2330)

And all the errors where the hex code included an non-decimal hex digit were missing.

@andrewkroh andrewkroh merged commit 8f5d755 into elastic:master Mar 10, 2020
andrewkroh added a commit to andrewkroh/beats that referenced this pull request Mar 10, 2020
This generates a list of error numbers / symbolic names from winerror.h. I included errors that began with "DNS_" and some additional error codes as reported in elastic#15685.

Fixes elastic#15685

(cherry picked from commit 8f5d755)
@andrewkroh andrewkroh added v7.7.0 and removed needs_backport PR is waiting to be backported to other branches. labels Mar 10, 2020
andrewkroh added a commit to andrewkroh/beats that referenced this pull request Mar 10, 2020
This generates a list of error numbers / symbolic names from winerror.h. I included errors that began with "DNS_" and some additional error codes as reported in elastic#15685.

Fixes elastic#15685

(cherry picked from commit 8f5d755)
andrewkroh added a commit that referenced this pull request Mar 11, 2020
This generates a list of error numbers / symbolic names from winerror.h. I included errors that began with "DNS_" and some additional error codes as reported in #15685.

Fixes #15685

(cherry picked from commit 8f5d755)
andrewkroh added a commit that referenced this pull request Mar 11, 2020
This generates a list of error numbers / symbolic names from winerror.h. I included errors that began with "DNS_" and some additional error codes as reported in #15685.

Fixes #15685

(cherry picked from commit 8f5d755)
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.

[Winlogbeat] Sysmon Module - Missing DNS Status Codes
3 participants