Is there a practical way to find an open port?

Discussion in 'Linux Networking' started by root, May 21, 2013.

  1. root

    root Guest

    In a previous thread I learned how to create a port-forward
    on a remote machine so that I could ssh into that machine.

    I have done what I can to ensure that even if someone
    knew what port is open they would not be able to pry
    into the machine.

    Nevertheless, I am trying to assess how difficult it would
    be for an intruder who does not know the open port. For
    example, if I had created an open port 22363 on the remote
    machine, I know that I can use telnet to verify the
    port is open:

    telnet remote-host 22263

    Which connects if the port is open and hangs otherwise.

    I want to know how an intruder can:
    1. select a particular remote-host for attention
    2. given that host, find one or more of the 65,000 ports
    that may give access.

    I have tried nmap which seems only to scan the first 1024
    ports. As I read man nmap I tried a number of things
    like -PU or -PY with no success.

    I tried:
    nc -z remote-host 22260-22265
    but even when the port range includes the open port the
    command hangs.

    There are many ways to probe ports when I am logged
    into the machine, but this isn't what I want. I
    want to pretend to be an intruder and see how much
    trouble it would be to even find an opening.

    If you know such a way, but fear that revealing this
    information might turn me into a cracker: I am pretty
    sure those bent on the crime already know how to do it.

    Thanks for any help.
     
    root, May 21, 2013
    #1
    1. Advertisements

  2. root

    Chris Davies Guest

    Trivial. See below
    That's the default setting. You can specify a port range like this:
    nmap -p 0-65535 remotehost

    Chris
     
    Chris Davies, May 22, 2013
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.