Getting Data In

Blacklist - 2 fields on same event

icewolf69
Loves-to-Learn Everything

Hi all, I'm trying to create a blacklist for an event after checking 2 different fields on different lines.

I can get them filtered individually, but without an "AND" operator, like OR has "|", I'm struggling.  

 

Sample Event

 

 

An account was successfully logged on.

Subject:
	Security ID:		NULL SID
	Account Name:		-
	Account Domain:		-
	Logon ID:		0x0

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

Impersonation Level:		Impersonation

New Logon:
	Security ID:		SYSTEM
	Account Name:		COMPUTER$
	Account Domain:		XXXX.NET
	Logon ID:		0x6C6C65F09
	Linked Logon ID:		0x0
	Network Account Name:	-
	Network Account Domain:	-
	Logon GUID:		{970e0bf8-ccc7-18fd-7be9-d5efe2ab8b22}

Process Information:
	Process ID:		0x0
	Process Name:		-

Network Information:
	Workstation Name:	-
	Source Network Address:	-
	Source Port:		-

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

 

 

 

So what I'm trying to do is filter on Logon Type=3 AND Account Name: xxx$

 

I have tried stuff that works on regex101, etc.  And it will work there, but Splunk doesn't seem to recognize it.

 

 

(?=.*?(Logon\sType:[\s]*3))(?=.*?(Account\sName:[\s]*.*\$))

 

 

Any help is appreciated

 

Labels (2)
0 Karma

icewolf69
Loves-to-Learn Everything

Took me a while but figured it out, incase someone shows up here in the future!

source="WinEventLog:Security" EventCode=4624 | regex Message="(?ms)Logon\sType:[\s]*(3).*Account\sName:[\s]*(.*\$)"

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...