Nmap Network Scanning 125
brothke writes "The 1962 song Wipe Out,
with its energetic drum solo started, was the impetus for
many people to take up playing the drums. Similarly,
Nmap, the
legendary network scanner, likely interested many in the art of hacking, and
for some, started a career for security professionals and
hackers. Nmap and its creator
Fyodor
need no introduction to anyone on Slashdot. With
that, Nmap Network Scanning: The Official Nmap Project Guide to
Network Discovery and Security Scanning, is a most useful
guide to anyone interested in fully utilizing Nmap." Read on for the rest of Ben's review.
One may ask, why spend $50 on this book, when the
Nmap Reference
Guide provides a significant amount of the basic
information needed to use the tool, especially since the reference guide is
both free, and well written. The reference guide is
included in the book in chapter 15, and takes up 41 pages.
And for those that are cash strapped, the free reference guide is
the way to go.
Nmap Network Scanning: The Official Nmap Project Guide to Network Discovery and Security Scanning | |
author | Gordon Lyon (Fyodor) |
pages | 468 |
publisher | Nmap Project |
rating | 9 |
reviewer | Ben Rothke |
ISBN | 978-0979958717 |
summary | Valuable book about an invaluable security tool |
In addition, the web site for the book notes that about half of the content is available in the free online edition. The most useful information is in the book in chapters exclusive to the print edition, which includes Detecting and Subverting Firewalls and Intrusion Detection System, Optimizing Nmap Performance, Port Scanning Techniques and Algorithms, Host Discovery, and troubleshooting.
The main benefit of the buying the book is that it has the collected wisdom of Fyodor's, in addition to numerous real-world scenarios, and Nmap commands not documented elsewhere. At over 400 pages, the books 15 chapters provide the reader with everything they need to know about using Nmap to the fullest.
Chapter 1 starts with an overview of the history of Nmap and how it came to be. As to the question of whether port scanning is legal, the author writes that it is best to avoid the debate and its associated analogies. He advises that it's best to avoid ISP abuse reports and criminal charges, by not annoying the target network administrators in the first place. Chapter 1 provides a number of practical suggestions on just how to do that.
A complaint against Nmap it that is has often been blamed for crashing systems. Chapter 1 shows that the reality is that Nmap will rarely be the primary cause of a system crash. The truth is that many of the systems that crashed as a result of an Nmap scan were likely unstable from the outset, and Nmap either pushed them over the top or they coincidentally crashed at the same time as the Nmap scan.
An ironic incident detailed in chapter 3 is when someone from the information security department of Target Corp. complained to the author that he felt the Nmap documentation was particularly directed at his organization; given the use of the term target. He requested that the Nmap documentation be changed from targetto example. The section on target enumeration in the book shows the author did not take that request to heart.
Another example of where the book goes beyond what is in the reference guide is where the author shows the most valuable TCP ports via his probe of tens of millions of IP addresses across the internet. Not surprisingly, ports 80 23 and 443 were the top three most commonly open TCP ports. It is surprising that other ports, which should have been secured long ago, are still as vulnerable as ever.
For the serious Nmap user, the book is worth purchasing just for the indispensable information in chapter 16, which is about optimizing Nmap performance. The author writes that one of his highest priorities in the creation of Nmap has been performance. Nmap uses parallelism and numerous advanced algorithms to execute its blazingly fast scans. This chapter shows how to create Nmap commands to obtain only the information you care about and significantly sped up the scan. The chapter details numerous scan time reduction techniques, and strategies on how to deal with long scans. The chapter concludes with the output of a user who, with a customized Nmap command, was able to reduce his scan of a 676,352 IP address network from nearly a week to 46 hours.
Chapter 10 is also a fascinating chapter on the topic of detection and subverting of firewalls and IDS. The function of such tests on an internal network is to help an organization understand the dangers and risks of a real attack. Since it is not uncommon for firewalls to be accidentally misconfigured, or have rule bases that leak from far too many rules; such a test can be quite useful to any network.
Nmap Network Scanning: The Official Nmap Project Guide to Network Discovery and Security Scanning is the guide for anyone who wants to get more out of Nmap. It is useful whether one is a novice and only getting into basic security testing, or an advanced user looking for ways to optimize Nmap.
The book takes a real-world approach on how to use the tool and clearly documents every Nmap feature and option. It also shows how the tool should be correctly used in various settings.
What is unique about is that this is a rare book in which the creator of the program wrote it. Linus Torvalds never got around to writing a Linux reference, nor did the creators of the Check Point firewall. In Nmap Network Scanning, the reader gets the story from the creator of the code itself. This then is the ultimate Nmap reference guide.
Aside from the history and use of the program in the first chapter, the rest of the book is an extreme guide to maximizing the use of Nmap. It is written by a programmer and written for the technically astute. Anyone who wants to maximize their use of Nmap will find no better reference.
Ben Rothke manages the Bright Hub Enterprise Security channel and is the author of Computer Security: 20 Things Every Employee Should Know.
You can purchase Nmap Network Scanning: The Official Nmap Project Guide to Network Discovery and Security Scanning from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Target (Score:5, Funny)
An ironic incident detailed in chapter 3 is when someone from the information security department of Target Corp. complained to the author that he felt the Nmap documentation was particularly directed at his organization; given the use of the term target.
He requested that the Nmap documentation be changed from target to walmart
New meaning of the term "malware" (Score:2)
Henceforth to be known as "Wal-Ware".
Re: (Score:1)
Re: (Score:1)
what's this got to do with the book review?
Re: (Score:1)
what's this got to do with the book review?
You've never meet a troll have you?
Amen with the crashed systems. (Score:5, Insightful)
I always roll my eyes when I hear someone complain about nmap "crashing a system". This should be common sense. If the target crashed simply from being nmapped or scanned from the outside - the target is obviously a turd of a system.
Re:Amen with the crashed systems. (Score:5, Funny)
Hey, they spent a long time polishing that turd, and they are damn proud of it!
Re: (Score:1, Funny)
I thought Microsoft just shit^Hpped the first copy that compiled...
Re: (Score:3, Insightful)
I have no other words for this apart from, "What the fuck?"
Re: (Score:2)
Good, its not just me who wondered WTF the point of that rant was...
Re: (Score:2)
I always roll my eyes when I hear someone complain about nmap "crashing a system". This should be common sense. If the target crashed simply from being nmapped or scanned from the outside - the target is obviously a turd of a system.
Hey! Shouldn't that be example is obviously a turd of a system?
Re:Amen with the crashed systems. (Score:5, Interesting)
Happened to me in college at gvsu.edu. They claimed I had crashed several Solaris boxen, and claimed that my Linux box was 'dangerous', and even cut off my network access.
The kicker was the 150 hours of community service I had to put in to pay for the time (of 'computer professionals' who were worth a lot more money than I was) it took to bring them back online.
And to think, I was only trying to map out the campus network and what systems they used for various purposes.
Re:Amen with the crashed systems. (Score:5, Insightful)
The kicker was the 150 hours of community service I had to put in to pay for the time (of 'computer professionals' who were worth a lot more money than I was) it took to bring them back online.
And just think - since most likely all they had to do was reboot the damned things, what you were really putting in your "sweat equity" to pay for was their time to go back and fix their own mistakes, since they obviously hadn't done their jobs right in the first place.
However, this brings up an important rule of thumb: Don't pen test something that you don't have permission to pen test, unless you've accepted that you will be prosecuted if caught. There are a lot of idiot admins out there watching their logs ready to point fingers the moment they see a port scan... not because they're concerned about security, but because "hackers" make excellent scapegoats for incompetent admins.
Re: (Score:1)
Re:Amen with the crashed systems. (Score:5, Insightful)
Somebody at the meeting has some concerns about the viability of the plan. Praise him for voicing those concerns so that they can, if necessary, be addressed? Heck no, tell that whiner that there is no place for negativity among team players.
Nmap crashes the system. Great, we discovered a DOS vulnerability before it could be used against us? Hardly, if that hacker hadn't been hacking none of this trouble would have happened.
I'm not sure how much of this is just laziness: If the problem doesn't show up on my watch it isn't my problem; and how much is actual magical thinking. A disturbing number of people seem to think that optimism actually makes things work, pessimism actually breaks things, negativity actually makes things work, etc. The Secret [thesecret.tv] is perhaps the purest form of this utter nonsense; but slightly milder variants are all over the place.
Re:Amen with the crashed systems. (Score:4, Interesting)
I used to work at a (now defunct) flower company. My office was glass walled, overlooking the entire sales floor. One day I was testing Samba on a small desktop machine. I remember starting up nmbd/smbd. Then moments later, I looked into the sales pit and saw people getting up, the Win95 workstations had begun to bluescreen one by one. I didn't connect the two.
A half hour later everyone has rebooted. In that time I'd turned off Samba to work on something else. I restart Samba on that little machine (it was called Stargate because it would act as a gateway to some shares on a Sun E6500). The moment I press enter, the machines start bluescreening again. I realized just at that moment what happened and immediately shut it down.
Re: (Score:1)
crash (Score:1)
It is a feature.
Re: (Score:3, Insightful)
In college... (Score:3, Informative)
Re: (Score:2)
Re:In college... (Score:4, Funny)
I got jailtime in Germany for trying that. I would not advice it personally.
Re:In college... (Score:5, Informative)
If you are at college, do NOT:
* 'finger' every possible username programmatically. /16
* do a nessus scan on the IT people's servers "just to see"
* nmap the college's
* attempt an infeasible online crack of an admin's password from a computer you've just logged into. in a lab you swiped your own card to get in.
All of these actions will get you noticed, but not in a good way.
love & kisses, your friendly college sysadmin
Re: (Score:2)
As an addendum, an accidental "Net Send" to a domain rather than your buddy will also get you noticed ;)
Re: (Score:2)
As an addendum, an accidental "Net Send" to a domain rather than your buddy will also get you noticed ;)
Heh, I saw that happen in a call centre once. They were a lot less understanding than a college would have been...
Re: (Score:2)
My college doesn't run Windows tyvm.
Re: (Score:1)
Re: (Score:3, Interesting)
Darwin at work. Let them be caught ;)
Re: (Score:3, Funny)
Why didn't I have one of those? I feel so unloved...
Re: (Score:1, Funny)
Bah, that's nothing. I was banned from my middle school library for a year for cleaning the rollers on a ball mouse.
Re: (Score:1)
love & kisses, your friendly college sysadmin
Luckily, my college sysadmin is named HappyNoonFlowerHanderOuter, so I'm not worried ;-)
Re: (Score:2)
Says Mr. MadMidnightBomber...
Re: (Score:2)
I wasn't working at your college. My favourite bit was when I rang up one of the departmental admins and his first words were "shit! how did you know?" (He'd just had a server compromised.)
SPAN port on core routers + snort + p0f = POWER!
Re: (Score:1)
my school's IT department confused my port scanning with that of a virus and subsequently banned me from the network.
Me too. And this was while I was working in the IT department at said school. The guy over in Networking just laughed and put me back on the network.
Then later I got booted again because Google Desktop was being a little too friendly on the network. It only happened that once, so I guess Google updated the program soon after.
Re: (Score:1)
I (a Canadian working for a defunct Cdn software company) was at a US military installation several years ago.
One of the guys from our dev team wanted to show me some new functionality that had been integrated into one of our tools (NMAP). We thought it best that we scan our own domain rather than one of the military domains... it never occurred to us that that just made the situation worse.
A US military site scanning a Cdn web site was bad, two Canadian civilians running the scan from a classified US comp
Re: (Score:2)
eeeeyeah, thats to be expected, as port scanning is a script-kiddies first point of contact to seeing what version/OS the target is using, as well as what apps the target is running, to expose vulnerabilities.
but, you probably already know this
Re: (Score:3, Insightful)
my school's IT department confused my port scanning with that of a virus
At a consulting client once I plugged in my usb thumb drive to transfer a document and the corporate scanning software on their computer detected nmap. It was immediately deleted with a pop-up that screamed "hacking tool detected!" On the one hand I was glad I didn't get escorted out (and not paid) but on the other hand it was rude of them to delete it when they could have just disallowed running it.
Re: (Score:1)
which school was that???
Re:In college... (Score:5, Insightful)
The Internet doesn't work if you need permission to send an IP packet to someone.
Re: (Score:1)
Re: (Score:1)
This is my Internet face >:3
Re: (Score:3, Funny)
Right. Just be nice and set the Evil bit if you're doing anything naughty. Problem solved.
Needs no introduction (Score:4, Informative)
I suspect a lot of slashdot readers are too new, have forgotten, or never learned of Fyodor's slashdot "girlfriend". Long story short -- a dude posted on slashdot, claiming to be a girl. Fyodor tried to hook up with "her" and "she" strung him along for awhile. After discovering "she" had dude parts, Fyodor hacked his computer and posted screenshots.
Re: (Score:2)
Thanks for elaborating, been around slashdot since 2002, never heard of the guy.
Re: (Score:2)
Since '98 here -- me either.
Though I haven't always visited religiously the entire time. (I admit that I may fit into the "have forgotten" category)
Re: (Score:2)
Read the story. Totally justified. Trolls should know better than to meddle in the affairs of dragons.
Re: (Score:1)
That's really one of those one-in-a-million things. Getting trolled like that, Yahoo vuln, open X server on a home *nix box. The stars really aligned.
Re: (Score:1)
No one really cares, nor did they ask about it.
So the question is, why do you feel the need to share that bit of irrelevant information?
Yes, everyone is vulnerable to social engineering.
Is this the best security tool around, heck yes.
Re: (Score:1)
No one really cares about this, except you. The question is, why?
What do you have against Fyodor? Why are you jealous of him?
The is a book about an powerful security tool, can't ya just focus on that?
Re: (Score:1)
wow, what a valuable post.
u must be a reall important person.
Re:Needs no introduction (Score:4, Informative)
link [slashdot.org]
link [slashdot.org]
Re: (Score:3, Informative)
Counter link [slashdot.org].
It all depends on who you trust more.
matrix reloaded (Score:5, Interesting)
while mostly being a steaming pile of shit compared to the original, it attempts to redeem itself by accurately using nmap in one scene
http://www.theregister.co.uk/2003/05/16/matrix_sequel_has_hacker_cred/ [theregister.co.uk]
Re: (Score:3, Informative)
Re: Matrix Reloaded (Score:5, Informative)
I wanted to include a screen shot of Trinity hacking the Matrix with Nmap for this book, but a then-potential publisher said I needed permission from Time Warner first. It took many unanswered requests, but Time Warner finally replied with basically "hell no, you IP pirate!" Of course they phrased it politely like "we would love to allow that, but our policies prohibit us from granting that permission". Funny, they didn't mind using Nmap in their movie without permission, credit, notification, etc. Then they say I can't even include a screen shot of them using Nmap?
So I dumped the potential publisher and added the screen shots anyway (page 8)
-Fyodor
Insecure.Org [insecure.org]
Re: (Score:2)
I am a very occasional (though appreciative!) user of Nmap, but after reading this:
So I dumped the potential publisher and added the screen shots anyway
I immediately bought a copy via the Amazon link. Fyodor, well done, sir!
Re: (Score:2)
All that that journal contains as evidence are circular references?
The only thing that would convince me that a bunch of trolls aren't lying would be a cached (somewhere trusted not www.tollaxor.org/...) pages on insecure.org, showing the boasting.
in otherwords TITS OR GTFO!
Re: (Score:1)
Re: (Score:1, Redundant)
Obligatory link to the Movies featuring Nmap page [nmap.org]. Enjoy.
Re: (Score:2)
while mostly being a steaming pile of shit compared to the original, it attempts to redeem itself by accurately using nmap in one scene
http://www.theregister.co.uk/2003/05/16/matrix_sequel_has_hacker_cred/ [theregister.co.uk]
Trinity didn't use nmap. Seriously, she didn't have the time. The hacking was performed by the original team sent in to do the job. She just executed a simple command on a compromised system.
Just like a manager, they did all the hard work, she took all the credit.
I didn't need WipeOut... (Score:2, Offtopic)
It's not just miles ahead of the competition... (Score:2, Informative)
NMap is the best there is, period. There's not even specialist scanners that can up it's features, especially since you can set packet flags manually in the more recent versions. It really, really fills it's niche. I use it all the time in my daily life just for benign remote service discovery, and I assume many people do too. I've never had anyone complain about it either.
Re: (Score:2)
For the kids following along at home, nc (netcat) can be used similarly.
nc -z 10.2.2.2 22
Connection to 10.2.2.2 22 port [tcp/ssh] succeeded!
Port scanning doesn't work as fast, of course, but then, nmap isn't always available.
Re: (Score:1)
A point is that one of the more useful basic features of NMap, the SYN partial-handshake scan (default when run as root) can't be replicated by nc. It always leaves marks in connect logs. Hping can replicate that feature though: "hping -8 -S known host.com" will SYN scan all ports listed in /etc/services on host.com
Network map? (Score:2, Interesting)
Have they included a network mapping function yet? They announced it as a GSoC project last year I think, did they get around to hack some graphical map output?
Re:Network map? (Score:5, Informative)
Have they included a network mapping function yet? They announced it as a GSoC project last year I think, did they get around to hack some graphical map output?
Good question--and yes, we have! Full details on this feature, including screen shots, are provided in Section 12.5, "Surfing the Network Topology" starting on page 317. That section is also available free online [nmap.org]. The code has been integrated into the latest version (4.76) of Nmap, available here [nmap.org].
-Fyodor
Insecure.Org [insecure.org]
Re: (Score:2)
Re: (Score:2)
Yes, it's called Zenmap [nmap.org].
nmap and IPv6 (Score:4, Interesting)
This is tangentially related, but it sort of fits in with the idea of "cools ways to use nmap" -- or, in this case "things you can't do with nmap".
While setting up a 6to4 tunnel to give my home LAN IPv6 access (just for fun), I decided to use nmap to scan my home IPv6 network. I've used nmap from time to time to portscan, but mostly I use it as a ping scanner, just to find live hosts, so it seemed like a natural way to find out which hosts had picked up IPv6 addresses.
I first tried the obvious syntax "nmap -sP <my subnet prefix>::/64", but nmap told me that slashes are not allowed, and that "IPv6 addresses can currently only be specified individually".
My first reaction was "Well, that's stupid. Why can't nmap handle IPv6 subnets? Idiots". However, a half-second later it occurred to me that I was the idiot: what I thought I wanted nmap to do was to scan 18,446,744,073,709,551,616 addresses. That's obviously impractical. That many requests would saturate a 10 Gbps network for 60,000 years (2^64 128-byte packets).
So, FYI, if you want to find out what hosts are live on your IPv6 network, the way to do it is to ping the link-local multicast address (fe02::1). Assuming they're not firewalled, all of the hosts will answer. Of course, what you'll get back is their link-local addresses, not their routable addresses. I haven't found a convenient way to get a list of those, other than a little sed script to convert the link-local addresses to their equivalents in the subnet.
Re: (Score:2)
why cant nmap do that, then scan each of the hosts that answer?
Re: (Score:2)
Where Is The Chapter Detailing Him Hacking /. User (Score:1)
http://slashdot.org/comments.pl?sid=37682&cid=4037364 [slashdot.org]
http://slashdot.org/~sllort/journal/33255 [slashdot.org]
Re:Where Is The Chapter Detailing Him Hacking /. U (Score:1)
Not perfect behaviour but is that bit of tresspass really that bad? IMHO it's about thirty notches down the "black hat" scale less nasty than spammers that pretend to send things from your email address. I like it as a nice little anecdote to tell people to have decent firewall rules (and not have unsecured MS Windows machines naked to the net).
Re: (Score:1)
and your point is what?
mmm nmap... (Score:1)
Re: (Score:1)
Guns are legal, and much more dangerous than nmap.
So why should nmap be even close to being illegal.
mmm nmap... (Score:1)
nmap is way cool, infact so cool I am surprised it is legal, heh ;P Thank you & kudos to you Fyodor for your expertise and generosity, truly brilliant and inspirational stuff.
Reference guide well written? (Score:2)
How can someone call the reference guide well written, then five sentences later say that the book explains commands not documented elsewhere? Isn't the purpose of the reference guide, manpages, and any other documentation to define _all_ of the commands that are inserted into a program?
Now, I have to question what _else_ has been put into the program that hasn't been documented. Unfortunately, this lends credibility to Fyodor's detractors, and raises questions for me as to whether nmap belongs on my comp
Re: (Score:2, Insightful)
The source is right there for you to read. Also, he's not the only guy working on the project, lots of other people have reviewed the code. Anything fishy would have been caught a long time ago.
Re: (Score:1)
Nmap grew in functionality as a direct result of Google's sponsorship of the program in the summer of code. With those programmers, Fyoder could have never done it on his own. He has said as much and knows that.
All of these criticisms all have their base in people being jealous of Fyodor's success. It is that simple.
Re: (Score:2, Informative)
As to your comment 'How can someone call the reference guide well written, then five sentences later say that the book explains commands not documented elsewhere', there is a difference
between 'undocumented' and 'not documented elsewhere'.
My understanding is undocumented is more of an active attempt to keep under wraps.
Not documented elsewhere is something that someone never got around to writing about.
And as to the comment 'this lends credibility to Fyodor's detractors', since when does he have detractors?
Shameless promotion (Score:1)
Let me add a minor correction to the description:
Re: (Score:1)
Was that shameless meant to be tongue in cheek?
Not sure what is supposed to be shameless.
Re: (Score:2)
It's a troll.
"I was definitely pretty excited when I saw it," says "CmdTaco," the 25-year-old openly gay author of Nmap.
Re: (Score:2)
Well at least it's a new one.
Re: (Score:1)
so what?
what did u do more than that?
maybe that is why a 100 million people use nmap and not yer tool.
Re: (Score:2)
You probably missed the part where NMap is open source.
Re: (Score:1)
Re: (Score:1)
hey, thats that point :)