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.)
EDIT: Also tried using STDIN for "custom payloads" but whatever I try is apparently an "invalid custom payload"...