I was trying Invoke-ReflectivePEInjection by doing<\/p>\n
.\\Convert-BinaryToString<\/p>\n
Convert-BinaryToString C:\\file.exe<\/p>\n
$InputString=“base64string”<\/p>\n
$PEBytes=[System.Convert]::FromBase64String($InputString)<\/p>\n
But when I run<\/p>\n
Invoke-ReflectivePEInjection -PEBytes $PEBytes<\/p>\n
I get<\/p>\n
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) <\/span>, CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException<\/p>\n What can be the reason?<\/p>","upvoteCount":4,"answerCount":5,"datePublished":"2020-03-16T15:16:18.000Z","author":{"@type":"Person","name":"spiceuser-ez549","url":"https://community.spiceworks.com/u/spiceuser-ez549"},"suggestedAnswer":[{"@type":"Answer","text":" I was trying Invoke-ReflectivePEInjection by doing<\/p>\n .\\Convert-BinaryToString<\/p>\n Convert-BinaryToString C:\\file.exe<\/p>\n $InputString=“base64string”<\/p>\n $PEBytes=[System.Convert]::FromBase64String($InputString)<\/p>\n But when I run<\/p>\n Invoke-ReflectivePEInjection -PEBytes $PEBytes<\/p>\n I get<\/p>\n 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) <\/span>, CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException<\/p>\n What can be the reason?<\/p>","upvoteCount":4,"datePublished":"2020-03-16T15:16:18.000Z","url":"https://community.spiceworks.com/t/why-invoke-reflectivepeinjection-not-recognized/755504/1","author":{"@type":"Person","name":"spiceuser-ez549","url":"https://community.spiceworks.com/u/spiceuser-ez549"}},{"@type":"Answer","text":" Invoke-ReflectivePEInjection seems to be a custom function you have to load before you can use it.<\/p>\n