Skip to content

Commit

Permalink
Added specific service SID objects to local machine services
Browse files Browse the repository at this point in the history
  • Loading branch information
lkarlslund committed Jan 29, 2024
1 parent 2cf6bab commit 270b8ad
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/integrations/localmachine/analyze/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,10 +608,19 @@ func ImportCollectorInfo(ao *engine.Objects, cinfo localmachine.Info) (*engine.O
if serviceaccountSID != windowssecurity.LocalServiceSID {
serviceobject.EdgeTo(svcaccount, analyze.EdgeAuthenticatesAs)
}

} else if service.Account != "" || service.AccountSID != "" {
ui.Warn().Msgf("Unhandled service credentials %+v", service)
}

// Specific service SID
so := ao.FindOrAddSID(windowssecurity.ServiceNameToServiceSID(service.Name))
// ui.Debug().Msgf("Added service account %v for service %v", so.SID().String(), service.Name)
so.SetFlex(
activedirectory.Name, engine.AttributeValueString("Service account for "+service.Name),
)
serviceobject.EdgeTo(so, analyze.EdgeAuthenticatesAs)

// Change service executable via registry
if service.RegistryOwner != "" {
ro, err := windowssecurity.ParseStringSID(service.RegistryOwner)
Expand Down

0 comments on commit 270b8ad

Please sign in to comment.