Forked from mattifestation/PowerShellHostFinder.ps1
Created
January 22, 2019 18:40
-
-
Save sasqwatch/8ae0e117be67208ac1e228526e6d78f2 to your computer and use it in GitHub Desktop.
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
# Author: Matt Graeber, SpecterOps | |
ls C:\* -Recurse -Include '*.exe', '*.dll' -ErrorAction SilentlyContinue | % { | |
try { | |
$Assembly = [Reflection.Assembly]::ReflectionOnlyLoadFrom($_.FullName) | |
if ($Assembly.GetReferencedAssemblies().Name -contains 'System.Management.Automation') { | |
$_.FullName | |
} | |
} catch {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment