I'm not exactly sure how metasploit works when exploiting a target machine, and it has been a while since of played with it, so forgive me.

Instead of using meterpreter as a payload in metasploit, could I write my own .Net based executable that would be dropped on a system after exploitation? Assuming the victim had .Net on their machine of course.


You can do this a few different ways.

First, if your exploit is an EXE-dropping exploit (like psexec), you can set the EXE::Custom advanced option.

Otherwise you can use one of the payloads that allows you to upload (windows/upexec/*) or download (windows/download_exec) a custom executable.

  • hi can we use this method for custom apk payload as well ?
    – Ahmad
    Mar 7 '20 at 11:57

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.