Author: Andrew Rathbun
Description: A user right was removed
EventId: 4705
Channel: Security
Provider: Microsoft-Windows-Security-Auditing
Maps:
  -
    Property: UserName
    PropertyValue: "%domain%\\%user% (%sid%)"
    Values:
      -
        Name: domain
        Value: "/Event/EventData/Data[@Name=\"SubjectDomainName\"]"
      -
        Name: user
        Value: "/Event/EventData/Data[@Name=\"SubjectUserName\"]"
      -
        Name: sid
        Value: "/Event/EventData/Data[@Name=\"SubjectUserSid\"]"
  -
    Property: PayloadData1
    PropertyValue: "TargetSid: %sid%"
    Values:
      -
        Name: sid
        Value: "/Event/EventData/Data[@Name=\"TargetSid\"]"
  -
    Property: PayloadData2
    PropertyValue: "PrivilegeList: %PrivilegeList%"
    Values:
      -
        Name: PrivilegeList
        Value: "/Event/EventData/Data[@Name=\"PrivilegeList\"]"

# Documentation:
# https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=4705
# https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4705
# https://github.com/nasbench/EVTX-ETW-Resources/blob/main/ETWProvidersCSVs/Internal/Microsoft-Windows-Security-Auditing.csv
#
# Example Event Data:
#  <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
#  <System>
#  <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-A5BA-3E3B0328C30D}" />
#  <EventID>4705</EventID>
#  <Version>0</Version>
#  <Level>0</Level>
#  <Task>13570</Task>
#  <Opcode>0</Opcode>
#  <Keywords>0x8020000000000000</Keywords>
#  <TimeCreated SystemTime="2015-10-02T22:08:07.152488600Z" />
#  <EventRecordID>1049867</EventRecordID>
#  <Correlation />
#  <Execution ProcessID="500" ThreadID="1216" />
#  <Channel>Security</Channel>
#  <Computer>DC01.contoso.local</Computer>
#  <Security />
#  </System>
#  <EventData>
#  <Data Name="SubjectUserSid">S-1-5-18</Data>
#  <Data Name="SubjectUserName">DC01$</Data>
#  <Data Name="SubjectDomainName">CONTOSO</Data>
#  <Data Name="SubjectLogonId">0x3e7</Data>
#  <Data Name="TargetSid">S-1-5-21-3457937927-2839227994-823803824-1104</Data>
#  <Data Name="PrivilegeList">SeTimeZonePrivilege</Data>
#  </EventData>
#  </Event>
