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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...