Windows event log ยท Security4706 A new trust was created to a domain

  • Security
  • 7 fields
  • Security.evtx
  • Microsoft-Windows-Security-Auditing

Fields EvtxECmd extracts

7 columns in the EvtxECmd CSV

  • UserName%domain%\%user% (%sid%)
    • %domain% = /Event/EventData/Data[@Name="SubjectDomainName"]
    • %user% = /Event/EventData/Data[@Name="SubjectUserName"]
    • %sid% = /Event/EventData/Data[@Name="SubjectUserSid"]
  • PayloadData1DomainName: %DomainName% (%DomainSid%)
    • %DomainSid% = /Event/EventData/Data[@Name="DomainSid"]
    • %DomainName% = /Event/EventData/Data[@Name="DomainName"]
  • PayloadData2SidFilteringEnabled: %SidFilteringEnabled%
    • %SidFilteringEnabled% = /Event/EventData/Data[@Name="SidFilteringEnabled"]
  • PayloadData3LogonId: %SubjectLogonId%
    • %SubjectLogonId% = /Event/EventData/Data[@Name="SubjectLogonId"]
  • PayloadData4TdoType: %TdoType%
    • %TdoType% = /Event/EventData/Data[@Name="TdoType"]
  • PayloadData5TdoDirection: %TdoDirection%
    • %TdoDirection% = /Event/EventData/Data[@Name="TdoDirection"]
  • PayloadData6TdoAttributes: %TdoAttributes%
    • %TdoAttributes% = /Event/EventData/Data[@Name="TdoAttributes"]

Value lookups

Codes that EvtxECmd turns into text

TdoType

1
TRUST_TYPE_DOWNLEVEL
2
TRUST_TYPE_UPLEVEL
3
TRUST_TYPE_MIT
4
TRUST_TYPE_DCE

TdoDirection

1
TRUST_DIRECTION_INBOUND
2
TRUST_DIRECTION_OUTBOUND
3
TRUST_DIRECTION_BIDIRECTIONAL
O
TRUST_DIRECTION_DISABLED

TdoAttributes

0x1
TRUST_ATTRIBUTE_NON_TRANSITIVE
0x2
TRUST_ATTRIBUTE_UPLEVEL_ONLY
0x4
TRUST_ATTRIBUTE_QUARANTINED_DOMAIN
0x8
TRUST_ATTRIBUTE_FOREST_TRANSITIVE
0x10
TRUST_ATTRIBUTE_CROSS_ORGANIZATION
0x20
TRUST_ATTRIBUTE_WITHIN_FOREST
0x40
TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL
0x80
TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION
0x200
TRUST_ATTRIBUTE_CROSS_ORGANIZATION_NO_TGT_DELEGATION
0x400
TRUST_ATTRIBUTE_PIM_TRUST

Sample event

Event XML from the map file

<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>4706</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>13569</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8020000000000000</Keywords>
    <TimeCreated SystemTime="2015-10-01T20:41:13.189445500Z"/>
    <EventRecordID>1049759</EventRecordID>
    <Correlation/>
    <Execution ProcessID="500" ThreadID="4900"/>
    <Channel>Security</Channel>
    <Computer>DC01.contoso.local</Computer>
    <Security/>
  </System>
  <EventData>
    <Data Name="DomainName">corp.contoso.local</Data>
    <Data Name="DomainSid">S-1-5-21-2226861337-2836268956-2433141405</Data>
    <Data Name="SubjectUserSid">S-1-5-21-3457937927-2839227994-823803824-1104</Data>
    <Data Name="SubjectUserName">dadmin</Data>
    <Data Name="SubjectDomainName">CONTOSO</Data>
    <Data Name="SubjectLogonId">0x3e99d6</Data>
    <Data Name="TdoType">2</Data>
    <Data Name="TdoDirection">3</Data>
    <Data Name="TdoAttributes">32</Data>
    <Data Name="SidFilteringEnabled">%%1796</Data>
  </EventData>
</Event>

References

3 links

Source: evtx/Maps/Security_Microsoft-Windows-Security-Auditing_4706.map(opens in new tab) by Andrew Rathbun and contributors(opens in new tab), MIT License(opens in new tab)