IT administrators and remote workers commonly use Remote Desktop Protocol (RDP) to access systems over a network. However, this protocol can be a prime target for brute-force attacks, where attackers attempt to gain unauthorized access by systematically guessing passwords. Detecting these attacks is crucial to safeguard network integrity and prevent potential data breaches.
By leveraging Splunk's search queries and real-time alerting, security teams can identify suspicious login patterns indicative of RDP brute-force attacks, such as multiple failed login attempts. This guide outlines using Splunk to detect and respond to potential RDP brute-force incidents effectively.
index="rdp_bruteforce" sourcetype="bro:rdp:json"
| bin _time span=5m
| stats count values(cookie) by _time, id.orig_h, id.resp_h
| where count>30
To construct a query for detecting SSH brute-force attacks in Splunk, following the structure of your provided RDP brute-force query, here’s what the Splunk query would look like:
index="ssh_bruteforce" sourcetype="bro:ssh:json"
| bin _time span=5m
| stats count values(client) values(server) by _time, id.orig_h, id.resp_h
| where count > 30
| table _time, id.orig_h, id.resp_h, values(client), values(server), count
index="ssh_bruteforce" and sourcetype="bro:ssh:json" specify the data source related to SSH traffic.bin _time span=5m buckets the events into 5-minute intervals.stats count values(client) values(server) by _time, id.orig_h, id.resp_h groups the events by time, source IP (id.orig_h), destination IP (id.resp_h), and collects unique client and server values.where count > 30 filters for instances where more than 30 authentication attempts occurred in the 5-minute window.table _time, id.orig_h, id.resp_h, values(client), values(server), count formats the output to display relevant fields.After running this query in Splunk, the resulting table will display any client IPs (id.orig_h) associated with SSH brute-force attempts. The IP address shown in the id.orig_h column where the count is greater than 30 is the client IP responsible for the brute-force attack.