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

Fix SID syntax for group membership changes #125

Merged
merged 1 commit into from
May 14, 2018

Conversation

jjrbg
Copy link
Contributor

@jjrbg jjrbg commented Apr 18, 2018

SIDs in logs from Active Directory are not contained within curly brackets, nor are they prefixed with a %. Perhaps this is from old NT days. This is an example log:

2018 Mar 01 00:00:00 WinEvtLog: Security: AUDIT_SUCCESS(4728): Microsoft-Windows-Security-Auditing: (no user): no domain: domaincontroller.lan.local: A member was added to a security-enabled global group. Subject: Security ID: S-1-5-21-0000000000-0000000000-000000000-00012 Account Name: admin_account Account Domain: LAN Logon ID: 0x11cc0174 Member: Security ID: S-1-5-21-0000000000-000000000-000000000-00675 Account Name: CN=added_account,OU=lan,DC=lan,DC=local Group: Security ID: S-1-5-21-0000000000-0000000000-000000000-512 Group Name: Domain Admins Group Domain: LAN Additional Information: Privileges: -

Retaining old syntax and added fixed syntax as an OR regex.

SIDs in logs from Active Directory are not contained within curly brackets, nor are they prefixed with a %. Perhaps this is from old NT days. This is an example log:

2018 Mar 01 00:00:00 WinEvtLog: Security: AUDIT_SUCCESS(4728): Microsoft-Windows-Security-Auditing: (no user): no domain: domaincontroller.lan.local: A member was added to a security-enabled global group. Subject:  Security ID:  S-1-5-21-0000000000-0000000000-000000000-00012  Account Name:  admin_account  Account Domain:  LAN  Logon ID:  0x11cc0174  Member:  Security ID:  S-1-5-21-0000000000-000000000-000000000-00675  Account Name:  CN=added_account,OU=lan,DC=lan,DC=local  Group:  Security ID:  S-1-5-21-0000000000-0000000000-000000000-512  Group Name:  Domain Admins  Group Domain:  LAN  Additional Information:  Privileges:  -

Retaining old syntax and added fixed syntax as an OR regex.
@frgv
Copy link
Contributor

frgv commented Apr 30, 2018

As commented here: https://groups.google.com/forum/#!topic/wazuh/ivHtXyuxDxo

In other languages, the field Security ID: ... can be translated as, for example in German, Sicherheits-ID:, so changing the space before ID: for \s* could solve this.

@frgv frgv requested a review from jesuslinares April 30, 2018 13:34
@ervet ervet mentioned this pull request May 2, 2018
@jesuslinares jesuslinares changed the base branch from master to 3.2 May 14, 2018 12:41
@jesuslinares jesuslinares changed the base branch from 3.2 to master May 14, 2018 12:43
@jesuslinares jesuslinares merged commit 8ffd38f into wazuh:master May 14, 2018
@jesuslinares
Copy link
Contributor

Thanks for your contribution @jjrbg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants