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!

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...

Splunk AppDynamics Agents Webinar Series

Mark your calendars! On June 24th at 12PM PST, we’re going live with the second session of our Splunk ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2025 SplunkTrust is officially open! If you ...