0

I was trying Invoke-ReflectivePEInjection by doing

.\Convert-BinaryToString
Convert-BinaryToString C:\file.exe
$InputString="base64string"
$PEBytes=[System.Convert]::FromBase64String($InputString)

But when I run

Invoke-ReflectivePEInjection -PEBytes $PEBytes

I get

Invoke-ReflectivePEInjection : The term 'Invoke-ReflectivePEInjection' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Invoke-ReflectivePEInjection -PEBytes $PEBytes
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Invoke-ReflectivePEInjection:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

What can be the reason?

1 Answer 1

0

It's part of PowerSploit, which you need to install:

Install-Module -Name PowerSploit

If you've already installed it, you need to import it into your scope using

Import-Module PowerSploit

If you need it regularly, add the above in your $profile script.

0

Not the answer you're looking for? Browse other questions tagged .