Slashdot Mirror


Fooling NMAP for Whatever Reason

taviso writes "Are you bored with your OS fingerprint? Do you dream of being able to impress your friends by convincing them your webserver is running on a sega dreamcast, or Apple LaserWriter? Well Dream no more! David Berrueta has written a paper oulining the techniques and tools available to defeat nmap's OS fingerprinting, available here [pdf]. Besides the hours of entertainment this could provide, he also lists some of the more serious reasons why you might want to consider this."

52 of 192 comments (clear)

  1. Oh what fun by snitty · · Score: 3, Funny

    I could just see slashdot running on a Trash - 80. .

    --
    Modular Redundancy--Because 4 out of 5 Nodes agree
    1. Re:Oh what fun by worst_name_ever · · Score: 4, Funny
      I could just see slashdot running on a Trash - 80.

      As opposed to just the sites where the stories are hosted?

      --

      In Soviet Rush, today's Tom Sawyer gets high on you.
  2. That would be very amusing... by analog_line · · Score: 3, Interesting

    ...to see the first time some hacker scans my network to see that every server is running off a Dreamcast. Wouldn't that be funny if that became the secure standard? Every TCP/IP fingerprint returns "Sega Dreamcast". Wouldn't be a huge security boost, but it would help slow down the process of choosing a system to try and break. And the stupid kids who think they're hackers would probably just move on.

    1. Re:That would be very amusing... by Feztaa · · Score: 3, Funny

      Nah, Sega Dreamcast is *way* too suspicious. Hackers would be like "WTF? How is that possible?" and then they'd explore further.

      What you'd really want to do is set the fingerprint to something like the old, unpatched Windows 95. Then the attackers will think "ROFL, dumbass admin running windoze! ATTACK!" and then your logs show some lame attack that might have worked on windows, but doesn't work on linux, and you get an early warning of any attacks that come your way :)

  3. Already common practice by presroi · · Score: 4, Insightful

    Many servers hosting the web site of the US armed forces don't seem to be running the OS they are claiming to run. However, this *could* also be the result of some sort of load balancing.

  4. Cool :) by rf0 · · Score: 4, Informative

    I've seriouly been looking for this for my home box. Of course its only part of the way of hiding the real OS your running. One part of eunermation is to look at the banners that network servers show. For example telneting to my home box

    [rghf@localhost rghf]$ telnet foo.wibble 22
    Trying foo.wibble...
    Connected to foo.wibble
    Escape character is '^]'.
    SSH-2.0-OpenSSH_3.4p1 Debian 1:3.4p1-1

    Shows I'm running debian (or am I? :). So changing these as well could give those l33t script kiddies some fun :)

    Rus

    1. Re:Cool :) by Anonymous Coward · · Score: 2, Funny

      I predict 2 minutes from now that someone tells you to not use insecure crappy telnet but ssh instead.

  5. Slashdotted by joyoflinux · · Score: 3, Funny

    Well, this proves that it doesn't matter what OS fingerprint you have, you can still get slashdotted...

  6. PDF MIRROR HERE by scubacuda · · Score: 5, Informative
    I googled and found a mirror PDF site.

    (But not before I d/led it to my local machine first!)

  7. This is good by garett_spencley · · Score: 5, Insightful

    Well I'm strongly against security through obscurity as a security infrastructure. However, as long as you have a solid, proven security infrastructure protecting your enviornment then adding a bit of obscurity over the top as an added layer can only be benefitial.

    If I know that I've done everything to protect my x86 Linux box from an attack if the attacker already knows it's an x86 Linux box, what distro it's running, has access to my network (assuming the attacker is an employee) etc. then why not make it so that script kiddies will think it's a commodore 64 and will try and exploit it as so?

    Though security through obscurity is not a good idea as the only form of protection, it can add another blanket of support and I'm all for that as long as you understand what you're doing and why.

    1. Re:This is good by Mononoke · · Score: 3, Insightful
      then why not make it so that script kiddies will think it's a commodore 64 and will try and exploit it as so?
      What happens when we inadvertantly give M$ 98.2% of the 'known' server market? ^_^
      --
      NetInfo connection failed for server 127.0.0.1/local
    2. Re:This is good by OneEyedApe · · Score: 2, Interesting

      They might compare sales to server stats, and decide that piracy is running rampant. With their kind of money, this could be a bad thing.

      --
      Life sucks, but death doesn't put out at all....
      --Thomas J. Kopp
    3. Re:This is good by mosch · · Score: 4, Insightful
      why not make it so that script kiddies will think it's a commodore 64 and will try and exploit it as so?
      because script kiddies don't bother with fingerprinting, most of the time. they just run an attack and see if it happens to work. for proof of this, look at your apache logs.
    4. Re:This is good by blibbleblobble · · Score: 2, Funny

      "What happens when we inadvertantly give M$ 98.2% of the 'known' server market?"

      We get even more crap directed against our webservers until we get tired, and declare it to be a BSD box.

      Dammit, just give up asking my linux/apache server for "../../../../windows/" you morons!

    5. Re:This is good by jrumney · · Score: 2, Insightful
      Given the scarcity of kiddie scripts exploiting the Commodore 64, if you really want to waste some script kiddies' time you might want to go for a Windows box with IIS as your fake fingerprint.

      While you're at it, using the same technique to bait CodeRed and Slapper worms and hold them on your server for as long as possible might slow them down a bit too (if enough people were doing it). Unfortunately the Slapper variant that is still around has a 15 second timeout, but I've heard of tarpits keeping CodeRed/Nimda worms busy for up to four days.

  8. Netcraft by arvindn · · Score: 2, Insightful

    The folks at netcraft use these kinds of techniques for getting their server stats. Modifying the TCP/IP stack will screw up their stats collection :(

  9. Netcraft confirms by RLiegh · · Score: 5, Funny

    OS fingerprinting is dying!

    (sorry. someone had to...)

  10. Been there, done that... by NetDanzr · · Score: 4, Funny

    Well, not me personally. But what do you think Microsoft has been doing all the years? Considering how stable their site is (and taking into account the humongous crash when they tried to move Hotmail onto WinNT), I'm convinced that they've been running the whole MSN network on Unix-based servers, disguising them as Windows ;)

  11. My FTP banner by Phroggy · · Score: 4, Funny
    phroggy@panther:~$ ftp ftp.webwizardry.net
    Connected to webwizardry.net.
    220 ftp.webwizardry.net Microsoft FTP Service (Version 5.0).
    Name (ftp.webwizardry.net:phroggy):
    Of course, it's actually ProFTPd on Slackware.
    --
    $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
    $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    1. Re:My FTP banner by ignorant_newbie · · Score: 3, Funny

      heh :) way to hide your os - disguise your ftp banner, and then post the true OS on a website that no h4x0r ever reads

  12. IIS ftp by larry+bagina · · Score: 5, Funny
    The Windows IIS FTP server has an option to spew MS-DOS style output or Unix style output.

    Quoting from "Microsoft IIS 5 Administration" ) pp 52) ...

    Although there are very sophisticated hackers who will attempt to break into your FTP sites through some very sophisticated means, you shouldn't make life any easier for them. Using the UNIX-style output can actually fend off some hackers because they cannot see the Microsoft FTP Service header at log on and see only the UNIX-style directory listing. This could make them believe they are using a UNIX/Linux server.

    Longwinded way of saying Unix/Linux is percieved as being harder to crack. :)

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

    1. Re:IIS ftp by Orestesx · · Score: 3, Insightful

      Imagine the reverse: If you're running a unix/Linux server, and you disguised to look like a windows server, then it would be harder to crack because the cracker would use the wrong techniques. It doesn't really matter that unix/linux is perceived as more secure.

    2. Re:IIS ftp by Jeremy+Erwin · · Score: 2, Interesting

      Those statistics are both obsolete:

      These numbers are dated; the collection and calculation of data stopped in early August 2001 due to a site migration issue. We are currently working on this issue and should have it resolved in the near future.

      and misleading:

      There is a distinct difference in the way that vulnerabilities are counted for Microsoft Windows and other operating systems. For instance, applications for Linux and BSD are often grouped in as subcomponents with the operating systems that they are shipped with. For Windows, applications and subcomponents such as Explorer often have their own packages that are considered vulnerable or not vulnerable outside of Windows and therefore may not be included in the count. This may skew numbers.

    3. Re:IIS ftp by Jeremy+Erwin · · Score: 2, Informative

      Even if we add an additional 10 vulns for 2000 and 2001, Win2000 still doesn't end up in first place.

      Adding "an additional ten vulnerabilities" would simply make the data even more meaningless than the authors of security focus already assert the data to be.

      "The numbers presented below should not be considered a metric by which an accurate comparison of the vulnerability of one operating system versus another can be made."

      But I'll play along:
      Windows NT/2000 10 8 78 97 42
      Debian 3 2 31 55 28

      Debian GNU/Linux has fewer incidents associated with it than does Windows NT/2000. I suppose the Windows NT aslo includes IIS, but that's fair since Apache, is, or would be reported under the Debian category. (Also, IIS is referenced in this thread's topic title--but I digress). Also, the sharp decrease in 2001 incident reports has a lot to do with the fact that staistics were only taken through August of that year.

      FYI, I don't use Linux (at present). I'm a MacOS X user.

  13. Dogfood by arvindn · · Score: 3, Interesting

    A lot of sites have to eat their own dogfood, like hotmail. Now they needn't any longer. If they can change their fingerprint, they can run linux and make it look like they're running NT. (They used to run FreeBSD earlier.)

  14. IP personality.. by RatOfTheLab · · Score: 5, Informative

    Someone thought about OS fingerprint obfuscating a while ago... http://ippersonality.sourceforge.net/

  15. Re:why emulate the IP stack by analog_line · · Score: 2, Insightful

    Because someone using TCP/IP fingerprinting is looking for interesting hosts to attack, for whatever reason.

    Something they've never seen before is interesting, and the would be hacker would likely pry a bit deeper. Giving them false information either makes them disinterested ("some idiot put up a Dreamcast on the web, how stupid") or leads them to attack in a way you are expecting, and that you know will be ineffective. Watching for these known false attacks could act as some part of an early warning alarm system, holding the attacker with his interest long enough to track him down. Ala, the Cuckoo's Egg.

  16. Johny Cash Server by Anonymous Coward · · Score: 4, Funny

    Yessiirreee,

    I'm servin' mah HTTP files from this here ol' guitar and my FTP files from an empty bottle-a-booze.

    And this post, yes HTTP_REFERER was from the ol' cadillac factory I once worked at; the one where I snagged my dancin' machine car one peice at a time over twenty or some number of years-*HICUP*

    -SlashdotTroll (because slashdot don't like me, my karma is terrible, and at -1 they only let me post twice in 24hours from this ol' Folsom prison I'm stuck in.)

  17. reminds me of... by jeffy124 · · Score: 2, Informative

    ... a story i heard a while back regarding script kiddies.

    some researchers set up a unix server, went into a script kiddies irc channel and said they found this wide open windows box, saying it contained credit card numbers or something like that, giving the ip of their honeypot.

    not one kiddie tried a unix sploit on the box, 100% of the attempts were exploits designed for windows.

    so for fooling nmap, if you're a security admin, set up your windows boxen with unix fingerprints and vice/versa, and you'll at least avoid getting r00ted by most script kiddies. just continue to be aware of the dedicated cracker whose above the ranks of kiddies.

    --
    The One Rule Of Chess You'll Ever Need: Don't play someone who carries a kit in their bookbag.
  18. Mirror by Phroggy · · Score: 2, Redundant

    Here.

    Please mod this down so I don't get slashdotted too badly. :-X

    --
    $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
    $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
  19. Very few actual portscans by Alioth · · Score: 3, Informative

    I've seen very few portscans against any of my internet connected boxes. The usual unsolicited connection attempts tend to be for well-known exploits (18 months ago, port 111 was *really* popular with several attempts a day). I'm not really sure whether it's worth the effort going out of your way to do things to change the OS fingerprint that nmap comes up with (even under good conditions, I've never found nmap's fingerprint particularly reliable or accurate anyway)

  20. Must not hide by Beliskner · · Score: 3, Informative
    Hiding your OS is something the corporations will not do. To maintain compliance with Micro$oft licence terms and the BSA they mnust periodically audit their systems to count the number of software installations using automated scanning software such as Centennial

    If their computers start lying about their OS and software installed then the BSA will invade them and stick 100 lawyers on their head before you can say "Nmap"

    --
    A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
  21. I see no reason to NOT do this by fudgefactor7 · · Score: 4, Insightful

    Any level of additional security, brought about by "lying" or "fooling" is a great thing. After all, nobody needs to know your OS except you. But my opinion is that people should keep their faked responses within the realm of reason. No Sega Dreamcasts, no TI calculators, no Epson Dot Matrix LQ-2170 printers... If you lie, it must be a believable lie or it will be transparently obvious and the h4x0r will figure it out instantly. And that's not a security boon at all.

    1. Re:I see no reason to NOT do this by huhmz · · Score: 3, Funny

      Actually emulating a TI calculator will make the attacker think "well this guy obviously has the skill and have taken the time to emulate a silly calculator, better not screw with someone as l33t as him"

    2. Re:I see no reason to NOT do this by grantsellis · · Score: 2, Funny

      Thats right.

      I use this so that people think my Sega Dreamcast, TI calculator, and Epson Dot Matrix are normal servers.

      ;)

  22. been done, in production by Permission+Denied · · Score: 3, Informative
    see here. This project is a couple of years old. I was considering writing it myself when I ran across that someone else has already done it.

    Takes a completely different approach to what I was thinking - I was thinking of doing it all in userspace. Run some daemon that uses libpcap and "responds" to certain ports like a real machine. Basically means a TCP stack in userspace, so it's not a trivial undertaking but still lots of fun. I was also thinking of making it use nmap's own configuration files so you can simply specify what OS you want it to look like and it looks up the params in the config file. Only disadvantage is that you want it to pass "real" packets in to the kernel for normal processing so this is only useful in limited situations (when you can firewall a machine off completely from the Internet and only need it to serve up something within your organization). I was also considering writing something that uses FreeBSD's divert sockets since you could integrate that nicely with your firewall, but it wouldn't be as portable as the other approach (which would work wherever pcap works).

    Anyway, this has been done. The paper seems slashdotted so I can't read it.

  23. Sometimes deliberate, sometimes not. by radon28 · · Score: 4, Informative

    From the Netcraft FAQ:

    Why do you report impossible operating system/server combinations ?

    Webservers that operate behind a caching system, load balancer, reverse proxy server or a firewall may sometimes report the operating system of the intermediate machine. Hence reports of 'Microsoft/IIS on Linux' may indicate that either the web server is behind a Linux server that is acting as a reverse proxy, or has configured the Akamai caching system such that the first request to the site goes to one of Akamai's servers [which run Linux], or as in the case of www.walmart.com has been configured to send a misleading signature.

  24. Re:This is good (maybe not) by dan+g · · Score: 4, Insightful

    Well I'm strongly against security through obscurity as a security infrastructure. However, as long as you have a solid, proven security infrastructure protecting your enviornment then adding a bit of obscurity over the top as an added layer can only be benefitial.

    Yes, except you are implementing this security by fucking with your tcp/ip stack. In other words, you are taking the 'solid, proven security infrastructure' and stirring it up a bit. It is no longer proven to be solid so this bit of obscurity could have cost you some real security. Personally this is not a patch I'd go applying to production machines.

    dan.

  25. How much does it gain? by Anonymous Coward · · Score: 4, Interesting

    I wonder how clever this deception is? It's easy enough to grab the version advertisement, but more difficult to make your system respond the same way as another OS, especially if that other OS is 'broken' in regard to TCP/IP. The question is whether you want to mimic the 'bug for bug' behaviour...

    There are some who disable ICMP response because it could help to show that a machine is active. Well, that's the canonical reason. But you can also use ICMP to (very slowly) move data, so at least in a far-fetched scenario it could be used a vector for attack.

    Say someone wants to attack your server. NMAP shows the OS as Windows NT. However, attaching to port 80 shows an Apache version string that has been released with RedHat. The casual cracker may have been deterred by the OS advertisement, but anyone else would not have. If your defense depends to a large part on version obfuscation then you don't have a defense, simply put.

    So you could grep through all the sources for version strings of all your internet exposed services, but that won't gain anything. Does version obfuscation hurt? Probably not. Neither does changing your user-agent string in the browser, except that fewer non-IE browsers will be tallied. For this reason alone I don't change my user-agent string, nor do I change my OS signatures (though I know how to).

  26. honeyd does this already by quigonn · · Score: 5, Informative

    honeyd is able to do this already for quite a long time. With honeyd you can basically create "virtual hosts", running on another computer, with their own IP address, their own IP personality (it comes with a large database of them), and their own services (basically, every inetd-capable program can be used as server with it). You can even create a "virtual network" of them, with configurable routes, latency and packet loss. Indistinguishable from real computers and networks.

    --
    A monkey is doing the real work for me.
  27. Re:This is not really new... by ak_hepcat · · Score: 2, Informative

    ObReadTheArticleFirst:

    "IP Personality
    The first and probably, best option is IP Personality. It'a netfilter module (then, only available for 2.4 linux kernels) that allows us to change the IP stack behaviour and 'personality', having multiple network personalities depending on parameters that you can specify as an iptables rule. "

    etc, etc, etc..

    --
    Support FSF: Stop thinking with your wallet, and think with your imagination. (cc/non-commercial)
  28. Re:no need.. portsentry? by secolactico · · Score: 2, Insightful

    Keep going and soon you'll have an empty route table. Do you drop just the IP or the class C or the entire netblock?

    Unless it is an all out attack, I just report it to the netblock owner. Most of the time (almost always) the report goes ignored and unanswered.

    --
    No sig
  29. Ummm... by spanky1 · · Score: 2, Informative

    He telneted to port 22, the ssh port. He used telnet so you could see the informational banner.

  30. Last year at InfowarCon... by sczimme · · Score: 4, Interesting


    I was one of the instructors in the war games lab. To make things interesting for the students, I distributed nmap with a modified nmap-os-fingerprints file. Windows 2000 machines were reported as Solaris 2.6 (X86) and so forth. Some of the student responses were interesting. :-)

    --
    I want to drag this out as long as possible. Bring me my protractor.
  31. cool, but... random ips used by worms... by joejoejoejoe · · Score: 3, Funny

    This is cool and all, but these days worms and virii select victims at random so your fingerprint won't make a damn bit of difference, except you might think you are a bit safer but you are not.

    --
    Silly Rabbit: tricks are for kids.
  32. Yes, you sure can! by fv · · Score: 5, Insightful
    Indeed, my site is just listed in passing, yet my web traffic suddenly tripled .

    As for the paper, I found it interesting and amusing enough to announce to the nmap-hackers. I'm all for doing this to your personal machines for entertainment and experimental value, but would almost never recommend it as a serious security hardening technique. Your time is almost always better spent working on fundamental security improvements such as applying patches, tightening firewalls, installing IDS systems, removing unnecessary services and setuid binaries, auditing system logs, etc. And sometimes this type of spoofing can actually increase security risk. Nmap expects many modern UNIX operating systems to offer nearly-unpredictable generation of TCP initial sequence numbers and the IP ID field. Crippling the generators to appear as a printer can make you vulnerable to TCP connection spoofing and a plethora of vulnerabilities related to the new Nmap Idle Scan technique.

    And remember that many or most worms and script kiddies simply spew their exploit code to every listening server rather than bothering with fingerprints. All the attempted IIS exploits in my Apache log are testament to that! And if you attract a more competent attacker, you probably won't fool them for long anyway.

    -Fyodor
    Concerned about your network security? Try the free Nmap Security Scanner

  33. All very well and good. by fw3 · · Score: 2, Insightful
    I can't get all that excited about this. Looking at an open, internet connected site, no firewalls and about 4 hosts I've recorded roughly 1 million snort detects spanning 1.5 years of on&off operation I count about 35 total external nmap scans from only 9 unique IP #s. Only a couple of those then tried to follow up with some attack traffic and one was either a very confused kiddie trying to hit a unix box with netbios-ns.

    So ractically speaking, 99.999% mundane risks (kiddies, scripts, worms) out there do minimal OS detection, and pretty much shoot attacks at random IP's. Those that do some form of detection before trying to attack certainly aren't using NMAP to scan (server version detection is far more common, and is not limited to version strings.

    For my money the time spent on stack-signature obfuscation would be far better invested in actual security measures (e.g. staying up to date on patches, implementing defense-in-depth or deploying hardened OS's.

    Sure, if you're going to put your servers behind a load ballancer, packet filter or proxy, then you may well get a measure of obfuscation for free, but if the security implementation on the screened systems is no good you're going to get rooted anyway.

    --
    Linux is Linux, if One need clarify their dist: <Dist>/GNU Linux
    bsds are of course just BSD
  34. Is this how iastate.edu does it? by aaron240 · · Score: 2, Interesting

    If you use NetCraft to see what Iowa State is running, it says they are using /bin/sh as their webserver. Here are the results.

    Is this related? How do they do that? It must be a joke.

  35. Nmap's revenge by fv · · Score: 5, Interesting

    The systems described in the paper such as IP Personality and Honeyd (my favorite), work by watching for the exact probes as described in my fingerprinting paper and then responding as detailed in the Nmap OS DB. But what about all the other TCP/IP techniques for fingerprinting a system? Later this year, I hope to add about half a dozen, including selective ACKs, TTL-normal-reply, and TTL-RST-Echo. Once these are implemented, spoofed systems will appear as a Dreamcast (or whatever) using the old techniques and will be exposed as their real OS via the new techniques. So Nmap could offer fingerprints like "Linux 2.4 pretending to be a Laserwriter". And attackers could even scan the 'Net looking for spoofed boxes -- lets hope the spoofing modules/programs don't open any security holes of their own!

    Of course, the spoofers will then update their software to recognize the new fingerprinting technique and the cycle begins anew. Ah well. I enjoyed Berrueta's paper, by the way.

    -Fyodor
    Concerned about your network security? Try the free Nmap Security Scanner

  36. Re:not so cool by a_n_d_e_r_s · · Score: 2, Insightful


    I can always telnet to a UNIX box - regardless if you remove telnetd or not.

    It just that I have to use another port :-)

    I've sent email and surfed the web using telnet !

    Telnet us very usefull to debug a port with a text protocol...

    However it's not a secure way to log in to a box!

    --
    Just saying it like it are.
  37. Wal-Mart does it by tulare · · Score: 2, Insightful

    For a while now, Netcraft has reported Wal-Mart as running IIS 5.0 on Linux or Solaris :) See for yourself

    --
    political_news.c: warning: comparison is always true due to limited range of data type