Sagar Rahalkar
Quick Start Guide to Penetration Testing With NMAP, OpenVAS and Metasploit
Sagar Rahalkar
Pune, Maharashtra, India
Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the books product page, located at www.apress.com/978-1-4842-4269-8 . For more detailed information, please visit www.apress.com/source-code .
ISBN 978-1-4842-4269-8 e-ISBN 978-1-4842-4270-4
https://doi.org/10.1007/978-1-4842-4270-4
Library of Congress Control Number: 2018964909
Sagar Rahalkar 2019
Standard Apress
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
Introduction
Vulnerability assessment and penetration testing have become very important, especially in the past couple of years. Organizations often have complex networks of assets storing sensitive data, and such assets are exposed to potential threats from the inside as well as from the outside. To get an overview of the security posture of an organization, conducting a vulnerability assessment is an essential step. Performing penetration tests requires a well-planned and methodical approach.
To help you perform various tasks across the phases of the penetration testing lifecycle, there are tons of tools, scripts, and utilities available. Linux distributions such as Kali Linux even provide bundled tools to perform these tasks.
It is natural to get overwhelmed with the number of tools available. However, there are a few tools that are so powerful and flexible that they alone can perform most of the tasks across the phases of the penetration testing lifecycle.
This book will get you started with the fundamentals of three such tools: NMAP, OpenVAS, and Metasploit. Just by using these three tools alone, you will acquire extensive penetration testing capabilities.
By the end of this book, youll have a substantial understanding of NMAP, OpenVAS, and Metasploit and will be able to apply your skills in real-world pen testing scenarios.
Table of Contents
About the Author and About the Technical Reviewer
About the Author
Sagar Rahalkar
is a seasoned information security professional with 11 years of comprehensive experience in the various verticals of information security. His domain expertise is in cybercrime investigations, digital forensics, application security, vulnerability assessment and penetration testing, compliance for mandates and regulations, and IT CRC. He has a masters degree in computer science and several industry-recognized certifications such as Certified Cyber Crime Investigator, Certified Ethical Hacker, Certified Security Analyst, ISO 27001 Lead Auditor, IBM Certified Specialist Rational AppScan, Certified Information Security Manager (CISM), and PRINCE2, to name a few. He has been closely associated with Indian law enforcement agencies for more than four years, dealing with digital crime investigations and related trainings for officers, and has received several awards and appreciations from senior officials in police and defense organizations in India. He is the author of several books and articles on information security.
About the Technical Reviewer
Sanjib Sinha
is a certified .NET Windows and web developer, specializing in Python, security programming, and PHP; he won Microsofts Community Contributor Award in 2011. As a published author, his books include Beginning Ethical Hacking with Python and Beginning Laravel , published by Apress.
Sagar Rahalkar 2019
Sagar Rahalkar Quick Start Guide to Penetration Testing https://doi.org/10.1007/978-1-4842-4270-4_1
1. Introduction to NMAP
Sagar Rahalkar
(1)
Pune, Maharashtra, India
Vulnerability assessment and penetration testing have gained high importance especially in the last couple of years. Organizations often have a complex network of assets storing sensitive data. Such assets are exposed to potential threats from inside as well as from outside the organization. To get an overview of the security posture of the organization, conducting a vulnerability assessment is essential.
It is important to understand the clear difference between vulnerability assessments and penetration testing . To understand this difference, lets consider a real-world scenario. You notice that your neighbors door isnt locked properly, and the neighbor is not at home. This is a vulnerability assessment. Now if you actually open the neighbors door and enter the house, then that is a penetration test. In an information security context, you may notice that the SSH service is running with weak credentials; this is part of a vulnerability assessment. If you actually use those credentials to gain access, then it is a penetration test. Vulnerability assessments are often safe to perform, while penetration tests, if not performed in a controlled way, can cause serious damage on the target systems.
Thus, a vulnerability assessment is one of the essential prerequisites for conducting a penetration test. Unless you know what vulnerabilities exist on the target system, you wont be able to exploit them.
Performing penetration tests requires a well-planned and methodological approach. It is a multistep process. The following are some of the phases of penetration testing: