Docsity

Hacking with Kali Linux: A Guide to Ethical Hacking, Dispense di Information Technology Management

Toggle sidebar
bg1
Chapter 1: The Different Types of Hackers
The first thing that we need to take a look at here in this guidebook is the
different types of hackers. Often, when we hear about a hacker, we think of
someone who is trying to get onto a system, usually one they have no right
to access and stealing identities, personal information, and more things that
they should not have control over. But there are actually a few different
types of hackers out there.
The first type is someone who likes to try and get onto systems where they
are not allowed. Usually, this is for their own purposes, and they are not
concerned about how this will negatively affect the other person. For
example, these kinds of hackers are likely to get onto a database for
business and steal names, addresses, phone numbers, and credit card
information of those who have shopped at that store.
But this is just one kind of hacker that is out there. They get the most
attention because they are the ones who cause the most damage, but there
are two other types of hackers that we need to discuss as well. For example,
one type of hacker may try to get onto a system that they do not have access
to, but they are not doing this to cause harm. Instead, they do this to show
some of the weaknesses in that system or because they are bored and want
to see if they can actually succeed with it.
Then there are actually those hackers who do the hacking legally. They
have permission to be on the system, and they hack through it to see where
the vulnerabilities are. They are often hired by the organization they are
hacking, either as a fulltime staff or as a freelance worker, to help them
protect against actual bad hackers and keep the information safe.
Even though there are different motivations behind the three types of
hacking, they will all use some of the same techniques to get the job done.
We are going to focus our work with the last type of hacker, looking at how
you can perform and protect against a variety of attacks, but the same kinds
of methods can be used with someone who has malicious intent on the
system. With this in mind, let’s dive a bit more into the three types of
hacking, including the black hat hacker, the gray hat hacker, and the white
hat hacker, and see how each one of these is a bit different.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c

Anteprima parziale del testo

Scarica Hacking with Kali Linux: A Guide to Ethical Hacking e più Dispense in PDF di Information Technology Management solo su Docsity!

Chapter 1: The Different Types of Hackers

The first thing that we need to take a look at here in this guidebook is the different types of hackers. Often, when we hear about a hacker, we think of someone who is trying to get onto a system, usually one they have no right to access and stealing identities, personal information, and more things that they should not have control over. But there are actually a few different types of hackers out there.

The first type is someone who likes to try and get onto systems where they are not allowed. Usually, this is for their own purposes, and they are not concerned about how this will negatively affect the other person. For example, these kinds of hackers are likely to get onto a database for business and steal names, addresses, phone numbers, and credit card information of those who have shopped at that store.

But this is just one kind of hacker that is out there. They get the most attention because they are the ones who cause the most damage, but there are two other types of hackers that we need to discuss as well. For example, one type of hacker may try to get onto a system that they do not have access to, but they are not doing this to cause harm. Instead, they do this to show some of the weaknesses in that system or because they are bored and want to see if they can actually succeed with it.

Then there are actually those hackers who do the hacking legally. They have permission to be on the system, and they hack through it to see where the vulnerabilities are. They are often hired by the organization they are hacking, either as a fulltime staff or as a freelance worker, to help them protect against actual bad hackers and keep the information safe.

Even though there are different motivations behind the three types of hacking, they will all use some of the same techniques to get the job done. We are going to focus our work with the last type of hacker, looking at how you can perform and protect against a variety of attacks, but the same kinds of methods can be used with someone who has malicious intent on the system. With this in mind, let’s dive a bit more into the three types of hacking, including the black hat hacker, the gray hat hacker, and the white hat hacker, and see how each one of these is a bit different.

The Black Hat Hacker

The first type of hacker that we are going to take a look at is the black hat hacker. This is the kind that is going to be heard in the news the most, the one that we think about when we hear about hacking in the first place. A black hat hacker is going to be someone who searches around for vulnerabilities in a security system and then will exploit them. The exploitation often occurs for either financial gain or some other kind of malicious reason.

These people are not usually worried about the harm that they cause to other people. They will want to gather this information to use for their own needs at some point. Often, this is done so that they can steal money and make themselves rich before disappearing without a trace. They have no wish to make things safe for others. They just worry about their own benefits and how this process can help them in some manner.

