I want to be able to start up my handler in the background, and then attack multiple targets without each exploit starting its own handler...

For instance, when I am attacking a target...

[*] Exploiting target
[*] Started reverse TCP handler on
[*] - Sending handshake...

I don't want the reverse TCP handler started when I exploit, I want to use a background TCP handler to catch all of the incoming shells because when I execute this exploit, it completes but no session is created, then 10 minutes later, a session will be created for a previous target while attacking another target, so I just want to do a catch-all in the background, while I loop through my targets.

Is there any way to do this?

2 Answers 2


Run the listener as a job and set exit on session to false



exploit -j

then view all active sessions with


and interact with specific session with

session -i n         # n being the number of the session

You can use multi/handler to handle any incoming sessions coming your way. It can handle any reverse connections (including pure netcat reverse connects) and payload callbacks, if you define the payload before running the plugin.

msf > use exploit/multi/handler
msf > set ExitOnSession false
msf > set payload /the/payload/you/use
msf > run

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .