Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Question was once on a mailing list but wasn't answered. I want to use a custom exe as a payload in metasploit. For example when I use exploit/multi/browser/java_atomicreferencearray and want to execute my payload.exe, how can I do that?

It is possible in SET, where you can just import a custom executable.

Is it possible in Metasploit?

share|improve this question

You can execute any payload file or string you like using the msfconsole with these options:

PAYLOADFILE The file to read the payload from
PAYLOADSTR  The string to use as a payload
ARCH        The architecture that is being targeted
PLATFORM    The platform that is being targeted
VERBOSE     Enable detailed status messages
WORKSPACE   Specify the workspace for this module

share|improve this answer
What I did was: set PAYLOAD generic/custom set PAYLOADFILE /var/www/install.exe generate use exploit/multi/browser/java_atomicreferencearray exploit Now I get an error saying [-] Exploit failed: Could not locate a compatible payload for Java/java What am I doing wrong? – JohnnyFromBF Apr 27 '12 at 22:22
There could be so many reasons, from incorrect syntax to wrong locations for modules etc. You need to have a read through documentation and have a look at other examples. – Rory Alsop Apr 27 '12 at 23:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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