1

I have a computer on my organization ( my Computer).

I want to detect by cmd commands ( only) if the remote computer contains windows operating system ( never mind the version )

someone told me to test the ping command - with the size of the packet. but it is configurable. - so this solution is NOt the best option for me.

I have to be sure....

Royi Namir
  • 137
  • 14

2 Answers2

4

Short answer: you can't.

Long answer: describe the problem you're really trying to solve because "cmd commands" is awfully vague and limitative. Literally, it would be interpreted as "only commands built into the cmd.exe command-line interpretor" but your mention of the ping command already tells us that is not what you mean.

So: do you want to do it by batch ? Then you can download nmap and tell it to attempt an OS detection. You can also attempt to connect to the machine's SMB share and see if the administrative shares are there.

Also, if it's a single computer, why not just walk over there and check ?

Stephane
  • 6,382
  • 3
  • 25
  • 47
3

Nmap does OS fingerprinting with some degree of certainty - meaning, if it returns it's windows, you can take it as a strong hint that it could be. If you need better than that, see Stephane's answer.

Alien Life Form
  • 2,279
  • 2
  • 21
  • 31