Collect Snort logs
This document explains how to collect Snort logs to Google Security Operations by using Bindplane. The parser attempts to handle two different Snort log formats (SYSLOG + JSON) using grok 
patterns to extract relevant fields. Depending on the identified format, it further processes the data, mapping extracted fields to the unified data model (UDM) schema, normalizing values, and enriching the output with additional context.
Before you begin
- Ensure that you have a Google Security Operations instance.
- Ensure that you are using Windows 2016 or later, or a Linux host with systemd.
- If running behind a proxy, ensure firewall ports are open.
- Ensure that you have privileged access to Snort.
Get Google SecOps ingestion authentication file
- Sign in to the Google SecOps console.
- Go to SIEM Settings > Collection Agents.
- Download the Ingestion Authentication File. Save the file securely on the system where Bindplane will be installed.
Get Google SecOps customer ID
- Sign in to the Google SecOps console.
- Go to SIEM Settings > Profile.
- Copy and save the Customer IDfrom the Organization Detailssection.
Install the Bindplane agent
Windows installation
- Open the Command Promptor PowerShellas an administrator.
-  Run the following command: msiexec / i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" / quiet
Linux installation
- Open a terminal with root or sudo privileges.
-  Run the following command: sudo sh -c " $( curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh ) " install_unix.sh
Additional installation resources
- For additional installation options, consult this installation guide .
Configure the Bindplane agent to ingest Syslog and send to Google SecOps
-  Access the configuration file: - Locate the config.yamlfile. Typically, it's in the/etc/bindplane-agent/directory on Linux or in the installation directory on Windows.
- Open the file using a text editor (for example, nano,vi, or Notepad).
 
- Locate the 
-  Edit the config.yamlfile as follows:receivers : udplog : # Replace the port and IP address as required listen_address : "0.0.0.0:514" exporters : chronicle/chronicle_w_labels : compression : gzip # Adjust the path to the credentials file you downloaded in Step 1 creds : '/path/to/ingestion-authentication-file.json' # Replace with your actual customer ID from Step 2 customer_id : < customer_id > endpoint : malachiteingestion-pa.googleapis.com # Add optional ingestion labels for better organization ingestion_labels : log_type : SNORT_IDS raw_log_field : body service : pipelines : logs/source0__chronicle_w_labels-0 : receivers : - udplog exporters : - chronicle/chronicle_w_labels
-  Replace the port and IP address as required in your infrastructure. 
-  Replace <customer_id>with the actual customer ID.
-  Update /path/to/ingestion-authentication-file.jsonto the path where the authentication file was saved in the Get Google SecOps ingestion authentication file section.
Restart the Bindplane agent to apply the changes
-  To restart the Bindplane agent in Linux, run the following command: sudo systemctl restart bindplane-agent
-  To restart the Bindplane agent in Windows, you can either use the Servicesconsole or enter the following command: net stop BindPlaneAgent && net start BindPlaneAgent
Configure syslog export on Snort v2.x
- Sign in to the Snort device using terminal.
- Edit the following file: /etc/snort/snort.conf
- Go to 6) Configure output plugins.
-  Add following entry: # syslog output alert_syslog: host= BINDPLANE_IP_ADDRESS : PORT_NUMBER , LOG_AUTH LOG_ALERT
-  Replace the following: - BINDPLANE_IP_ADDRESS : Bindplane Agent IP address.
- PORT_NUMBER : Bindplane Agent port number.
 
-  Save the file. 
-  Start the snortservice. 
-  Stop the rsyslogservice. 
-  Edit the following file: /etc/rsyslogd.conf# remote host is: name/ip:port *.* @@ BINDPLANE_IP_ADDRESS : PORT_NUMBER
-  Replace the following: - BINDPLANE_IP_ADDRESS : Bindplane Agent IP address.
- PORT_NUMBER : Bindplane Agent port number.
 
-  Start the rsyslogservice. 
Configure syslog export on Snort v3.1.53
- Sign in to the Snort device using terminal.
- Stop the rsyslogand snortservices.
- Go to the following Snort installation directory: /usr/local/etc/snort/
-  Edit the following Snort configuration file: snort.lua
-  In the Configure outputsoptions, append the following code (you can use any facility and level): alert_syslog = { facility = 'local3', level = 'info', }
-  Save the Snort configuration file. 
-  Go to the rsyslogservice default configuration files directory: /etc/rsyslog.d
-  Create a new file: 3-snort.conf:# cd /etc/rsyslog.d # vi 3-snort.conf
-  To send logs over TCP or UDP, add the following configuration: local3.* @@ BINDPLANE_IP_ADDRESS : PORT_NUMBER
-  Replace the following: - BINDPLANE_IP_ADDRESS : Bindplane agent IP address.
- PORT_NUMBER : Bindplane agent port number.
 
