Skip to content

Instantly share code, notes, and snippets.

@mattifestation
Created March 8, 2018 20:07
Show Gist options
  • Save mattifestation/fcae777470f1bdeb9e4b32f93c245fd3 to your computer and use it in GitHub Desktop.
Save mattifestation/fcae777470f1bdeb9e4b32f93c245fd3 to your computer and use it in GitHub Desktop.
# 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