Depending on how far into the system the black hat hacker can get, they have the potential to inflict some major damage on the individual users of that computer, the shoppers at that store, and the organization itself. They can really work hard to steal personal financial information, compromise the security that we see in the major systems, and even shut down or alter some of the functioning of networks and websites.

These kinds of hackers can range from those who are teenage amateurs who want to spread a virus across the computer all the way to networks of criminals who have the goal of stealing numbers on credit cards and other important financial information.

There are a lot of different methods that the black hat hacker is able to utilize, and these can be similar to what we will find with the gray hat and the white hat hackers as well. For example, the activities that a black hat hacker may rely on could include something like adding keystroke monitoring programs to a system to steal data or even launching a whole attack that can disable a whole website, and keep people from accessing it at all while they steal the information.

Sometimes, these malicious hackers are going to employ methods that are not on the computer in order to obtain the information that they need. For

The hacker did not get on to steal money, cause chaos, and steal all of the personal information from the users. They got on to show the public that there is some kind of vulnerability that is in the system, in the hopes that this will alert others to make smarter decisions, and even for some changes to occur.

Sometimes, this information can go wrong, though. If the gray hat hacker announces that they found the vulnerability and the company does not work to change this issue and fix it, it is possible that black hat hackers can get through this vulnerability and use it for their own needs as well. This can cause a lot of damage and issues to the company as they suffer more attacks and have to deal with the fallout.

Technically, the work that is done by the gray hat hacker is going to be seen as illegal. They still did not have the permission that they needed to complete the hack that they did, and this makes it something that they shouldn’t have been doing in the first place. But since they were able to alert the public to a problem in a system that they may have been using, or because they alerted the business of a potential problem ahead of time, before other hackers got there, often they may not face as much punishment as some of the black hat hackers who will use this to help themselves get money or information or something else for personal gain.

There are many examples where a gray hat hacker was able to get onto a system and then alerted the company about these vulnerabilities. They may have even explained exactly how they did it and how they would be able to fix it. Some of these have been able to get prominent positions in these companies, helping to close up the vulnerabilities a bit, and then keeping the system and the network as much as possible.

The White Hat Hacker

The third type of hacker that we need to look at is going to be a professional in computer security who will break into a system that is protected and other networks in order to test and then assess the security. These are going to often work for the company they are trying to break into, with the goal of checking that all the vulnerabilities are taken care of and that no other hacker is able to get onto that system.

These hackers are going to use their hacking skills to help improve security by exposing any vulnerabilities that are there before a malicious hacker or the black hat hacker can find these and exploit them for their own needs. Although the methods that are used with this are going to be similar and often identical to those that a black hat hacker will use, the white hat hackers have permission to get onto the system and employ these tactics to get the job done. These hackers also have the intention of protecting the information on the system rather than exploiting them.

When it comes to a white hat hacker, these are the ones who are seen using their skills in a manner that will benefit society. They could be reformed black hat hackers in some cases, or they could just be well-versed in the techniques and methods that hackers use. Companies often hire these individuals to do tests and to implement best practices to help them keep malicious hacking to a minimum and to ensure they are not as vulnerable as before.

For the most part, a white hat hacker is going to be synonymous with an ethical hacker. They will do the work to help out a business and to make sure that any potential vulnerabilities and issues are taken care of in a timely manner rather than letting a black hat hacker onto the system to cause a mess.

The white-hat hacker is often someone who has gone to a degree of schooling in order to learn a lot about computer systems and how they work. The other two types of hackers are going to spend their time learning computers and are often self-taught with the work that they have. Some may have a degree in IT or computers in some form, but most just had an interest in this kind of system and then worked on honing their skills through practice.

With the white hat hacker, these are professionals who spent quite a few times working with computers, computer technologies, and more and would have learned about hacking in the process. This allows them to be prepared for handling the large networks and systems for companies and protecting them as much as they can. These professionals don’t do the work of hacking in order to cause mischief or to work on their own personal gain. They do it as part of their job to keep companies and the customers who work with these companies as safe as possible from other hackers.

Chapter 2: The Basics of the Hacking Process

Many beginners don’t understand that hacking or any kind of penetration testing will follow a process that is very logical. They assume that they just get lucky when they can find a vulnerability in the system and that it is not worth their time to learn a process. But in reality, the hacking process is actually pretty logical, and we can break it down into tasks and goals that we are meant to follow in order to get things done.

