Download from: https://github.com/jmprsp/ProcessFailures
As presented in RECON 2016 by James Forshaw. He demonstrated that he is able to execute a DLL as a standalone process. According to his presentation, the reason why a DLL can’t be executed as a process is due to a check on the ProhibitedImageCharacteristics field. His POC is in the form of C#/Powershell. I simply converted it to C/Executable.
So by simply resetting this field to 0, we could then run a DLL as a process!
The following is a DLL with a .txt extension; just for fun… using regsvr32 is one of the way to execute a DLL and as you can see, a messagebox shows up stating that it is a DLL.
Now using James approach, we can now execute pikachu.txt as an executable!
Looking it from IDA Pro
Note that one do not necessary need to clear the field with 0. Other values work as well.