Monday, December 18, 2017

Close ports

How to identify the processes that are keeping ports open

Windows OS
For Windows operating systems, you can use netstat, which is included with the OS.
  1. On the scanned server, open command prompt.
  2. Run the command: netstat -ano. This will list all the network connections on the machine. The last column shows the process id of the process for the specific network connection.
  3. You will probably want to filter this down using the ‘find’ command.
    For example, if you only want to list the network connections on port 3306, use:
    netstat -ano | find “:3306”
  4. Or call me and for 50 bucks I will remotly close the doors that are open for you.
    Most Linux distributions include the the netstat command, however the switches are different than the one included in Windows. Proceed as follows:
    1. On the scanned server, open a terminal session,
    2. Run the command: netstat -tulpn. This will list all daemons (services) listening for both TCP and UDP network traffic on the machine. The last column shows the process id of the process for the specific network connection. If this information is not being displayed, it is most likely because the user you are using does not have sufficient privileges. You may need to use sudo to get access to this information.
    3. You will probably want to filter this down using the grep command.
      For example, if you only want to list the network connections on port 3306, use:
      netstat -tulpn | grep “:3306”or call me!

No comments:

Post a Comment