Getting Data In

How to filter users ending with $ using inputs.conf on a UF v6.6.

gerald_contrera
Path Finder

Hi and thankyou in advance,

I need to be able to filter EventCode 4624 to NOT includes events with "Account Name" ending in $ (the machine name).
OR
Possibly with the Security ID: NULL SID
However i would prefer with "Account Name" ending in $

In our environment we use WEF for all workstations which forward to a WEF server which then has a splunk UF to forward to the indexer peers.

I was under the impression this could be done on the UF if version was 6 or newer (i have v6.6.1)
using the inputs.conf?

I have tried things along the lines of
whitelist = EventCode=%^(4624)$% Message="(?:Account Name:).+[?!\$]"

but this ends up dropping all events.

I have tried with just the following to check whitelisting does get logs in
whitelist = EventCode=%^(4624)$%
and this works so i know there is nothing wrong with that part.

Sample Event with EventCode 4624 so you can see what im trying to get

An account was successfully logged on.

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

Logon Type: 3

New Logon:
Security ID: SYSTEM
Account Name: P62134$
Account Domain: MYDOMAINNET
Logon ID: 0x8f36f8ce
Logon GUID: {c0780e74-3280-88b1-93aa-e67047cc3842}

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

Network Information:
Workstation Name:

Source Network Address: 127.0.0.1
Source Port: 0

Detailed Authentication Information:
Logon Process: Kerberos
Authentication Package: Kerberos
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 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.

Thanks im at a loss.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi
at first, equal (=) is a special char for regexes so you have to escape them

whitelist = EventCode\=%^(4624)$% Message\="(?:Account Name:).+[?!\$]"

to avoid that your whitelist is empty

In addition I'm not sure about your regex but maybe I'm wrongly reading it: please use Code Sample (the button with numbers) to corretly display regexes.

Anyway, you could tale all events with whitelist

whitelist = EventCode\=4624

then extract Account_Name using the following regex

| rex "(?ms)New Logon:.*Account Name:\s+(?<Account_Name>[^ ]*)"

(test it at https://regex101.com/r/x14L9N/1)
and then filter the ones with $ at the end.

| search Account_Name!=*$

Bye.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...