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

add a compress feature #30

Closed Nyx2022 closed 1 year ago

Nyx2022 commented 1 year ago

as we know,PE file in golang is big(than c/c++),so we will use upx to compress it ,however,after compressed by upx ,pe2shc.exe can not convert it to shellcode,and pe2shc.exe do not provide a compression option;on other hand,if a shellcode generated by pe2shc.exe continue to be compressed by upx,the compressed shellcode can not run in process injection.so i wana pe2shc.exe can add a feature to compress or be compatiable with upx ,thank you

hasherezade commented 1 year ago

hi @Nyx2022 ! Adding a compression option to Pe2Shc is actually a good idea, and I am gonna implement it in the future. Adding support for UPX, on the other hand, is more problematic. As far as I recall, the issue with UPX is that it removes relocation table from the binary it compresses. So it makes it incompatible with Pe2Shc.