Skip to content

system,windows: fix UAC attribute bit table #8361

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

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Oct 31, 2023

Proposed commit message

The previous table was incorrect. Table data comes from MS-SAMR: Security Account Manager (SAM) Remote Protocol (Client-to-Server) version 46.0, 2.2.1.12 USER_ACCOUNT Codes.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

@efd6 efd6 added bug Something isn't working, use only for issues Team:Security-External Integrations Integration:windows Windows Integration:system System labels Oct 31, 2023
@efd6 efd6 self-assigned this Oct 31, 2023
The previous table was incorrect. Table data comes from MS-SAMR: Security
Account Manager (SAM) Remote Protocol (Client-to-Server) version 46.0[1],
2.2.1.12 USER_ACCOUNT Codes.

[1]https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-SAMR/%5bMS-SAMR%5d-230828.docx
@efd6 efd6 force-pushed the b36999-system-windows branch from c9b115c to bcc115d Compare October 31, 2023 21:12
@elasticmachine
Copy link

elasticmachine commented Oct 31, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-10-31T21:12:55.457+0000

  • Duration: 26 min 14 sec

Test stats 🧪

Test Results
Failed 0
Passed 301
Skipped 0
Total 301

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (11/11) 💚
Files 93.75% (15/16)
Classes 93.75% (15/16)
Methods 78.302% (166/212)
Lines 93.762% (8823/9410)
Conditionals 100.0% (0/0) 💚

@efd6 efd6 marked this pull request as ready for review October 31, 2023 21:39
@efd6 efd6 requested review from a team as code owners October 31, 2023 21:39
@efd6 efd6 requested review from faec and leehinman October 31, 2023 21:39
@elasticmachine
Copy link

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

Do we have the evtx file associated with one of these samples that you can load into the Window Event Viewer and grab the event xml with the rendered message? I want to sanity check this. The user that reported the problem had good evidence, but I still want to double check.

"0x00400000": DONT_REQ_PREAUTH
"0x00800000": PASSWORD_EXPIRED
"0x01000000": TRUSTED_TO_AUTH_FOR_DELEGATION
"0x04000000": PARTIAL_SECRETS_ACCOUNT
Copy link
Member

Choose a reason for hiding this comment

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

I'm thinking we should trim the USER_ prefix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree from a storage/simplicity perspective, but am conflicted given that it will then no longer match the MS docs.

Copy link
Member

Choose a reason for hiding this comment

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

I don't have a strong opinion. My reasoning behind making the comment was to reconcile the differences between the docs12 that MS points to for this field and the docs that we have discovered to have the correct numerical values.

Now that I look closer the names are still a little different than the old names even after trimming the USER_ prefix. So that would still break queries that might have existed for the old names. Maybe a clean shift to new names is best.

Footnotes

  1. https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4738

  2. https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties#list-of-property-flags

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, some were the same, but there in not a proper mapping between the two sets.

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

I just looked at the example given in https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4738, and I think this change checks out with the values shown there.

@efd6
Copy link
Contributor Author

efd6 commented Nov 1, 2023

We have evtx files in the security module in beats that give json files that exercise this.

@efd6
Copy link
Contributor Author

efd6 commented Nov 1, 2023

This is the event that is used in the winlogbeat 4741 that gives this diff in the beats PR here.
Screenshot 2023-11-01 at 11 57 41

@efd6 efd6 merged commit 698589a into elastic:main Nov 1, 2023
@elasticmachine
Copy link

Package system - 1.47.2 containing this change is available at https://epr.elastic.co/search?package=system

@elasticmachine
Copy link

Package windows - 1.41.1 containing this change is available at https://epr.elastic.co/search?package=windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working, use only for issues Integration:system System Integration:windows Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants