# Parsing the message field in security event.code 4624

**URL:** <https://discuss.elastic.co/t/parsing-the-message-field-in-security-event-code-4624/338046>\
**Category:** Logstash\
**Created:** [July 11, 2023, 1:37am UTC](https://discuss.elastic.co/t/parsing-the-message-field-in-security-event-code-4624/338046 "2023-07-11T01:37:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cruz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cruz/32/116126_2.png) [@Cruz](https://discuss.elastic.co/u/Cruz)\
**Post date:** [July 11, 2023, 1:37am UTC](https://discuss.elastic.co/t/parsing-the-message-field-in-security-event-code-4624/338046/1 "2023-07-11T01:37:31Z")

</div>

The information that I want is located under the first sub-header "Subject" and "Network Information". My basic question is this, how do I pull this information out of the Message field and display it along with the Time and event ID. From what I can gather the Message field is actually an array of strings so I should be able to pull it by element but I cannot figure out how to do this.

Anyone please?,

```auto
An account was successfully logged on.

Subject:
	Security ID: S-1-5-18
	Account Name: WIN-I9PVBGAGQP2$
	Account Domain: XXXXX
	Logon ID: 0x3E7

Logon Information:
	Logon Type: 7
	Restricted Admin Mode:	-
	Virtual Account: No
	Elevated Token: Yes

Impersonation Level: Impersonation

New Logon:
	Security ID: S-1-5-21-1057966994-2306264790-361777542-500
	Account Name: Administrator
	Account Domain: WIN-I9PVBGAGQP2
	Logon ID: 0xE37361F
	Linked Logon ID: 0x0
	Network Account Name:	-
	Network Account Domain:	-
	Logon GUID: {00000000-0000-0000-0000-000000000000}

Process Information:
	Process ID: 0x250
	Process Name: C:\Windows\System32\svchost.exe

Network Information:
	Workstation Name:	WIN-I9PVBGAGQP2
	Source Network Address:	192.168.111.25
	Source Port: 0

Detailed Authentication Information:
	Logon Process: User32 
	Authentication Package:	Negotiate
	Transited Services:	-
	Package Name (NTLM only):	-
	Key Length: 0

This event is generated when a logon session is created. It is generated on the computer that was accessed.

The subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.

The logon type field indicates the kind of logon that occurred. The most common types are 2 (interactive) and 3 (network).

The New Logon fields indicate the account for whom the new logon was created, i.e. the account that was logged on.

The network fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.

The impersonation level field indicates the extent to which a process in the logon session can impersonate.

The authentication information fields provide detailed information about this specific logon request.
	- Logon GUID is a unique identifier that can be used to correlate this event with a KDC event.
	- Transited services indicate which intermediate services have participated in this logon request.
	- Package name indicates which sub-protocol was used among the NTLM protocols.
	- Key length indicates the length of the generated session key. This will be 0 if no session key was requested.

```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 11, 2023, 2:39am UTC](https://discuss.elastic.co/t/parsing-the-message-field-in-security-event-code-4624/338046/2 "2023-07-11T02:39:26Z")

</div>

[This](https://discuss.elastic.co/t/multiple-match-in-one-grok/246569) post is related to parsing these messages, but it's not the approach I would recommend. [This](https://discuss.elastic.co/t/grok-for-email-log/171750/4) post may be a better way of doing it.

---

<div class="post-metadata">

**Author:** ![Cruz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cruz/32/116126_2.png) [@Cruz](https://discuss.elastic.co/u/Cruz)\
**Post date:** [July 11, 2023, 11:19pm UTC](https://discuss.elastic.co/t/parsing-the-message-field-in-security-event-code-4624/338046/3 "2023-07-11T23:19:14Z")

</div>

I will check on this.  
Thank you @Badger !  
Appreciated!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 8, 2023, 11:19pm UTC](https://discuss.elastic.co/t/parsing-the-message-field-in-security-event-code-4624/338046/4 "2023-08-08T23:19:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
