Book Image

NMAP Essentials

By : David Shaw
Book Image

NMAP Essentials

By: David Shaw

Overview of this book

Table of Contents (17 chapters)
Nmap Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Port scanning


Nmap is a port scanner, but we haven't yet covered what a port actually is. As the name somewhat implies, a port is a way to access a networked service on a computer. Each computer has 65,535 ports that can be either open, or closed at any time. Some services such as HTTP (that serves web pages) or FTP (that allows file transfer) have ports that are associated with them by default. HTTP runs on port 80, FTP runs on port 21, and so on. There are huge lists of commonly used ports that we can reference later—fortunately for us, Nmap has these lists included with its distribution package.

One way to conceptualize a port is to think about an apartment building. In this analogy, one apartment building would be an IP address—each apartment within the building would be a different port. In this case, the building would have to have 65,535 apartments—quite a big property!

When you visit an IP address, it's just like delivering a pizza to the apartment building; you know where it is in...