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!

New This Month in Splunk Observability Cloud - Metrics Usage Analytics, Enhanced K8s ...

The latest enhancements across the Splunk Observability portfolio deliver greater flexibility, better data and ...

Alerting Best Practices: How to Create Good Detectors

At their best, detectors and the alerts they trigger notify teams when applications aren’t performing as ...

Discover Powerful New Features in Splunk Cloud Platform: Enhanced Analytics, ...

Hey Splunky people! We are excited to share the latest updates in Splunk Cloud Platform 9.3.2408. In this ...