Empire icon indicating copy to clipboard operation
Empire copied to clipboard

[BUG] Invoke-ReflectivePEInjection C# executables crash Powershell

Open Invoke-Mimikatz opened this issue 4 years ago • 3 comments

Empire Version

  • Empire 3.2.3

OS Information (Linux flavor, Python version)

  • OS:
  • Python:

Describe the bug Some EXE files are not usable with Invoke-ReflectivePEInjection. In testing, it seems C# binaries are affected. Normal C binaries are able to be loaded just fine.

To Reproduce Steps to reproduce the behavior:

  1. Import-Module Invoke-ReflectivePEInjection
  2. Invoke-ReflectivePEInjection -PEPath File.exe
  3. if File.exe is a C# binary, Powershell crashes and EXE does not run.
  4. If File.exe is a C binary, Powershell does not crash, and the program runs.

Screenshots

Watson, a C# binary, crashes when loaded into Invoke-ReflectivePEInjection watson

Running a C/assembly binary successfully and then a C# binary crashes the loader. lsass

Mimikatz, a C binary, loads without issue. mimkatz

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

Invoke-Mimikatz avatar Jun 11 '20 04:06 Invoke-Mimikatz

This issue is closed because it does not meet our issue template. Please resubmit with the correct template.

close-issue-app[bot] avatar Jun 11 '20 04:06 close-issue-app[bot]

This issue is closed because it does not meet our issue template. Please resubmit with the correct template.

close-issue-app[bot] avatar Jun 11 '20 14:06 close-issue-app[bot]

@Invoke-Mimikatz sorry for not responding earlier this is a known bug I plan on trying to fix next week. C# is a .Net language and when you compile into an .exe it actually has a different format than a unmanaged exe (a C program). That's why one works but the other doesn't

Hubbl3 avatar Jun 25 '20 01:06 Hubbl3