# pe_to_shellcode [![Build status](https://ci.appveyor.com/api/projects/status/w3dy81u0k3up7459?svg=true)](https://ci.appveyor.com/project/hasherezade/pe-to-shellcode) Converts PE so that it can be then injected just like a normal shellcode.
(At the same time, the output file remains to be a valid PE).
Supports both 32 and 64 bit PEs Clone: - Use recursive clone to get the repo together with all the submodules:
git clone --recursive https://github.com/hasherezade/pe_to_shellcode.git
How to use it: - 1. Use pe2shc.exe to convert a PE of your choice: ``` pe2shc.exe [output path*] * - optional ``` If the PE was successfuly converted, pe2shc will let you know where the output was saved: ``` [+] Saved to file: ``` i.e. ``` [+] Saved to file: test_file.shc.exe ``` 2. Use runshc.exe to run the output file and check if the conversion went fine: ``` runshc.exe ``` 3. If the file runs as the original PE, it confirms that the conversion was successful!
Now you can use the converted PE just like you would use a shellcode: inject it to a target and execute from the beginning of the buffer. No additional PE loaders are required.
At the same time, you can keep using the converted file as a regular PE. Latest builds*: - *those builds are available for testing and they may be ahead of the official release: + [pe2shc.exe](https://goo.gl/LfJaVZ) - PE to shellcode converter + [runshc32.exe](https://goo.gl/xi3fzQ) - a utility to run/test 32-bit shellcode (loads and deploys) + [runshc64.exe](https://goo.gl/TE4bhr) - a utility to run/test 64-bit shellcode (loads and deploys)