in reply to Can I use LWP to determine the remote OS?

Is there a way for my LWP script to determine what OS the web server is running on?

Not reliably. You can ask the web server (by issuing a HEAD request on /, or by trying to trigger a 404 error page), but there's no guarantee that what the server tells you will be true. In an infamous case a few years back, a set of FreeBSD/Apache servers were made to claim that they were running IIS on NT, all to avoid embarrassing a certain large company.

  • Comment on Re: Can I use LWP to determine the remote OS?

Replies are listed 'Best First'.
Re: Re: Can I use LWP to determine the remote OS?
by Mr_Person (Hermit) on Jun 13, 2003 at 00:13 UTC
    A bit more accurate way would be to use a remote OS fingerprinting utility such as Nmap or XProbe as they rely on the properties of IP packets sent out by the OS. These too can be spoofed, but it's much less likely than changing the string your webserver reports. One disadvantage is that because these are active fingerprinting utilities, their use may be reported as an "attack" on the network if the target host is behind an IDS like Snort, so you may want to be careful or get permission first.