Re: Random unprivileged TCP ports below 5000 kind-of open for a fraction of a second

From: Pavel Kankovsky (peak@argo.troja.mff.cuni.cz)
Date: 12/26/02

  • Next message: Fyodor: "Re: Random unprivileged TCP ports below 5000 kind-of open for a fraction of a second"
    From: "Pavel Kankovsky" <peak@argo.troja.mff.cuni.cz>
    Date: Thu, 26 Dec 2002 16:50:51 +0100 (MET)
    To: alfaentomega <alfaentomega@yahoo.com>
    
    

    On Mon, 23 Dec 2002, alfaentomega wrote:

    > First I thought that they may be some ports, which are
    > kind-of open, but they never finish TCP handshake, but
    > they are detected only with basic nmap scan -sT, a TCP
    > connect() scan, and never by any other kind of scan,
    > like -sS SYN half-open scan (if they never finish the
    > handshake, then it would make more sense if -sS
    > detects them, while -sT thinks they're closed, not the
    > other way around - but I may be wrong here).
    >
    > Here are other of my observations:
    > I ran nmap in a loop scanning TCP ports 1-10000 every
    > time (first it scanned 1-65535 but higher ports were
    > never open), and for 1000 ports found, there was 875
    > unique ones, with lowest 1036 and highest 4989, so
    > they look quite randomly distributed in this range.

    Your local port range (/proc/sys/net/ipv4/ip_local_port_range)
    is 1024-5000, right? You are probably seeing some autobound
    sockets.

    Hypothesis: one of the services listening on your machine opens a
    short-lived listening sockets on an automatically assigned port (ie.
    in 1024-5000 range) when it accepts a connection. This would explain
    why SYN scan does not trigger it but connect() scan does.

    Try this:
      for each port p in 1-1023
         perform a connect() scan of p and 1024-5000

    Only a small set of p, perhaps a single value of p--the hypothetic
    offending service (see above)--should make the mysterious listening port
    appear.

    --Pavel Kankovsky aka Peak [ Boycott Microsoft--http://www.vcnet.com/bms ]
    "Resistance is futile. Open your source code and prepare for assimilation."

    ----------------------------------------------------------------------------
    This list is provided by the SecurityFocus ARIS analyzer service.
    For more information on this free incident handling, management
    and tracking system please see: http://aris.securityfocus.com



    Relevant Pages

    • OT: Trend Micro WFBS beta starting soon
      ... getting pattern updates for laptops off the LAN. ... Trend firewall, even set to High, has inbound NetBIOS ports open. ... File and Printer Sharing" and when someone chooses it, it opens inbound ...
      (microsoft.public.windows.server.sbs)
    • Re: Trend Micro WFBS beta starting soon
      ... before getting pattern updates for laptops off the LAN. ... Trend firewall, even set to High, has inbound NetBIOS ports open. ... File and Printer Sharing" and when someone chooses it, it opens inbound ...
      (microsoft.public.windows.server.sbs)
    • Re: Trend Micro WFBS beta starting soon
      ... before getting pattern updates for laptops off the LAN. ... Trend firewall, even set to High, has inbound NetBIOS ports open. ... File and Printer Sharing" and when someone chooses it, it opens inbound ...
      (microsoft.public.windows.server.sbs)
    • Re: DNS Ports open
      ... dns.exe:2456 TCP 0.0.0.0:2316 0.0.0.0:0 LISTENING ... Although ports 2314 to 2316 ports are not open over the wire, I am wondering what they are used for? ... if you've installed the DNS hotfix from last July. ...
      (microsoft.public.windows.server.dns)
    • RE: ZoneAlarm & KB951748 - My Fix Works!
      ... You don't want to open up ports as it opens up a can of worms. ... Do the same for 'Allow outgoing TCP ports'. ... ZoneAlarm is investigating the issue with Microsoft update KB951748: ...
      (microsoft.public.windowsupdate)