Like all of the other IT or security projects that you want to work with, an ethical hacking plan is going to be something that we need to create in advance. Issues of strategy and tactics in ethical hacking need to be determined and agreed on ahead of time. To ensure that you see some success with the efforts that you are using, you also have to spend some time planning things out ahead of time. No matter what kind of process you are working on, this plan can be important.

It is important to notice the steps that are needed when a hacker is ready to begin working against their target. These steps are going to be similar whether they are working with a target that they know or someone they have no knowledge of, whether this is an individual, or they are more interested in attacking a large company and all of the personal information that is inside. These steps will ensure that we are able to handle all of the different parts that come with a hacking attack. All hackers will follow some form of these to help them get started.

There are five main steps that we need to take a look at when it comes to some of the basics of the hacking process. These are going to include:

Reconnaissance

The first phase of the hacking process that we are going to look at is known as reconnaissance. For us to be able to collect as much data as we can, this process can be used. Since all of the information and the data that we can collect during this time can be useful to us when we get to the later phases, this is often seen as the most important phase of them all.

Of course, some people think this phrase is boring. It doesn’t involve some of the more advanced techniques, and it will include you just sitting around

and watching the system to see what information is going to show up on the system and how you can use this later on. There are also a lot of tools and techniques that you are able to use to help out with this phase, and some of them are free to use depending on your own needs.

Within this phase, there are going to be two types of reconnaissance that we are able to work with. The first kind is passive reconnaissance. When we are working with the passive form, we are going to get on the system, but our interaction will not be direct with the target system. For instance, when we check and look around the company’s website, we like to target or if we like to see the job hirings in that specific company.

During this phase, we want to do a quick search on Google and look through some of the public records, including those on WHOIS, to help us get to gather data of the company we like to target as well as their website and such. Now, all of the techniques we use are not going to include direct interaction with the target company itself. It is mostly just research done on the company for now. These examples will be referred to as passive reconnaissance.

The scope of what we are going to gather during this phase is not going to include just the systems, servers, and hosts. But we can also use it to include some of the clients of our target system and the employees that we think we can use for our goals. Social engineering could then help us collect more data from the employees. Social engineering is going to be a technique that a hacker can use to manipulate a person to give any data that they don’t usually give out.

The hacker hopes that with the help of social engineering, they will be able to fool the other person into giving up some personal information. They may even ask for information like the username and password of the employee so that they can get onto the system when they are ready.

Another example of what can be done with this process is known as dumpster diving. This is a place where we are going to look through different means to figure out important information. It can include going through the trash, but sometimes, just gaining access to some websites, the desk of employees, and more can help us to get the ATM slips, phone numbers, and bank statements that we are looking for.

the company uses and what types of devices are on that network, to name a few things we can look up.

You will notice with this phase that the scanning is going to be more active than before, but the good news is that we can also use the other passive forms of scanning. So, when determining the type of operating system being used, we can send some network traffic to the systems. The response that we get from the operating system to that traffic will vary based on the kind of system in place.

All of the operating systems are going to respond to the traffic that is sent through in different manners. This means that a computer with the Windows operating system is going to respond to any traffic that is sent through in a different manner compared to a Linux computer and a Mac computer. And the same can be said to all of the other operating systems as well.

One example that we are able to take a look at when it comes to scanning passively is sniffing out the traffic on the network. We can work with a few tools for this, but Wireshark is a great option to help us sniff out the network traffic. Knowing the whole network infrastructure will be easier as a result of this phase.

From here, we are able to work on making sense of some of the data that we have collected in this phase, as well as in the first phase. Then we are able to convert all of the data into useful information. This is a great thing to work with because it provides us with a blueprint of what is going on in the entire network we are on.

Gaining Access

Now that we have had some time to gather a bit of information on the target system that we want to work with, and we have been able to add in a bit more activity and look at how to scan some of the networks to get a good blueprint, it is time to work on the third step of gaining access. This is actually the phase where some of the real hacking is going to take place.

When we are in this phase, we are going to try to get into the target system and see how we can use the vulnerabilities that we were able to use during the scanning phase. Figuring out a good path that will help us, the attacker,

to get into the infrastructure of the network is important so that we can take control over the whole thing.

There are a variety of methods that we can see in order to gain the access that we want to the network. And it is likely that you will have to use at least a few before you are able to gain that access. We can get access through the network, through a vulnerability in an application that is on that network, or even through the specific operating system that is on the network.

When we are in the gaining access phase of this process, there are also a few different methods that can help us reach our goals. We can do something like a denial of service attack or session hijacking in some cases. The denial of service attack or DOS on a system is a good option to work with because it will expose some of the hidden vulnerabilities that show up in the system.

As soon as we are able to find at least one vulnerability, but hopefully more, you are then able to use these to help us gain access to the system. This can take some time, especially if there is a white-hat hacker working for the company and trying to keep other people out of the system. But once we have gained the access that we want to the system, we are doing with this phase of the process with hacking.

Gaining access is a part that can take us some time in order to get things done. We want to use some of the different parts that we discussed earlier, the information that we were able to discover and learn about the business and the network, and then gain access. Remember that with this one, the best place to get in is to look for those vulnerabilities and focus on how we can exploit some of those for our needs.

Many systems have some kind of vulnerability that happens to them. But sometimes, it takes time to find them. It could be a vulnerability that shows up in the operating system or another piece of hardware or software that the network is using. Sometimes, it is going to be by finding a port that is not closed off and monitored the way that it should. But often, the way that you find a vulnerability and exploit it is through human error.

system and what they are doing there. We can watch the network traffic that is coming in and causing problems. And we can even work on adding in a keyboard logger so that we can learn the passwords and usernames to get onto more of the system.

There are a lot of benefits that the hacker is able to get when they work with continuous access to the network. These benefits could include data manipulation and monitoring of the network for a long time, which include additional time in launching some added attacks in the process.

The overall goal here is for you to stay on the system for as long as you can. The quieter you are here, and the better you are at doing the hacking, the easier it is going to be for you to stay put and not get noticed. Be more of an observer in the beginning, at least until your attack is made. It is unlikely that even with a vulnerability present that the target network doesn’t have anything on it to help keep things protected and safe. If you make the wrong move and aren’t careful before your attack, it is likely that something on the network will find you and your access and your control will be lost.

Clearing the Tracks

And now, we are in the last phase of hacking at this point. This phase is going to include clearing or covering our tracks. The network’s IT professionals should not notice that the hackers are on their system. That should be the hacker’s main goal. If we have done anything malicious to the network or system, we should try to hide it.

The reason is that we, as the hacker, can still continue and maintain access on the network if no one notices what we have done. Since no one has caught or noticed the attack, we will not be pushed out of the system and can still have access in the future. The more subtle that you can be and the less noise that you make in the process, the better it is for you overall.

The hacker should also ensure to cover up their tracks on the system by overwriting, destroying, or deleting any logs that may document their activities in the system. This ensures so that no one is able to take a look at the logs later on and notice that there is some strange activity going on, or a system that should not be present causing issues.

It is so important that you go out and clear your tracks when you are all done with your work. Leaving anything behind when you are done may seem like a good idea, but remember that other hackers, such as the white hat hackers who work for the company, are often going to be looking around. You may have beaten them to that vulnerability and made it onto the system, but, at some point, they are going to find it and can use that to find you as well.

Clearing out your tracks helps to end the process and makes it easier for you to not get caught. There is a level of anonymity that is present in this kind of hacking. But as soon as someone finds you and figures out what you are doing, they can trace you down and even cut out that access point you had in the first place, and neither of these things is good for you and any of the hacking that you want to do.

And these are the basic parts that come with the hacking process. The goal is to get onto the system as secretly and quietly as possible, with the hopes that no one is going to notice that you are there or cause a stir because they see something strange going on. If you are able to get through the five steps that are above, it is much easier to gain the access that you want to a system, and then you can complete the attack that you want to do.

  1. A minimum of 4 GB Pendrive
  2. At least a Dual Core in your system, either AMD or Intel, works well for this, and the RAM must be a minimum of 1 GB.
  3. The latest version of Kali Linux
  4. Rufus
  5. And patience to get it all done.

To begin, we will know how to use the Windows 10 program in doing a Dual Boot of Kali Linux v2019.2. The first step is to download the latest ISO file of Kali Linux. You will be able to get this by visiting kali.org. You can choose whether you would like to download the 32 bit or the 64 bit while you are there. After Kali Linux has had some time to download, the next step is for us to create our own bootable USB. For this, we need to work with the Rufus extension. This is a utility that can help us to create these USB flash drives that are bootable. Go to Rufus.ie to download the extension before installing it in the system.

