Suppose I am doing a penetration test on a network that has a firewall that blocks all ports except 80, 110, and 443. I want to use a metasploit reverse-TCP backdoor executable written in msfpayload to initiate a connection with a remote server that has a listener running.

Since I can't set the backdoor to run on an blocked port because of the firewall, can I set the executable to run on one of the allowed ports assuming that the port is dormant at the time and no traffic is going through it? If not is there any way to get around a blocked port or make this scenario work?

  • 1
    If the firewall allows traffic on a port, then there is nothing stopping you, dormant or not.
    – schroeder
    Commented Nov 22, 2012 at 20:14

2 Answers 2


If there's not an application listening on the port that you want to listen on, then you can use those ports. If not, you can make an outgoing connection which should make the firewall less of a problem (especially if you try to connect to a common port like 80 or 443).


Sure, if a port is free and you have the authorization to run the program you will be able to run it on whichever port you want, providing that the program itself allows you to define the port. Take apache for example, you can run it on any port you choose. Some software may have the port hard set in the code however, but that's pretty rare.


You must log in to answer this question.

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