Ad slot: top

SPL

Repeated Unsuccessful Logon Attempts in Linux

Description

Submitted by SplunkNinja

The following Splunk search query will return results for failed login attempts in a Linux environment for a specified time range. The regular expressions are defined within the search string, however if you already extracted the necessary fields you can ignore the regex section.  
2 1
sourcetype=linux_secure | eval Date=strftime(_time, "%Y/%m/%d") | rex ".*:\d{2}\s(?<hostname>\S+)" | rex "gdm\S+\sauthentication\s(?<status>\w+)" | rex "\suser[^'](?<User>\S+\w+)" | search status=failure| stats count as fails by Date, User, hostname | eval "Alert Level"=case(fails>=50, "Critical", fails<50 AND fails>=20, "Warning", fails<20, "Normal") | sort - fails| rename fails as "Failed Logon Attempts" | rename User as "Account in Question"

Comments

1 total

SP
splunk query for failed linux logins - bankschools.com
7/9/2022

[&#8230;] Repeated Unsuccessful Logon Attempts in Linux &#8211; GoSplunk [&#8230;]

Leave a comment

You must log in to post a comment.

Ad slot: bottom