Detection: HTTP Suspicious Tool User Agent

Description

This Splunk query analyzes web access logs to identify and categorize non-browser user agents, detecting various types of security tools, scripting languages, automation frameworks, and suspicious patterns. This activity can signify malicious actors attempting to interact with web endpoints in non-standard ways.

 1`nginx_access_logs` 
 2| eval http_user_agent = lower(http_user_agent) 
 3| `security_content_ctime(firstTime)` 
 4| `security_content_ctime(lastTime)` 
 5| `drop_dm_object_name(Web)` 
 6| lookup scripting_tools_user_agents tool_user_agent AS http_user_agent OUTPUT tool 
 7| where isnotnull(tool) 
 8| rename dest_ip as dest 
 9| stats count min(firstTime) as first_seen max(lastTime) as last_seen values(tool) as tool by http_user_agent dest src_ip status 
10| `http_suspicious_tool_user_agent_filter`

Data Source

Name Platform Sourcetype Source
Nginx Access N/A 'nginx:plus:kv' '/var/log/nginx/access.log'

Macros Used

Name Value
nginx_access_logs (sourcetype="nginx:plus:kv" OR sourcetype="nginx:plus:access")
http_suspicious_tool_user_agent_filter search *
http_suspicious_tool_user_agent_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Risk Event True
This configuration file applies to all detections of type anomaly. These detections will use Risk Based Alerting.

Implementation

This analytic necessitates the collection of web data, which can be achieved through Splunk Stream or by utilizing the Splunk Add-on for Apache Web Server. No additional configuration is required for this analytic.

Known False Positives

False positives may be present if the activity is part of diagnostics or testing. Filter as needed.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message:

Known scripting tool was used against a web request. The source IP is $src_ip$ and the destination is $dest$.

Risk Object Risk Object Type Risk Score Threat Objects
dest system 31 src_ip

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset nginx:plus:kv nginx:plus:kv
Integration ✅ Passing Dataset nginx:plus:kv nginx:plus:kv

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


Source: GitHub | Version: 1