Replies: 2 comments 2 replies
-
Doing it all in LUA might be better to pre-process and have various if/else cases for the message contents. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Ok, thanks @patrick-stephens . I don't know much about LUA, but I'm going to try to learn, to do the needed parsing with LUA. Thanks! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, after battling with this for days, I didn’t find a way to parse all the fields of a 4769 Windows event ID with one regex.
I ended parsing “in slices”, and even with that, it was impossible to parse/get “Logon GUID” value.
To recapitulate, to try if somebody find a solution, or maybe think that this is a bug:
{"Id":4769,"Version":0,"Qualifiers":null,"Level":0,"Task":14337,"Opcode":0,"Keywords":-9214364837600034816,"RecordId":6606805,"ProviderName":"Microsoft-Windows-Security-Auditing","ProviderId":"54849625-5478-4994-a5ba-3e3b0328c30d","LogName":"Security","ProcessId":692,"ThreadId":6604,"MachineName":"LABDC.LAB.ARG","UserId":null,"TimeCreated":"2023-08-18T10:28:57.8577011-03:00","ActivityId":null,"RelatedActivityId":null,"ContainerLog":"Security","MatchedQueryIds":[],"Bookmark":{"BookmarkXml":"<BookmarkList Direction='backward'>\r\n <Bookmark Channel='Security' RecordId='6606805' IsCurrent='true'/>\r\n</BookmarkList>"},"LevelDisplayName":"Information","OpcodeDisplayName":"Info","TaskDisplayName":"Kerberos Service Ticket Operations","KeywordsDisplayNames":["Audit Success"],"Properties":[{"Value":"[email protected]"},{"Value":"LAB.ARG"},{"Value":"LABDC$"},{"Value":"S-1-5-21-1212037701-3946723201-1981249032-1000"},{"Value":1082195968},{"Value":18},{"Value":"::1"},{"Value":"0"},{"Value":0},{"Value":"db9f553d-8201-c93a-ad04-dacea5af9ac9"},{"Value":"-"}],"Message":"A Kerberos service ticket was requested.\r\n\r\nAccount Information:\r\n\tAccount Name:\t\[email protected]\r\n\tAccount Domain:\t\tLAB.ARG\r\n\tLogon GUID:\t\t{db9f553d-8201-c93a-ad04-dacea5af9ac9}\r\n\r\nService Information:\r\n\tService Name:\t\tLABDC$\r\n\tService ID:\t\tS-1-5-21-1212037701-3946723201-1981249032-1000\r\n\r\nNetwork Information:\r\n\tClient Address:\t\t::1\r\n\tClient Port:\t\t0\r\n\r\nAdditional Information:\r\n\tTicket Options:\t\t0x40810000\r\n\tTicket Encryption Type:\t0x12\r\n\tFailure Code:\t\t0x0\r\n\tTransited Services:\t-\r\n\r\nThis event is generated every time access is requested to a resource such as a computer or a Windows service. The service name indicates the resource to which access was requested.\r\n\r\nThis event can be correlated with Windows logon events by comparing the Logon GUID fields in each event. The logon event occurs on the machine that was accessed, which is often a different machine than the domain controller which issued the service ticket.\r\n\r\nTicket options, encryption types, and failure codes are defined in RFC 4120."}
windows: [1692365339.963130474, {"ContainerLog":"Security","tag":"windows","Opcode":0,"Message":"A Kerberos service ticket was requested.\r\n\r\nAccount Information:\r\n\tAccount Name:\t\[email protected]\r\n\tAccount Domain:\t\tLAB.ARG\r\n\tLogon GUID:\t\t{db9f553d-8201-c93a-ad04-dacea5af9ac9}\r\n\r\nService Information:\r\n\tService Name:\t\tLABDC$\r\n\tService ID:\t\tS-1-5-21-1212037701-3946723201-1981249032-1000\r\n\r\nNetwork Information:\r\n\tClient Address:\t\t::1\r\n\tClient Port:\t\t0\r\n\r\nAdditional Information:\r\n\tTicket Options:\t\t0x40810000\r\n\tTicket Encryption Type:\t0x12\r\n\tFailure Code:\t\t0x0\r\n\tTransited Services:\t-\r\n\r\nThis event is generated every time access is requested to a resource such as a computer or a Windows service. The service name indicates the resource to which access was requested.\r\n\r\nThis event can be correlated with Windows logon events by comparing the Logon GUID fields in each event. The logon event occurs on the machine that was accessed, which is often a different machine than the domain controller which issued the service ticket.\r\n\r\nTicket options, encryption types, and failure codes are defined in RFC 4120.","LevelDisplayName":"Information","Level":0,"Version":0,"TaskDisplayName":"Kerberos Service Ticket Operations","TimeCreated":"2023-08-18T10:28:57.8577011-03:00","Task":14337,"Properties":[{"Value":"[email protected]"},{"Value":"LAB.ARG"},{"Value":"LABDC$"},{"Value":"S-1-5-21-1212037701-3946723201-1981249032-1000"},{"Value":1082195968},{"Value":18},{"Value":"::1"},{"Value":"0"},{"Value":0},{"Value":"db9f553d-8201-c93a-ad04-dacea5af9ac9"},{"Value":"-"}],"Keywords":-9214364837600034816,"MatchedQueryIds":{},"ProviderName":"Microsoft-Windows-Security-Auditing","KeywordsDisplayNames":["Audit Success"],"OpcodeDisplayName":"Info","Id":4769,"Bookmark":{"BookmarkXml":"<BookmarkList Direction='backward'>\r\n <Bookmark Channel='Security' RecordId='6606805' IsCurrent='true'/>\r\n</BookmarkList>"},"RecordId":6606805,"ProcessId":692,"ThreadId":6604,"LogName":"Security","ProviderId":"54849625-5478-4994-a5ba-3e3b0328c30d","MachineName":"LABDC.LAB.ARG"}]
(?<parsed_message>^.*?)\.\\r\\n\\r\\n.*\\r\\n\\tAccount Name:[\\t\\t](https://t//t)(?<Account_Name>.*)\\r\\n\\tAccount Domain:\\t\\t(?<Account_Domain>.*)\\r\\n\\tLogon GUID:\\t\\t{(?<Logon_GUID>.*)}\\r\\n\\r\\n.*Service Name:\\t\\t(?<Service_Name>.*)\\r\\n\\tService ID:\\t\\t(?<Service_ID>.*)\\r\\n\\r\\n.*\\r\\n\\tClient Address:\\t\\t(?<Client_Address>.*)\\r\\n\\tClient Port:\\t\\t(?<Client_Port>.*)\\r\\n\\r\\n.*\\r\\n\\tTicket Options:\\t\\t(?<Ticket_Options>.*)\\r\\n\\tTicket Encryption Type:\\t(?<Ticket_Encryption_Type>.*)\\r\\n\\tFailure Code:\\t\\t(?<Failure_Code>.*)\\r\\n\\t
I tried too with winevtlog from FluentBit as an Input, and it was exactly the same about parsing Message field. StringInserts array field generated by winevtlog input from FluentBit in that case was almost identical to Properties array field generated by Get-Winevent cmdlet of Powershell (the only difference is that StringInserts don’t have field names), and I tried with a similar parser without any luck.
Anybody have any other ideas of how can obtain Logon GUID value from Windows 4769 ID record?
Thanks in advance for your help.
Beta Was this translation helpful? Give feedback.
All reactions