Splunk Enterprise Security

Splunk Enterprise Security: Is there a search to detect old password in use?

sahiltcs
Path Finder

Detect active accounts with passwords that haven't been updated in more than 120 days.
Is there a search where we can detect old password in use?

0 Karma

jkat54
SplunkTrust
SplunkTrust

As Rich mentioned, you should enforce your policy via active directory. Once enforced, there shouldnt be any people with old passwords who arent also locked out.

TO find out if they exist you could use powershell to find them, and run the powershell as a scripted input into splunk:

PwdLastSet is the AD attribute you need to look for and it's encoded a bit.

    $objDomain = New-Object System.DirectoryServices.DirectoryEntry

    $objSearcher = New-Object System.DirectoryServices.DirectorySearcher
    $objSearcher.SearchRoot = $objDomain
    $objSearcher.PageSize = 1000

    $objSearcher.Filter = "(objectClass=User)"

    $colProplist = @("name","pwdLastSet")
    foreach ($i in $colPropList){$objSearcher.PropertiesToLoad.Add($i) | out-null}

    $colResults = $objSearcher.FindAll()

    foreach ($objResult in $colResults){
    write-host "Name: " $objResult.Properties.name
    write-host "PwdLastSet: " ConvertTo-Date($objResult.Properties.pwdLastSet)
    }

Youll need this function too:

Function ConvertTo-Date {
    Param (
        [Parameter(ValueFromPipeline=$true,mandatory=$true)]$accountExpires
    )

process {
    $lngValue = $accountExpires
    if(($lngValue -eq 0) -or ($lngValue -gt [DateTime]::MaxValue.Ticks)) {
        $AcctExpires = "<Never>"
    } else {
        $Date = [DateTime]$lngValue
        $AcctExpires = $Date.AddYears(1600).ToLocalTime()
    }
    $AcctExpires 
}
}

richgalloway
SplunkTrust
SplunkTrust

Do you you have a place where you keep track of when passwords were last changed? Or perhaps you record the password change event itself. If so, then you can detect an old password in use.

---
If this reply helps you, Karma would be appreciated.
0 Karma

sahiltcs
Path Finder

Yes we have AD logs and Windows security logs and record the password change event, But i am looking for the query which will tell us the Password last set , When password created and which user

Can you help me with the Query

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Why do this when Windows will detect old passwords and prevent their use?

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Best Strategies to Optimize Observability Costs

 Join us on Tuesday, May 6, 2025, at 11 AM PDT / 2 PM EDT for an insightful session on optimizing ...

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...