Last active
March 3, 2020 07:38
-
-
Save fraabye/4f217679e18b9b75aa595666bf150db3 to your computer and use it in GitHub Desktop.
Get Potential Lolbins with PS
This file contains hidden or 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
| # Gets all Microsoft-signed .exe files below c:\windows | |
| Get-ChildItem C:\windows\ -File -recurse -Force -ErrorVariable FailedItems -ErrorAction SilentlyContinue|Where {$_.extension -eq ".exe" -And {$app = (Get-AuthenticodeSignature $_.FullName); if (![string]::IsNullOrEmpty($app.SignerCertificate.Subject)) {$app.SignerCertificate.Subject.Contains("Microsoft")}}}|Select -Expand Fullname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment