Skip to content

'PE' does not exist in the current context error #26

Closed
@1nPr0c

Description

@1nPr0c

Attempting to convert a simple DLL to shellcode, but receiving the following error. Am I doing something incorrect?

Note: DLL is 64bit

PS C:\Users\dev\Desktop\sRDI\PowerShell> Invoke-Shellcode -Shellcode (ConvertTo-Shellcode -File MessageBoxDLL.dll)
Add-Type : c:\Users\dev\AppData\Local\Temp\pn4hozhz\pn4hozhz.0.cs(65) : The name 'PE' does not exist in the current
context
c:\Users\dev\AppData\Local\Temp\pn4hozhz\pn4hozhz.0.cs(64) :
c:\Users\dev\AppData\Local\Temp\pn4hozhz\pn4hozhz.0.cs(65) : >>>         if (PE.Is64BitDLL(dllBytes))
c:\Users\dev\AppData\Local\Temp\pn4hozhz\pn4hozhz.0.cs(66) :         {
At C:\Users\dev\Desktop\sRDI\PowerShell\ConvertTo-Shellcode.ps1:353 char:5
+     Add-Type -TypeDefinition $Source -Language CSharp -CompilerParame ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Power...peCompilerError:AddTypeCompilerError) [Add-Type], Except
   ion
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions