This section covers the basics of hacking by discussing the concepts of penetration testing and its value in combating cyber threats. In addition, the reader will learn how to build their own penetration testing lab filled with various operating systems to practice and sharpen their skill set.
Cybersecurity is one of the most rapidly growing fields in information technology. Every day, numerous attacks are executed against various entities, from individuals to large enterprises and even governments. Due to these threats in the digital world, new professions are being created within organizations for people who can protect assets. This book aims to give you the knowledge and techniques that an aspiring penetration tester needs in order to enter the field of cybersecurity. A penetration tester is a professional who has the skills of a hacker; they are hired by an organization to perform simulations of real-world attacks on their network infrastructure with the objective of discovering security vulnerabilities before a real attack occurs. The penetration tester does this task with written legal permission from the target organization. To become a highly skilled hacker, it's vital to have a strong understanding of computers, networking, and programming, as well as how they work together. Most importantly, however, you need creativity. Creative thinking allows a person to think outside the box and go beyond the intended uses of technologies and find exciting new ways to implement them, doing things with them that were never intended by their developers. In some ways, hackers are artists.
Throughout this book, we will be using one of the most popular operating systems for penetration testing, Kali Linux. The Kali Linux operating system has hundreds of tools and utilities designed to assist you during a vulnerability assessment, penetration test, or even a digital forensics investigation in the field of cybersecurity. We will use Kali Linux to take you through various topics using a student-centric approach, filled with a lot of hands-on exercises starting from beginner level to intermediate to more advanced topics and techniques.
In this chapter, you will become acquainted with what hackers are and how they can be classified based on motivations and actions. You'll learn important terminology and look at methods and approaches that will help you throughout this book and set you on your path to becoming a penetration tester. You'll be introduced to the workflow of a hack as well.
In this chapter, we will look at the following topics:
- Who is a hacker?
- Key terminology
- Penetration testing phases
- Penetration testing methodologies
- Penetration testing approaches
- Types of penetration testing
- Hacking phases
Hacker, hack, and hacking are terms that have become ubiquitous in the 21st century. You've probably heard about life hacks, business hacks, and so on. While these may be, in some sense of the word, forms of hacking, the traditional form of hacking we'll discuss in this book is computer hacking. Computer hacking is the art of using computer-based technologies in ways they were never intended to be used to get them to do something unanticipated.
Hacking has taken on many different names and forms throughout the years. In the late 20th century, a common form of hacking was known as phreaking, which abused weaknesses in analog phone systems. Computer hacking has been around for more than half a century and, over the past few decades, has become a pop culture sensation in Hollywood movies and on television shows. It's all over the news, almost daily. You hear about things such as the Equifax, NHS, and Home Depot data breaches all the time. If you're reading this book, you have made your first step toward better understanding this fringe form of engineering.
Now that we have a better idea of what a hacker is, let's explore the various classifications of hackers.
Hacking has many varieties or flavors, and so there are many classifications for hackers. In this section, we'll explore the various types of hackers, including the activities, skill sets, and values associated with each.
The following are the different types of hackers:
- Black hat
- White hat
- Gray hat
- Suicide
- State-sponsored
- Script kiddie
- Cyber terrorist
At the end of this section, you will be able to compare and contrast each type of hacker.
Black hat hackers typically have a strong understanding of systems, networks, and application programming, which they use for malicious and/or criminal purposes. This type of hacker typically has a deep understanding of evasion and indemnification tactics, which they use to avoid imprisonment as a result of their actions.
They understand the common tools and tactics used by highly skilled ethical hackers. Hackers caught performing criminal hacking are usually blacklisted from ethical hacking, thus losing the ability to get employment as an ethical hacker.
Now that you have a better understanding of black hat hackers, let's take a look at another typeâone that follows ethical practices and helps others: the white hat hacker.
White hat hackers, like black hat hackers, possess a strong understanding of systems, networks, and application programming. However, unlike black hats, they use their knowledge and skills to test systems, applications, and networks for security vulnerabilities. This testing is conducted with the permission of the target and is used to find weaknesses in security before unethical hackers exploit them. The motivation to safeguard systems and entities, while staying within the confines of the law and ethics, leads to white hats being called ethical hackers.
Like black hats, they possess a solid knowledge of hacking tools, attack vectors, and tactics used in the exploitation and discovery of vulnerabilities. They also need to think like black hats when testing and, therefore, must use creativity to imagine themselves in the shoes of those they wish to combat. Ethical or white hat hacking is the most common form of hacking and the focus of this book.
Now that we understand the difference between a white hat hacker and a black hat hacker, let's move on to a type of hacker who looks for vulnerabilities while inhabiting an ambiguous or gray area between ethical and unethical hacking: the gray hat hacker.
Gray hat hackers are similar to white hats but often conduct vulnerability research on their own, and then disclose these vulnerabilities to force vendors to remediate the issue by issuing a software patch. Their skills typically have a heavier emphasis on vulnerability research tactics, such as fuzzing, debugging, and reverse engineering.
At times, being a gray hat can be difficult as the balance and definition of ethical and unethical actions keep changing. Despite the difficult place that they occupy in the community, they share valuable information about security flaws, and are therefore important members of the cybersecurity community.
The next type of hacker uses unethical means to break into systems but does not do so for personal profit like a black hatâthis type of hacker is the suicide hacker.
Suicide hackers are typically less-skilled hackers who are just about capable enough to gain access to systems but are not able to evade detection. These hackers have no concern for being caught or imprisonedâthey are happy as long as they succeed in entering and disrupting a system. Their actions are motivated by revenge, political ideologies, and so on. This type of hacker doesn't care whether they are caught or arrested, so long as the job is done.
Next, we'll take a look at hackers that work on behalf of or within governments.
The state-sponsored hacker is usually employed by a national government to spy and launch cyberattacks against another nation. These hackers have dominated conversations about hacking in society.
This type of hacker enjoys access to all the tools and resources provided by the state, as well as protection from prosecution in order to execute their duties effectively.
However, not everyone has access to the cybersecurit...