in reply to Remote server OS identification

Thats an interesting question, as I'm currently trying to 'improve' a script which also does that. Its technique is unix-only though, as it uses Net::Telnet to login to the remote machine, and run 'uname -s' to get the operating system.

I wonder if nmap would be any faster, and if its installed as standard on things like AIX and HP-UX on which my script is running.. (I somehow doubt it though)

Any other ideas, perchance?

C.

Replies are listed 'Best First'.
Re: Re: Remote server OS identification
by nimdokk (Vicar) on Jun 18, 2003 at 16:56 UTC
    Unfortunately, the problem with using telnet to connect is that A) you are transmitting a password in clear text across the network and B) you are relying on the telnet service to be running on the remote host. This typically would work fine for all flavours of *nix but not necessarally for WinNT-based systems, IIRC, telnet services need to be turned on explicitly on an NT/2000 server (but I'm not an NT admin so I'm not 100% sure of that). Using nmap() is probably a better solution.

    Just my $.02 :-)


    "Ex libris un peut de tout"

      you are relying on the telnet service to be running on the remote host. This typically would work fine for all flavours of *nix

      Not while I'm in charge of the *nix machines! (But normaly nmap wont detect the os-type on these either, thanks grsecurity, Update: though this is likely to change, as far as I know nmap, it will be able soon).

      regards,
      tomte


      Hlade's Law:

      If you have a difficult task, give it to a lazy person --
      they will find an easier way to do it.

        True, although it really depends on how paranoid your security folks are, and ours can be quite paranoid -- but for good reason :-)


        "Ex libris un peut de tout"
      A) doesn't matter at all, since its a user/pass just for ftp with a specific directory, and an internal network. As to B), we are requiring it to be for this very reason.

      Tho whether I require that, or nmap to be installed, is probably just the same..

      Yes I know it doesn't on Win, I said that :) (Which is the other problem, since we now to support ftp servers on Win too.. so I'll need another solution sometime soon anyway..)

      C.

        This is true, as I said above, some places are more paranoid about security than others :-) If you are looking to see if the server is alive, you could simply try a "ping" but to actually identify the server, your best bet would probably be nmap.


        "Ex libris un peut de tout"