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

Request help, thanks #36

Open sleahootqsqnl opened 1 year ago

sleahootqsqnl commented 1 year ago

C:\Users\Administrator\Desktop>pe2shc.exe sasa.exe Using: Loader v2 Reading module from: sasa.exe [ERROR] The PE must have relocations! [ERROR] Not supported input file!

4DMH(I)VML9YE)IA_E2DA6B

hasherezade commented 1 year ago

Hi @sleahootqsqnl ! As the message says, your PE file has no relocations - so in other words it is not a good material for shellcodification. If a PE has no relocations table, it can be loaded only at a fixed address, and you won't be able to inject it freely at any arbitrary address. Such attempt will cause a crash. Relocation table cannot be added post-compilation - so if it is not there, it can't be helped. That's why such files are not supported.

Try with some other executable, which do have relocations.

hsxfddos commented 1 year ago

how to use vs2015 compie with relocations