So you can use msfpayload or msfvenom to add a payload to an existing exe, most people online seem to use reverse shell. But I was wondering if you could include a custom exe of your own design as a payload. For example, I have "evil_notepad.exe" that I want to add a payload "showanalert.exe". When opened, "showanalert.exe" will be run.

I tried using the command: msfvenom -p generic/custom -f exe -k -x notepad.exe PAYLOADFILE=showanalert.exe >evil_notepad.exe

Which seemed to work, but caused the program itself to crash when run. (Which also makes me feel I have made a mistake somewhere.)

Any ideas?

EDIT: Also tried using STDIN for "custom payloads" but whatever I try is apparently an "invalid custom payload"...

  • Maybe try Yab instead? It has a nice GUI (considering what it does), and it works with Windows (which, to be honest, I tend to favor). – KnightOfNi Sep 25 '14 at 22:55

Short answer is that you can use your own payload, but that payload has to play nicely with the host exe.

There are numerous tutorials that I encourage you to look at.


I don't understand your question well but if you want to hide a backdoor on notepad and u don't wana use meterpreter or reverse shell then use a packer app which can hide your backdoor on a notepad and when the user runs the notepad the packer upacks it self and runs the backdoor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.