Contents in Detail
LINUX BASICS FOR HACKERS
Getting Started with Networking, Scripting, and Security in Kali
by OccupyTheWeb
San Francisco
LINUX BASICS FOR HACKERS. Copyright 2019 by OccupyTheWeb.
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.
ISBN-10: 1-59327-855-1
ISBN-13: 978-1-59327-855-7
Publisher: William Pollock
Production Editors: Serena Yang and Meg Sneeringer
Cover Illustration: Josh Ellingson
Interior Design: Octopod Studios
Developmental Editor: Liz Chadwick
Technical Reviewer: Cliff Janzen
Copyeditor: Barton D. Reed
Compositors: Serena Yang and Meg Sneeringer
Proofreader: Paula L. Fleming
Indexer: JoAnne Burek
For information on distribution, translations, or bulk sales, please contact No Starch Press, Inc. directly:
No Starch Press, Inc.
245 8th Street, San Francisco, CA 94103
phone: 1.415.863.9900;
www.nostarch.com
Library of Congress Cataloging-in-Publication Data
Names: OccupyTheWeb, author.
Title: Linux basics for hackers : getting started with networking, scripting,
and security in Kali / OccupyTheWeb.
Description: First edition. | San Francisco : No Starch Press, Inc., [2018].
Identifiers: LCCN 2018030544 (print) | LCCN 2018032646 (ebook) | ISBN
9781593278564 (epub) | ISBN 159327856X (epub) | ISBN 9781593278557 (print)
| ISBN 1593278551 (print) | ISBN 9781593278564 (ebook) | ISBN 159327856X
(ebook)
Subjects: LCSH: Penetration testing (Computer security) | Kali Linux. |
Hackers. | Operating systems (Computers)
Classification: LCC QA76.9.A25 (ebook) | LCC QA76.9.A25 O325 2018 (print) |
DDC 005.8--dc23
LC record available at https://lccn.loc.gov/2018030544
No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
The information in this book is distributed on an As Is basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it.
I dedicate this book to my three incredible daughters.
You mean the world to me.
About the Author
OccupyTheWeb (OTW) is the pseudonym for the founder and primary writer for the hacker and pentester training website, https://www.hackers-arise.com/. He is a former college professor and has over 20 years of experience in the information technology industry. He has trained hackers throughout the US, including branches of the US military (Army, Air Force, and Navy) and the US intelligence community (CIA, NSA, and DNI). He is also an avid mountain biker and snow boarder.
About the Technical Reviewer
Since the early days of Commodore PET and VIC-20, technology has been a constant companion (and sometimes an obsession!) to Cliff Janzen. Cliff discovered his career passion when he moved to information security in 2008 after a decade of IT operations. Since then, Cliff has had the great fortune to work with and learn from some of the best people in the industry including OccupyTheWeb and the fine people at No Starch during the production of this book. He is happily employed as a security consultant, doing everything from policy review to penetration tests. He feels lucky to have a career that is also his favorite hobby and a wife that supports him.
BRIEF CONTENTS
ACKNOWLEDGMENTS
This book could not have been written without the collaboration of several key people.
First, I want to thank and acknowledge Liz Chadwick for proposing this book and being the primary editor of its content. Her persistence and dedication have made this book possible.
Second, I want to acknowledge Bill Pollock, publisher of No Starch Press, for believing in and backing this book.
Third, I want to acknowledge the diligent efforts of my technical reviewer, Cliff Janzen, for making certain the technical content in this book is accurate.
Any remaining errors or omissions are solely my fault.
Finally, I want to thank and acknowledge all the dedicated professionals at No Starch Press for their efforts to bring to book to completion and to market. Thank you.
INTRODUCTION
Hacking is the most important skill set of the 21st century! I dont make that statement lightly. Events in recent years seem to reaffirm this statement with every mornings headline. Nations are spying on each other to gain secrets, cyber criminals are stealing billions of dollars, digital worms demanding ransoms are being released, adversaries are influencing each others elections, and combatants are taking down each others utilities. These are all the work of hackers, and their influence over our increasingly digital world is just beginning to be felt.
I decided to write this book after working with tens of thousands of aspiring hackers through Null-Byte, https://www.hackers-arise.com/, and nearly every branch of the US military and intelligence agencies (NSA, DIA, CIA, and FBI). These experiences have taught me that many aspiring hackers have had little or no experience with Linux, and this lack of experience is the primary barrier to their starting the journey to becoming professional hackers. Almost all the best hacker tools are written in Linux, so some basic Linux skills are a prerequisite to becoming a professional hacker. I have written this book to help aspiring hackers get over this barrier.
Hacking is an elite profession within the IT field. As such, it requires an extensive and detailed understanding of IT concepts and technologies. At the most fundamental level, Linux is a requirement. I strongly suggest you invest time and energy into using and understanding it if you want to make hacking and information security your career.
This book is not intended for the experienced hacker or the experienced Linux admin. Instead, it is intended for those who want to get started along the exciting path of hacking, cybersecurity, and pentesting. It is also intended not as a complete treatise on Linux or hacking but rather a starting point into these worlds. It begins with the essentials of Linux and extends into some basic scripting in both bash and Python. Wherever appropriate, I have tried to use examples from the world of hacking to teach Linux principles.
In this introduction, well look at the growth of ethical hacking for information security, and Ill take you through the process of installing a virtual machine so you can install Kali Linux on your system without disturbing the operating system you are already running.