Created
October 6, 2020 08:01
-
-
Save 0xffhh/e3d2a607a2eb6140c171b0403b479aec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let allLAPSAdminHashes = DeviceProcessEvents | |
| where FileName =~ "admpwd.ui.exe" | |
| summarize by SHA1 | |
| invoke FileProfile(SHA1, 100) | |
| where IsRootSignerMicrosoft and IsCertificateValid | |
| project SHA1; | |
DeviceEvents | |
| where ActionType == "LdapSearch" | |
| where AdditionalFields has "ms-MCS-AdmPwd" | |
| where InitiatingProcessSHA1 !in (allLAPSAdminHashes) | |
| extend LDAP = parse_json(AdditionalFields) | |
| extend AttributeList = LDAP.AttributeList | |
| extend ScopeOfSearch = LDAP.ScopeOfSearch | |
| extend SearchFilter = LDAP.SearchFilter | |
| extend DistinguishName = LDAP.DistinguishedName | |
//| project Timestamp, DeviceName, InitiatingProcessAccountName, InitiatingProcessFileName, AttributeList, ScopeOfSearch, SearchFilter, DistinguishName, DeviceId, ReportId | |
| sort by Timestamp desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment