Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there some way to run a command (such as ICMP message or another protocol), get a response from a remote machine (not on my own private local network) and analyze the message to find some evidence that this machine is running a Windows or a Linux operating system?

share|improve this question
    
What do you plan to do with this information? It may not be reliable... –  pjc50 Feb 24 '12 at 16:24
    
Actually I was on a custumer last week and he was using a system that prevent anyone to use a Windows system on his network. It was made by a remote server that was not one the same network, I thout it very strange because I didn't know how it was made. –  Diogo Feb 24 '12 at 16:33
    
There are any number of ways you might do that. For example, if you are using DHCP to provide network addresses, the DHCP request includes information about the client OS. –  Harry Johnston Feb 28 '12 at 21:15

5 Answers 5

up vote 8 down vote accepted

It isn't definitive but nmap will do this with the command nmap -O -v (see docs for more details) If you're running windows or want a gui, look at zenmap

share|improve this answer
    
Mind you - some providers will detect port scanning using nmap as abuse. –  Jeroen Baert Nov 9 '12 at 1:42

If you're on an IPv4 network, just use ping. If the response has a TTL of 128, the target is probably running Windows. If the TTL is 64, the target is probably running some variant of Unix.

share|improve this answer
    
What do you mean by propably? –  Dchris Sep 5 '13 at 9:00
    
What about TTL=255? I think is Unix.. –  Dchris Sep 5 '13 at 9:01
    
I don't think I've ever seen a TTL of 255. –  Harry Johnston Sep 5 '13 at 21:32
: Presumes ping service enabled on Windows local and remote hosts
:
del _IX.txt, Windows.txt
ping -n 1 [computername|ipaddress] | findstr /i /c:"Reply" > ttl.txt
for /f "tokens=1-9* delims=:=< " %%a in (ttl.txt) do (
    if %%i leq 130 (
       if %%i geq 100 (
          echo Windows & rem or echo %%c >> Windows.txt
       ) else (
          if %%i equ 64 (
             echo *IX & rem or echo %%c >> _IX.txt
          )
       )
    )
)
share|improve this answer

One way to go is to use NMap. From the response, it can guess the remote OS.

share|improve this answer

Package: xprobe 'OR' xprobe2
Description: Remote OS identification Xprobe2 allows you to determine what operating system is running on a remote host. It sends several packets to a host and analyses the returned answers. Xprobe2's functionality is comparable to the OS fingerprinting feature in nmap.

Example:
$ sudo apt-get install xprobe
$ sudo xprobe2 -T21-23,80,53,110 ###.###.###.###

Reference:
http://www.sys-security.com/html/projects/X.html
http://sourceforge.net/projects/xprobe/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.