With these two items on your computer, we want to start by making a bootable USB. First, connect the USB that we want to use. As we said above, this needs to have at least 4 GB of memory in order to work and have enough space to handle the Rufus extension and the Kali Linux. When the USB is inside the computer, we can run Rufus and use the steps below in creating a bootable USB drive.

  1. First, an image will show up on the screen about the Rufus program that you are running.
  2. Check that the USB drive is the one selected on there, then click on the small drive icon for the CD.
  3. Locate the ISO file for Kali Linux that we downloaded earlier and then click on Start. Give this process a few minutes to complete before moving on.
  4. After the process is complete, you can click on the close button to get the Rufus window to close. This will give you the bootable USB drive for Kali Linux. a. Other than using this to help with the dual booting of Kali Linux in Windows, you can also do a Kali live boot using this USB. This means that we are able to run Kali without having to install it on our system.

Keep in mind that it does limit the functions and the features a little bit when you work in this matter.

From this point, for the installation of the Kali Linux, a separate partition should be created. So, to do this part, we can open up the settings for Disk management, or we can run in Windows the command of “diskmgmt.msc.” If we created a 15 to 20 GB minimum-sized partition, it might shrink the volume that we already have.

At this point, we noticed that the first processes were through. The Kali Linux’s ISO was downloaded, a programmed bootable USB drive was created, and a separate partition for the Kali Linux installation was created. Before we continue, we should remember that the Fast Boot and Disable Secure Boot options are available in the BIOS if we would like to use them on our program.

We can now restart our laptop or PC. Go to the boot manager as it starts up again. Choose USB on the option boot. Remember that the different brands will slightly have different options. You can now see the Kali Linux’s installation on your screen. There are a few choices that come up at this point about how to install Kali Linux. You will want to choose the option for “Graphical Install” to help get the Kali Linux to start with some ease. We can take this further and add in a few of the settings and features that we want. For example, you can choose what language you would like to use for the installation process and the country as well.

After we have been able to go through and add in some of the preferences above and the other options that the system asks for, it is time to work on the hostname. Your installation is going to ask for the Hostname. You are able to choose any name that you want because this will be like your username. The password for the root user should then be entered. After the password that you want for the administrative account is entered, you can click on continue.

Now, we want to choose the partitioning method that we want to use, and the option that we will work with is Manual. The next step needs some caution. We want to only choose the partition that we took the time to create earlier for the installation of Kali and then press on Continue. When you are sure you have chosen the right option, you can select “Delete the partition”

And that is all there is to it. You just need to go through some of the steps that we did above, and you can get it set up so that the Kali Linux distribution is ready to go, and you can use it at any time that you want. Each time that you restart your computer, you will be able to choose whether you would like to work with the Kali Linux operating system or the Windows operating system for your needs, making it easy to switch back and forth between the two.

Chapter 4: An Introduction to Cyber Security

The next topic that we need to take a look at here is the idea of cybersecurity and what this is all about. As someone who is working on Kali Linux as part of the hacking process, it is important to know as much as possible about cybersecurity and how you can protect your system and all of the networks that you need to protect from outside threats. So, let’s dive right in.

Cybersecurity is going to be the state or the process of protecting and recovering programs, devices, and networks from any type of cyber attack that a hacker or someone else may want to get into. These cyberattacks are more common than ever before. There are a lot of hackers and other individuals who want to get access to a large number of computers, whether this is a large number of personal computers and the information on those or that of a large company holding onto a big set of data about their customers.

There are a lot of benefits to someone completing these cyberattacks. If they are successful and no one ends up catching them or what they are doing, then this can really help them to gain access to information that they should not have. Many hackers want to do this to destroy a business, steal personal information from customers and employees, and even to steal money. Some companies may try to unethically attack another competitor in order to get information on new products and services and take them over for themselves.

No matter what the reason is for the attack, there is going to be some benefit to the hacker, and it is often going to cause a mess for the company and everyone else who is affected in the process. And it is the job of a white-hat hacker and the rest of the IT professional team to keep some of these cyberattacks down to a minimum.

These cyberattacks are an evolving danger to consumers, employees, and organizations. They are going to be designed in a manner that helps them to access or destroy any sensitive data that may be in a system or even to extort money when necessary. They can, when they are successful and depending on the scale of them, really destroy businesses and damage the financial and personal lives of those who were on the system.