Windows event log · Microsoft-Windows-TerminalServices-Gateway/Operational302 Remote Desktop Services: User connected to resource

  • Remote access
  • 6 fields
  • Microsoft-Windows-TerminalServices-Gateway%4Operational.evtx
  • Microsoft-Windows-TerminalServices-Gateway

Fields EvtxECmd extracts

6 columns in the EvtxECmd CSV

  • UserName%Username%
    • %Username% = /Event/UserData/EventInfo/Username
  • RemoteHost%IpAddress%
    • %IpAddress% = /Event/UserData/EventInfo/IpAddress
  • PayloadData1%Username% on client computer %IpAddress% connected to %Resource%
    • %Username% = /Event/UserData/EventInfo/Username
    • %IpAddress% = /Event/UserData/EventInfo/IpAddress
    • %Resource% = /Event/UserData/EventInfo/Resource
  • PayloadData4ErrorCode: %ErrorCode%
    • %ErrorCode% = /Event/UserData/EventInfo/ErrorCode
  • PayloadData5ConnectionProtocol: %ConnectionProtocol%
    • %ConnectionProtocol% = /Event/UserData/EventInfo/ConnectionProtocol
  • PayloadData6AuthType: %AuthType%
    • %AuthType% = /Event/UserData/EventInfo/AuthType

Sample event

Event XML from the map file

<Event>
  <System>
    <Provider Name="Microsoft-Windows-TerminalServices-Gateway" Guid="4d5ae6a1-c7c8-4e6d-b840-4d8080b42e1b"/>
    <EventID>302</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>5</Task>
    <Opcode>30</Opcode>
    <Keywords>0x4020000001000000</Keywords>
    <TimeCreated SystemTime="2021-05-16 20:13:17.4272057"/>
    <EventRecordID>1251305</EventRecordID>
    <Correlation ActivityID="3fb80caa-2356-43c8-9991-b852526f2500"/>
    <Execution ProcessID="2040" ThreadID="1888"/>
    <Channel>Microsoft-Windows-TerminalServices-Gateway/Operational</Channel>
    <Computer>HOSTNAME.domain.com</Computer>
    <Security UserID="S-1-5-20"/>
  </System>
  <UserData>
    <EventInfo>
      <Username>DOMAIN\username</Username>
      <IpAddress>172.16.2.13</IpAddress>
      <AuthType></AuthType>
      <Resource>HOSTNAME.domain.com</Resource>
      <ConnectionProtocol>UDP</ConnectionProtocol>
      <ErrorCode>0</ErrorCode>
    </EventInfo>
  </UserData>
</Event>

References

4 links

Source: evtx/Maps/Microsoft-Windows-TerminalServices-Gateway-Operational_Microsoft-Windows-TerminalServices-Gateway_302.map(opens in new tab) by Andrew Rathbun and Matt Arbaugh and contributors(opens in new tab), MIT License(opens in new tab)