Search code examples
operating-systemipfingerprint

How to detect OS version of a web server


Is there a way to detect the Operating System version of a web server using its IP address (with knowledge that the web server is running php).

I haven't attempted to code it yet, as i am a beginner. Is it easy? Is it possible or not possible at all?


Solution

  • There's no official way to detect OS on a remote server across all operating systems and configurations. It's often considered a security risk to expose such information, since it can be used to research directed attacks based on the version of the OS and any services it runs.

    However, you can fingerprint systems to "guess" the OS, depending on the services it exposes. Many services will reveal the OS that is currently running, some will hint at it or provide broad information about the system.

    I certainly wouldn't suggest anyone inexperienced in PHP attempt such a project, but here are some links to get you started:

    If you're just trying to find out the OS of the user viewing your website, you should look into the User-Agent HTTP header: http://en.wikipedia.org/wiki/User_agent