Learn Ethical Hacking
from Scratch
Your stepping stone to penetration testing
Zaid Sabih
BIRMINGHAM - MUMBAI
Learn Ethical Hacking from Scratch
Copyright 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Vijin Boricha
Acquisition Editor: Namrata Patil
Content Development Editor: Sneha Gonsalves
Technical Editor: Nilesh Sawakhande
Copy Editor: Safis Editing
Project Coordinator: Namrata Swetta
Proofreader: Safis Editing
Indexer: Tejal Daruwale Soni
Graphics: Jisha Chirayil
Production Coordinator: Aparna Bhagat
First published: July 2018
Production reference: 1310718
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78862-205-9
www.packtpub.com
To my mother, Sanaa Abbas, and my father, Sabeeh Al Quraishi, for their sacrifices and
for exemplifying the power of determination.
Zaid Al Quraishi
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
PacktPub.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details.
At www.PacktPub.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Zaid Sabih is an ethical hacker, a computer scientist, and the founder and CTO of zSecurity. He has good experience in ethical hacking; he started working as a pentester with iSecurity. In 2013, he started teaching his first network hacking course; this course received amazing feedback, leading him to publish a number of online ethical hacking courses, each focusing on a specific topic, all of which are dominating the ethical hacking topic on Udemy. Now Zaid has more than 300,000 students on Udemy and other teaching platforms, such as StackSocial, StackSkills, and zSecurity.
I want to thank the people who have been close to me and supported me, especially my parents.
Packt is searching for authors like you
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Table of Contents
Preface
This book is intended for anyone who wants to learn how to perform hacking/penetration testing. It is designed to start from scratch, assuming no prior knowledge, and takes you all the way to a strong intermediate level in the subject. The book is highly practical but it will not neglect the theory . It starts with some basic terminology; then you'll learn how to set up a penetration-testing lab and install all the necessary software. The remainder of the book is divided into a number of sections, each covering a penetration testing fieldfrom networks, servers, and websites to client-side attacks and social engineering. In each of these sections, you'll learn how a target system works, the weaknesses in the system, how to exploit those weaknesses and hack the system, and how to secure the system from the discussed weaknesses. By the end of the book, you'll have a strong base and a good understanding of hacking/penetration testing, so you'll be able to combine the techniques shown and tailor them to suit different scenarios.
Who this book is for
This book starts from scratch, assuming the reader has no prior knowledge of hacking/penetration testing. Therefore, it is for anybody who is interested in learning how to hack or test the security of systems like real hackers and secure them like security experts.
What this book covers
Chapter 1 , Introduction, discusses the concept of ethical hacking and also covers basic information about the different fields of penetration testing.
, Setting Up a Lab, looks at setting up a lab and installing all the software that is needed in order to get started with penetration testing. We are going to discuss this because, all through this book, we are going to learn about launching attacks on our system by creating a virtual environment in it.
, Linux Basics , walks you through the Kali Linux environment so that you become familiar with the virtual framework. We will be learning some basic commands, as well as looking at the installation and updating of software.
, Network Penetration Testing , will cover the basics of what we mean by a network and will examine the various types of network. Also, we will discuss a few terminologies related to networks.
, Pre-Connection Attacks , will discuss wireless cards. Then we will learn how to gather information about networks and computers, and we'll learn how to launch attacks, such as controlling connections without having the credentials of the target. We will learn how to capture information about victims by creating fake access points to which the targets will be connected.
, Network Penetration Testing Gaining Access , demonstrates how we can crack the key and gain access to our target by using all the information that we have gathered about the victim. This chapter we will also teach you how to crack WEP/WPA/WPA2 encryptions.