hasherezade / pe_to_shellcode

Converts PE into a shellcode
https://www.youtube.com/watch?v=WQCiM0X11TA
BSD 2-Clause "Simplified" License
2.27k stars 423 forks source link

Applications with TLS callbacks are not supported! #6

Closed xuxuedong closed 2 years ago

xuxuedong commented 5 years ago

when i attemp to convert a 64 bit pe file, it has above error...

hasherezade commented 5 years ago

It is true, they are not supported. It's not a bug. It is just an inevitable limitation that not all PE files are suitable to be converted. Try to convert a PE file that has no TLS callbacks.

xuxuedong commented 5 years ago

thanks a lot, but can i get rid of the "tls callback" of a pe file to use this tool? such as recompile it?

hasherezade commented 4 years ago

please check the latest release, it has some improvements about it: https://github.com/hasherezade/pe_to_shellcode/releases/tag/v0.8

ntrischi commented 3 years ago

Will TLS callbacks ever be supported? Is this something out of scope of this project?

hasherezade commented 3 years ago

Will TLS callbacks ever be supported? Is this something out of scope of this project?

The objective of this project was to replicate the functionality of the classic Reflective DLL injection - and it doesn't support TLS callbacks either. So after having the equivalent functionality covered, I was not planning to go further in this project. But if more people will need TLS callbacks, I will consider adding them. At this moment I am just not sure if it pays off, because more important for me was keeping the stub small and simple.

hasherezade commented 2 years ago

hi! if you are still interested, I added TLS callbacks support in the latest release: https://github.com/hasherezade/pe_to_shellcode/releases/tag/v1.0