-  Save the file. 
-  Start rsyslogand then the snortservice. 
UDM Mapping Table
| Log Field | UDM Mapping | Logic | 
|---|---|---|
|   
agent.hostname | observer.hostname | Value taken from agent.hostnamefield in the raw log. | 
|   
agent.id | observer.asset_id | Value taken from agent.idfield in the raw log and concatenated withagent.typeas follows:agent.type:agent.id. | 
|   
agent.type | observer.application | Value taken from agent.typefield in the raw log. | 
|   
agent.version | observer.platform_version | Value taken from agent.versionfield in the raw log. | 
|   
alert.category | security_result.category_details | Value taken from alert.categoryfield in the raw log. | 
|   
alert.rev | security_result.rule_version | Value taken from alert.revfield in the raw log. | 
|   
alert.rule | security_result.summary | Value taken from alert.rulefield in the raw log, with double quotes removed. | 
|   
alert.severity | security_result.severity | If alert.severityis greater than or equal to 4, set toLOW. Ifalert.severityis 2 or 3, set toMEDIUM. Ifalert.severityis 1, set toHIGH. Otherwise, set toUNKNOWN_SEVERITY. | 
|   
alert.signature | security_result.rule_name | Value taken from alert.signaturefield in the raw log. | 
|   
alert.signature_id | security_result.rule_id | Value taken from alert.signature_idfield in the raw log. | 
|   
app_proto | network.application_protocol | If app_protoisdns,smb, orhttp, convert to uppercase and use that value. Otherwise, set toUNKNOWN_APPLICATION_PROTOCOL. | 
|   
category | security_result.category | If categoryistrojan-activity, set toNETWORK_MALICIOUS. Ifcategoryispolicy-violation, set toPOLICY_VIOLATION. Otherwise, set toUNKNOWN_CATEGORY. | 
|   
classtype | security_result.rule_type | Value taken from classtypefield in the raw log, if it's not empty orunknown. | 
|   
community_id | network.community_id | Value taken from community_idfield in the raw log. | 
|   
date_log | Used to set the event timestamp if timefield is empty. | |
|   
desc | metadata.description | Value taken from descfield in the raw log. | 
|   
dest_ip | target.ip | Value taken from dest_ipfield in the raw log. | 
|   
dest_port | target.port | Value taken from dest_portfield in the raw log and converted to integer. | 
|   
dstport | target.port | Value taken from dstportfield in the raw log and converted to integer. | 
|   
file.filename | security_result.about.file.full_path | Value taken from file.filenamefield in the raw log, if it's not empty or/. | 
|   
file.size | security_result.about.file.size | Value taken from file.sizefield in the raw log and converted to unsigned integer. | 
|   
host.name | principal.hostname | Value taken from host.namefield in the raw log. | 
|   
hostname | principal.hostname | Value taken from hostnamefield in the raw log. | 
|   
inter_host | intermediary.hostname | Value taken from inter_hostfield in the raw log. | 
|   
log.file.path | principal.process.file.full_path | Value taken from log.file.pathfield in the raw log. | 
|   
metadata.version | metadata.product_version | Value taken from metadata.versionfield in the raw log. | 
|   
proto | network.ip_protocol | Value taken from protofield in the raw log. If it's a number, it's converted to the corresponding IP protocol name using a lookup table. | 
|   
rule_name | security_result.rule_name | Value taken from rule_namefield in the raw log. | 
|   
signature_id | security_result.rule_id | Value taken from signature_idfield in the raw log. | 
|   
signature_rev | security_result.rule_version | Value taken from signature_revfield in the raw log. | 
|   
src_ip | principal.ip | Value taken from src_ipfield in the raw log. | 
|   
src_port | principal.port | Value taken from src_portfield in the raw log and converted to integer. | 
|   
srcport | principal.port | Value taken from srcportfield in the raw log and converted to integer. | 
|   
time | Used to set the event timestamp. | |
|  | metadata.event_type | Always set to SCAN_NETWORK. | 
|  | metadata.log_type | Hardcoded to SNORT_IDS. | 
|  | metadata.product_name | Hardcoded to SNORT_IDS. | 
|  | metadata.vendor_name | Hardcoded to SNORT. | 
|  | security_result.action | Set to ALLOWifalert.actionisallowed, otherwise set toUNKNOWN_ACTION. | 
Need more help? Get answers from Community members and Google SecOps professionals.

