# WELI Splunk (Raw TCP / XML) configuration

This article is meant as a companion to the main [Windows Event Log Ingestion (WELI) article](https://docs.vectra.ai/configuration/coverage/network-identities-weli/windows-event-log-ingestion-weli) and gives configuration advice for using WELI with Splunk using a Raw TCP/XML configuration. This is the preferred Splunk integration method.

## Configuration of Detect

Under Settings > External Connectors > Windows Event Log Ingestion use the following:

* Type: Raw TCP
* Data Format: xml
* Receiving port: 4637 (fixed)
* Server IP/hostname: IP address of the system where the Universal Forwarder is installed
* Source Name: Friendly name of that server

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-372964c5a843cfed7102ad7351caf651df6645ca%2F256c2fa94b6c1bd9ca063017ceda0dac16d24db475278d4ec2736eefb83eec32.png?alt=media)

**NOTE**: List all servers that will be sending data to Detect

### Case 1: Installation and Setup of Universal Forwarder

This is in the scenario when the Universal Forwarder is not already installed in the Domain Controller we would like to collect data from.

*Download latest version of UF:* [*https://www.splunk.com/en\_us/download/universal-forwarder/*](https://www.splunk.com/en_us/download/universal-forwarder/)

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-2380677a9419db42c08bbfcea55117ffd400a994%2F5f92a4a5f6903160a2e8aaa7ce0f7c757b298e65c32a8f2cae88bd2c3a765e45.png?alt=media)

Click on **Customize** **Options** and do as seen in the screenshots below:

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-d630ab6e44c3119b09336fbc0d669996f6eb9b79%2F44dad2b202129f456538bc1a52dade7719f04e99d551b177f7607daff0ee20b1.png?alt=media)

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-8b725b6f456f2e01788d2bc7e5b5bc09e6b0338e%2F959cf51dbff5b631a4018d1fda4926cb7aa2dd104e969b9368de762578694153.png?alt=media)

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-96d705514c92ea1d75e413f58ed9ef1b9362b8a6%2Fecb9b259ecedf295b485db881d40103efac34a07c93ec514975f5ff5db467984.png?alt=media)

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-5339c14a480bcecb62979be9d1d420ed666dbb8b%2F0fefd65c8115971c2918436fd0ed8493a8fb4e648b63c877201ddbb7fa102242.png?alt=media)

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-2ee462ff6bd88f106522f655a72d03b0abdee5a6%2F821b1c74de26a6b6cfc4522091e2f5e81939a914592e8aaa786992418b459463.png?alt=media)

Detect requires only Security related events (This would automatically configure the *inputs* configuration file)

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-5461319051cd653f2a446b0a93e2dd86e0e4347d%2F21ad3ada6cc40de41bd487f319e86d934464dc5be54f328240f90f761d1946cd.png?alt=media)

*Leave the deployment serve configuration empty.*

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-208aa6eaee6bec695dbef5125507b42eb072b407%2Fcfb63822449198768550ed230c7b9c06c74312e34cc705fd3ff7a9b21f79b97d.png?alt=media)

Configure the Hostname or IP address and port of Cognito Detect and proceed per the screenshots below. Change the port from 9997 to **4637**. This is the fixed port used by Detect to received windows events.

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-bd2e0cbbf1ed7286dba9f275f546714bdb73dc8e%2Fd659800281f7cd3f2f94f808bdd7ad9ad2ac762c96c31e02ea18cce4b50ac6ae.png?alt=media)

This would automatically configure the output configuration file to send the data to Detect on port TCP/

5424 (*$SPLUNK\_HOME/etc/apps/system/local/outputs.conf*).

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-590bb29dcbbf3f3011ef339ecd7d00b3d5814723%2Fcbd0611983b6bc22cd4215c76e7a3f20647edfff6a251aa06ffcb565c1fc2f7e.png?alt=media)

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-6078538041bbbb1620e703eb7ae166278ac2fbdf%2F7ca50caf31b55f8f966aa15c93b2c1c8b22e8da1f2a570a60bb4dc2aa4d8459b.png?alt=media)

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-5d8437c574b700b35ad4418d3476058b251a865c%2Fddb0939d79fc1b718426b5818b2e37f631f561608f9093e083814d7184c045f0.png?alt=media)

Now that the installation is done. We have to modify slightly the default configuration. There is 2 options to do it. We recommend to use the first option.

<details>

<summary>**Option 1: Edit UF local inputs.conf**</summary>

Edit the inputs.conf file located in:

C:\Program Files\SplunkUniversalForwarder\etc\apps\SplunkUniversalForwarder\local\\

to include a few more parameters:

```language-markup
[WinEventLog://Security]
host=dc01
index = wineventlog_xml
checkpointInterval = 5
current_only = 0
disabled = 0
start_from = oldest
renderXml=true
```

The "renderXml=true" part above is what needs to be added.

**NOTE: The host and index lines are not required when sending the data to Detect (This is part of defaut config).**

* To only send Event ID 4768 and 4769, add the line:

```language-markup
whitelist1 = EventCode="476[89]"
```

**NOTE**: If you don't whitelist anything, all Security events would be send to Detect where it would be filter and keep only Event ID 4768 and 4769.

</details>

<details>

<summary>**Option 2: Using Windows TA**</summary>

In this case, we are going to use the Windows add-on (Splunk\_TA\_windows) instead of editing the UF system files.

* Install Splunk Add-on for Microsoft windows on your Universal Forwarder (<https://splunkbase.splunk.com/app/742/> )
* Copy $SPLUNK\_HOME/etc/apps/Splunk\_TA\_windows/default/inputs.conf into $SPLUNK\_HOME/etc/apps/Splunk\_TA\_windows/local/inputs.conf and edit the latest file

Change this section below from :

```language-markup
[WinEventLog://Security]
disabled = 1
start_from = oldest
current_only = 0
0checkpointInterval = 5
blacklist1 = EventCode="4662" Message="Object Type:(?!\s*groupPolicyContainer)"
blacklist2 = EventCode="566" Message="Object Type:(?!\s*groupPolicyContainer)"
renderXml=true
```

To:

```language-markup
[WinEventLog://Security]
disabled = -0
evt_resolve_ad_obj = 0
start_from = oldest
current_only = 0
evt_resolve_ad_obj = 1
checkpointInterval = 5
blacklist1 = EventCode="4662" Message="Object Type:(?!\s*groupPolicyContainer)"
blacklist2 = EventCode="566" Message="Object Type:(?!\s*groupPolicyContainer)"
renderXml=true
host=dc01
index = wineventlog_xml
```

**Note: The last 2 lines are not required when sending the data to Detect**

</details>

<details>

<summary>**After Using Either Option 1 or Option 2 Above**</summary>

Create the file $SPLUNK\_HOME/etc/apps/Splunk\_TA\_windows/local/outputs.conf :

```language-markup
tcpout]
defaultGroup = detect

[tcpout:detect]
server = A.B.C.D:4637
sendCookedData = false
```

```
```

* Replace A.B.C.D with the IP address of Detect
* Restart the Universal Forwarder Service

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-44603c1aa23bbf932b9da5579e21eeee142d09ec%2F78e856db53dfb3983681947483cde472fef81312c46a06e07499a29d3ecc4e6f.png?alt=media)

</details>

### Case 2: UF is already installed

In this case, an Universal Forwarder is already installed on your Domain Controller and configured to send data to your Splunk's indexers. We are going to modify the existing configuration to add another destination. The same data would be send to different destinations.

Edit $SPLUNK\_HOME/etc/apps/system/local/outputs.conf (for windows, it should be C\*:\Program Files\SplunkUniversalForwarder\etc\apps\SplunkUniversalForwarder\local\outputs.conf\*) and add a destination (in red below):

```language-markup
[tcpout]
defaultGroup = splunk_indexer, detect

[tcpout:splunk_indexer]
server = A.B.C.D:9997
sendCookedData = false

[tcpout:detect]
server = A.B.C.D:4637
sendCookedData = false
```

* Replace A.B.C.D with the IP address of Detect
* Restart the Universal Forwarder Service

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-44603c1aa23bbf932b9da5579e21eeee142d09ec%2F78e856db53dfb3983681947483cde472fef81312c46a06e07499a29d3ecc4e6f.png?alt=media)

### Validation

From Detect, under **Settings > External Connectors > Windows Event Log Ingestion**:

* If it is receiving data, the green check mark is displayed

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-2d0d8a8a1ef886f17c278773c17e7277a785e023%2F9a13cdf26fa4eb130219285b600ef0aeb9c7c477078ba6c7c38c9af321998258.png?alt=media)

* Otherwise, if there is no incoming data, a red icon is displayed
