Author: Andrew Rathbun
Description: A Kerberos service ticket was renewed
EventId: 4770
Channel: Security
Provider: Microsoft-Windows-Security-Auditing
Maps:
  -
    Property: RemoteHost
    PropertyValue: "%ipAddress%:%port%"
    Values:
      -
        Name: ipAddress
        Value: "/Event/EventData/Data[@Name=\"IpAddress\"]"
      -
        Name: port
        Value: "/Event/EventData/Data[@Name=\"IpPort\"]"
  -
    Property: PayloadData1
    PropertyValue: "Target: %TargetUserName%"
    Values:
      -
        Name: TargetUserName
        Value: "/Event/EventData/Data[@Name=\"TargetUserName\"]"
  -
    Property: PayloadData2
    PropertyValue: "ServiceName: %ServiceName%"
    Values:
      -
        Name: ServiceName
        Value: "/Event/EventData/Data[@Name=\"ServiceName\"]"
  -
    Property: PayloadData3
    PropertyValue: "ServiceSid: %ServiceSid%"
    Values:
      -
        Name: ServiceSid
        Value: "/Event/EventData/Data[@Name=\"ServiceSid\"]"
  -
    Property: PayloadData4
    PropertyValue: "TicketEncryptionType: %TicketEncryptionType%"
    Values:
      -
        Name: TicketEncryptionType
        Value: "/Event/EventData/Data[@Name=\"TicketEncryptionType\"]"

Lookups:
  -
    Name: TicketEncryptionType
    Default: Unknown code
    Values:
      0x1: DES-CBC-CRC
      0x3: DES-CBC-MD5
      0x11: AES128-CTS-HMAC-SHA1-96
      0x12: AES256-CTS-HMAC-SHA1-96
      0x17: RC4-HMAC
      0x18: RC4-HMAC-EXP
      0xFFFFFFFF: Audit Failure
      0xffffffff: Audit Failure

# Documentation:
# https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=4770
# https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4770
# 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>4770</EventID>
# <Version>0</Version>
# <Level>0</Level>
# <Task>14337</Task>
# <Opcode>0</Opcode>
# <Keywords>0x8020000000000000</Keywords>
# <TimeCreated SystemTime="2015-08-07T03:26:23.466552900Z" />
# <EventRecordID>166481</EventRecordID>
# <Correlation />
# <Execution ProcessID="520" ThreadID="1084" />
# <Channel>Security</Channel>
# <Computer>DC01.contoso.local</Computer>
# <Security />
# </System>
# <EventData>
# <Data Name="TargetUserName">WIN2008R2$@CONTOSO.LOCAL</Data>
# <Data Name="TargetDomainName">CONTOSO.LOCAL</Data>
# <Data Name="ServiceName">krbtgt</Data>
# <Data Name="ServiceSid">S-1-5-21-3457937927-2839227994-823803824-502</Data>
# <Data Name="TicketOptions">0x2</Data>
# <Data Name="TicketEncryptionType">0x12</Data>
# <Data Name="IpAddress">::ffff:10.0.0.12</Data>
# <Data Name="IpPort">49964</Data>
# </EventData>
# </Event>
