I use a custom android/meterpreter/reverse_tcp payload from here. It connects back to the handler at specified time interval. When I use exploit as a job, I get multiple sessions from the same target using different ports.

I want the handler to refuse the session from a target if a session from that target already exits in the jobs. How do I achieve this?

  • What command did you use to make the handler repeat the connection attempt? – J.A.K. Mar 9 '17 at 17:41
  • @J.A.K. just the standard /multi/handler with exploit run with modifier '-j' – wishchaser Mar 9 '17 at 18:27
  • Typo, I meant the payload. (standard meterpreter doesn't repeatedly connect back unless persistance is run) – J.A.K. Mar 10 '17 at 14:25
  • @J.A.K. am using a custom android/meterpreter/reverse_tcp payload. github.com/giovannicolonna/msfvenom-backdoor-android. And my primary question doesn't concern the payload. I just want to know if the listener can refuse a session from a target, if the target already has a successful session. ty – wishchaser Mar 11 '17 at 5:55
  • IDK, maybe you can try to use iptables for that. – OscarAkaElvis Mar 11 '17 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.