Skip to content

Commit

Permalink
in_winevtlog: Skip to translate SID for capability SIDs
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 committed Aug 14, 2024
1 parent 960419b commit a6370ff
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/in_winevtlog/pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,14 @@ static int pack_sid(struct winevtlog_config *ctx, PSID sid, int extract_sid)

if (ConvertSidToStringSidW(sid, &wide_sid)) {
if (extract_sid == FLB_TRUE) {
/* Skip to translate SID for capability SIDs.
* see also: https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-security-identifiers
*/
if (wcsnicmp(wide_sid, L"S-1-15-3-", 9) == 0) {
flb_plg_debug(ctx->ins, "This SID is one of the capability SIDs. Skip.");

goto not_mapped_error;
}
if (!LookupAccountSidA(NULL, sid,
account, &len, domain,
&len, &sid_type)) {
Expand Down

0 comments on commit a6370ff

Please sign in to comment.