Try in Splunk Security Cloud


Malicious actors often abuse misconfigured LDAP servers or applications that use the LDAP servers in organizations. Outbound LDAP traffic should not be allowed outbound through your perimeter firewall. This search will help determine if you have any LDAP connections to IP addresses outside of private (RFC1918) address space.

  • Type: Anomaly
  • Product: Splunk Behavioral Analytics
  • Datamodel: Endpoint_Processes
  • Last Updated: 2022-02-17
  • Author: Jose Hernandez, Michael Haag, Splunk
  • ID: 4d16a90c-d1a9-4d17-8156-d0db0c73c449


ID Technique Tactic
T1059 Command and Scripting Interpreter Execution
| from read_ssa_enriched_events() 
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), dest_port=map_get(input_event, "dest_port"), event_id=ucast(map_get(input_event, "event_id"), "string", null), dest_ip=ucast(map_get(input_event, "dest_device_ips"), "collection<string>", [])[0] 
| where dest_port=389 OR dest_port=1389 OR dest_port=636 
| where NOT (cidrmatch(ip: dest_ip, cidr_range: "") OR cidrmatch(ip: dest_ip, cidr_range: "") OR cidrmatch(ip: dest_ip, cidr_range: "")) 
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(ucast(map_get(input_event, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body=create_map(["event_id", event_id, "dest_port", dest_port, "dest_ip", dest_ip]) 
| into write_ssa_detected_events();


The SPL above uses the following Macros:

Note that tcp_command_and_scripting_interpreter_outbound_ldap_traffic_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required field

  • _time
  • dest_device_id
  • process_name
  • parent_process_name
  • process_path
  • dest_user_id
  • process
  • cmd_line

How To Implement

To successfully implement this search you need to be ingesting information on network traffic, specifically data that populates the Network_Traffic datamodel. To develop this analytic we used specifically Zeek/Bro conn.log and PAN Traffic events.

Known False Positives

Unknown at this moment. Outbound LDAP traffic should not be allowed outbound through your perimeter firewall. Please check those servers to verify if the activity is legitimate.

Associated Analytic story

Kill Chain Phase

  • Execution


Risk Score Impact Confidence Message
35.0 50 70 An outbound LDAP connection from $src_ip$ in your infrastructure connecting to dest ip $dest_ip$

Note that risk score is calculated base on the following formula: (Impact * Confidence)/100


Test Dataset

Replay any dataset to Splunk Enterprise by using our tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range

source | version: 1