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

Preface

This book is designed to teach readers how to run Nmap, one of the most powerful network security tools ever created. I'm excited to walk you through learning this tool, as well as the various different elements that come with it—for example, the Nmap Scripting Engine and other tools like Ncat and Ncrack. Throughout this book, we'll be walking through techniques, tips, and tricks to help you learn the essentials of Nmap in a fast and efficient manner!

What this book covers

Chapter 1, Introduction to Nmap, reviews the history of Nmap, what the tool does, when it will be used, how the product evolved, and how to install Nmap on Windows, Linux, and OS X.

Chapter 2, Network Fundamentals, is about how networks work and why a port scanner is important. It overviews TCP, UDP, port scanning, common ports, and service banners.

Chapter 3, Nmap Basics, covers how to run basic or normal Nmap scans without complex flags.

Chapter 4, Advanced Nmap Scans, is about the advanced flags in Nmap that can designate different types of scans.

Chapter 5, Performance Optimization, is about how to optimize timing, parallelism, and so on, in Nmap in order to complete scans efficiently.

Chapter 6, Introduction to the Nmap Scripting Engine, is about the Nmap scripting engine—what it is, how it works, what programming language it uses, and popular Nmap scripts to use.

Chapter 7, Writing Nmap Scripts, teaches the reader how to create a basic Nmap script in Lua.

Chapter 8, Additional Nmap Tools, covers the other tools that come with the Nmap suite—Nrack, Nping, and Ncat.

Chapter 9, Vulnerability Assessments and Tools, explains the relationships between Nmap and other tools commonly used in professional vulnerability assessments.

Chapter 10, Penetration Testing with Metasploit, is about the interaction of Nmap with penetration testing tools such as Metasploit.

What you need for this book

In order to follow along with this book, you need to have a working computer running either Windows, Linux, or Mac OS X. We'll be installing Nmap and VirtualBox as part of running through this book; these are two free pieces of software that can help us run network scans. Additionally, an Internet or local network connection is valuable for trying out scans.

Who this book is for

This book is aimed at beginners who have experience as a system administrator or of network engineering, and wish to get started with Nmap. Advanced users can use this book as a reference, or to understand when certain key aspects of the software should be used.

The style and approach of this book is like an easy-to-follow guide full of real-world examples that demonstrate how and when to use different aspects of the Nmap suite. Clear and concise writing makes this introductory-level book an ideal guide to start with. Each topic covers examples from the real world, enabling the reader to easily progress from an Nmap beginner to an advanced user.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "If you want to make Nmap less verbose than normal, you can also use the --reduce-verbosity flag."

A block of code is set as follows:

  action = function(host, port)
  local robots = http.get(host, port, "/robots.txt")

  if robots.status == 200 then
    return "robots.txt status 200"
  else
    return "robots.txt status: " .. robots.status
  end
  end

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Once the scan is completed, clicking on Vulnerabilities shows the current list of vulnerabilities detected on the target scope."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.