Kali Linux

Kali Linux Tutorial for Beginners: What is, How to Install & Use

Kali Linux is a secure distribution of Linux that is derived from Debian and was developed specifically for the purposes of advanced penetration testing and computer forensics. Mati Aharoni and Devon Kearns, both of Offensive Security, were responsible for its development by rewriting the BackTrack programme. The information security distribution Kali Linux includes several hundred tools that are purpose-built for a variety of information security-related activities, such as computer forensics, penetration testing, security research, and reverse engineering.

The previous information security operating system they used was called BackTrack. The initial release of Kali Linux, known as Kali 1.0.0, was made available to users in March of 2013. The funding and support for Kalin Linux is currently provided by Offensive Security. If you were to go to the Kali website right now (www.kali.org), you would see a large banner that reads, “Our Most Advanced Penetration Testing Distribution, Ever.” A very audacious claim, which, ironically, has not yet been shown to be false.

Over six hundred different penetration-testing applications are already pre-installed in Kali Linux, waiting to be explored. Each programme has its own distinct adaptability and range of possible applications. These helpful applications are organised into the following categories thanks to Kali Linux’s excellent work in this regard:
Collecting Data or Information
Vulnerability Analysis
Attacks Conducted Wirelessly
Applications for the Web
Instruments of Exploitation
Tools Used for Stress Testing in Forensics
Combining Sniffing and Spoofing
Attacks Made Using Passwords
Ensuring Continuity of Access
Tools for Reporting on Reverse Engineering Efforts
Hacking of computer hardware
In this Kali Linux tutorial for novices, you will learn how to:

Who uses Kali Linux and Why?

Because it is one of the rare platforms that is publicly utilised by both good guys and evil guys, the operating system known as Kali Linux is truly one of a kind. This operating system is heavily utilised by both security administrators and black hat hackers alike. [Note: One to uncover and perhaps exploit security vulnerabilities, and the other to detect and prevent security vulnerabilities from being exploited. Kali Linux is the Swiss Army knife of operating systems for any security professional’s arsenal due to the quantity of tools that can be adjusted and are preloaded on the operating system.

Those in the Working World Who Use Kali Linux

Administrators of Security Administrators are tasked with the duty of ensuring the confidentiality of the data and information belonging to their respective institutions. They make use of Kali Linux to examine their environment(s) and make certain that there are no flaws that can be discovered quickly.
Administrators of the Network These individuals are accountable for the upkeep of the network in order to ensure that it is both effective and safe. In order to perform a network audit, they employ Kali Linux. For instance, Kali Linux possesses the capability to identify malicious access points.
Those who work in network architecture are called network architects, and their job is to create safe settings for computer networks. They evaluate their initial designs with Kali Linux to make sure nothing was missed or misconfigured and to ensure that nothing was forgotten.
Pen Testers use Kali Linux to audit environments and undertake reconnaissance on business environments that they have been contracted to assess. Pen Testers are sometimes referred to as penetration testers.
Chief Information Security Officers utilise Kali Linux to conduct an internal audit of their environment and find out whether any new programmes or rouge configurations have been put into place. CISO is an abbreviation for “Chief Information Security Officer.”

Kali Linux Installation Methods

Forensic Engineers — The operating system Kali Linux has a mode called “Forensic Mode” that, in certain circumstances, enables a forensic engineer to execute data recovery and discovery operations.
White Hat Hackers White Hat Hackers, which are comparable to Pen Testers, use Kali Linux to audit and uncover vulnerabilities that may be present in an environment. White Hat Hackers are also known as Ethical Hackers.
Black Hat Hackers Use Kali Linux to Find and Exploit Vulnerabilities Black Hat hackers use Kali Linux to find vulnerabilities and exploit them. Kali Linux also features a number of programmes that are designed for social engineering, and a Black Hat Hacker can use these applications to compromise an organisation or a person.
Hackers who wear grey hats fall between between those who wear white hats and those who wear black hats. They intend to use Kali Linux in the same ways as were described in the previous two paragraphs.
Computer Enthusiast – Although “Computer Enthusiast” is a rather vague word, anyone who is interested in learning more about networking or computers in general can utilise Kali Linux to learn more about information technology, networking, and common vulnerabilities.
Installing Kali Linux Using These Methods
The following instructions will walk you through installing Kali Linux:

Ways to Run Kali Linux:

Installed Directly on a Personal Computer or Laptop — Kali Linux can be installed directly onto a personal computer or laptop by using a Kali ISO image. This method works best if you are familiar with Kali Linux and have access to a spare computer that you can use. It is also advised that you install Kali Linux directly onto a Wi-Fi equipped laptop if you intend to test access points or are already in the process of doing so.
Virtualized (VMware, Hyper-V, Oracle VirtualBox, and Citrix) — Kali Linux supports the majority of hypervisors that are currently known and can be readily installed into the most common ones. You can manually install the operating system into the hypervisor of your choice by using an ISO file, or you can get pre-configured images from the website https://www.kali.org/ and save them to your computer.
Cloud (Amazon AWS, Microsoft Azure) – Because of the widespread use of Kali Linux, both Amazon AWS and Microsoft Azure offer image hosting for the operating system.

How To Install Kali Linux using Virtual Box

USB Boot Disc — By utilising Kali Linux’s ISO, a boot disc may be made. This boot disc can then be utilised to either run Kali Linux on a machine without really installing it or for forensic purposes.
Through the use of the Command Prompt on Windows 10 (App), Kali Linux may now be operated in its native environment. Due to the fact that this is still in beta status, some of the functions are currently inaccessible.

Kali Linux can be installed on a Mac, either as a secondary operating system or as the primary one, using either the dual boot or single boot method. To configure this system, you can make use of either Parallels or the boot functionality offered by Mac.
How to Install Kali Linux on a Virtual Machine Using Virtual Box
The following is an in-depth guide that will walk you through the process of installing Kali Linux on Virtual Box as well as utilising Kali Linux:

Installing Kali Linux and operating it through Oracle’s VirtualBox is the one that is both the simplest and, arguably, the most popular technique.

Getting Started with Kali Linux GUI

Using this strategy, you can keep using the hardware you already have while simultaneously experimenting with the feature-rich Kali Linux operating system in a setting that is fully cut off from the rest of the world. The best part is that nothing costs anything. Oracle VirtualBox and Kali Linux are both available to users at no cost. This Kali Linux guide is based on the assumption that you have Oracle’s VirtualBox already installed on your computer and that 64-bit Virtualization has been activated in the system’s BIOS.

1) Navigate to the following website: https://www.kali.org/downloads/.

This will download an OVA image, which is compatible with VirtualBox and may be imported into the programme.

Step 2) Launch the Oracle VirtualBox application, and then click Import Appliance from the File menu.

File Menu -> Import Appliance

Step 3) On the screen that follows, click the “Appliance to Import” button. Click the Open button when you have located the location where the OVA file was downloaded.

Step 4) Once you have selected Open, you will be brought back to the “Appliance to Import” screen. From there, simply click the Next button.

Step 5: The following screen, titled “Appliance Settings,” presents a summary of the system settings; nevertheless, it is perfectly OK to leave these settings as they were originally configured. First make a mental note of the location of the Virtual Machine, as demonstrated in the screenshot below, and then click the Import button.

The Kali Linux OVA appliance will be imported into VirtualBox at this point. Step 6 The completion of this procedure could take anywhere from five to ten minutes.

Step 7: We want to congratulate you, as the Kali Linux installation on VirtualBox was completed successfully. At this point, the Kali Linux VM ought to be visible in the VirtualBox Console. Following that, we will investigate Kali Linux and go over the fundamental actions to do.

Step 8: Within the VirtualBox Dashboard, choose the Kali Linux VM, and then click the Start button. This will begin the process of booting the Kali Linux operating system.

Step 9: When you are prompted to log in, use the username “Root,” and then click the Next button.

As was previously discussed, proceed to Step 10 and enter “toor” as the password before clicking the SignIn button.

You will now be brought to the graphical user interface (GUI) desktop for Kali Linux. We would like to congratulate you on successfully logging in to Kali Linux.

What is Nmap?

A handful of the tabs on the Kali Desktop are ones that you should initially take note of and become familiar with. The Dock, the Applications Tab, and the Places Tab may all be found in Kali Linux.

The Applications tab offers a graphical dropdown menu including all of the applications and utilities that come pre-installed with Kali Linux. Examining the Applications Tab is an excellent approach to become acquainted with the feature-rich operating system that is the Kali Linux distribution. Nmap and Metasploit are two programmes that will be covered in greater detail in this Kali Linux lesson. The programmes are separated into their respective categories, which makes it much simpler to find the application that one is looking for.

Getting to Know the Applications

1) Select the Applications tab by clicking on it.

Step 2: Navigate to the specific category that piques your interest for further investigation.

Step 3: Select the Application that you want to launch by clicking on it.

Similar to every other graphical user interface (GUI) operating system, such as Windows or Mac, the Places Tab is an essential component that enables quick access to your folders, pictures, and my documents. Accessibility is an essential component of any Operating System, and Kali Linux’s Places feature delivers on that promise. Home, Desktop, Documents, Downloads, Music, Pictures, Videos, Computer, and Browse Network are the tabs that are present on the Places menu when it is initially opened.

Getting to the Locations

1) Navigate to the Locations menu by clicking on it.

The second step is to choose the place to which you want access.

Kali Linux Dock – The Dock in Kali Linux enables easy access to commonly used or preferred apps in a manner that is comparable to that of the Dock in Apple Mac or the Task Bar in Microsoft Windows. It is not difficult to install or uninstall applications.

To eliminate a component from the Dock

1) Click the item in the Dock with the right mouse button.

Step 2: Click the Remove button next to Favorites.

To Insert an Item into the Dock

There is not much of a difference between adding an item to the Dock and removing an item from the Dock.

1) At the very bottom of the Dock, there is a button labelled Show Applications. Click this icon.

Step 2: Select the Application with the Right Mouse Button

Step 3: Click the “Add to Favorites” button.

After it has been finished, the item will be shown in the Dock.Because of its plethora of other distinctive characteristics, the Kali Linux operating system is quickly becoming the platform of preference for both security engineers and hackers. It is unfortunate that it is not feasible to cover all of them within the scope of these Kali Linux hacking tutorials; however, you are encouraged to investigate the many buttons that are presented on the desktop.

What exactly is Nmap?

Nmap is an acronym that stands for Network Mapper. Nmap is a free and open-source programme that is used for discovering networks and scanning them for vulnerabilities. Nmap is the tool that is used by security professionals to discover devices that are running in their surroundings. Nmap has the ability to disclose the services and ports that are being served by each host, hence revealing any potential vulnerabilities. Consider Nmap to be an enhanced version of ping at the most fundamental level. Nmap will be of greater help to you as your level of technical expertise increases, and vice versa.

Nmap provides the versatility to monitor everything from a single server to a massive network with hundreds or even thousands of devices and subnets. Nmap is a port-scanning programme that gathers information by delivering raw packets to a host system. This versatility that Nmap offers has increased over the years, but at its core, it is still a port-scanning tool. After that, Nmap will sit and wait for responses before deciding whether or not a port is open, closed, or filtered.

The fundamental Nmap scan, which examines the first one thousand TCP ports, is the one you should get most familiar with first. If it finds a port that is listening, it will show whether the port is open, closed, or filtered depending on its status. That particular port’s traffic has most certainly been modified by a firewall, which is indicated by the use of the filtered prefix. The default scan can be executed by using any one of the Nmap commands that are listed down below.

Nmap Target Selection

Scan a single IP nmap 192.168.1.1
Scan a host nmap www.testnetwork.com
Scan a range of IPs nmap 192.168.1.1-20
Scan a subnet nmap 192.168.1.0/24
Scan targets from a text file nmap -iL list-of-ipaddresses.txt

How to Perform a Basic Nmap Scan on Kali Linux

Follow the steps below in order to conduct a fundamental Nmap scan using Kali Linux. You have the capability to scan a single IP address, a DNS name, a range of IP addresses, Subnets, and you can even scan from text files if you are using Nmap in its most recent version. For the purpose of this illustration, we will scan the IP address of the localhost.

1) From the Dock menu, select the Terminal by clicking on the tab that is located in the second position.

Step 2: You should see a window labelled Terminal appear; once it does, open it and type in the command “ifconfig.” This command will return the system’s local IP address to you. In this particular illustration, the neighbourhood IP address is 10.0.2.15.

Step 3: Write down the IP address of your local computer.

Step 4: In the same terminal window, enter the command nmap 10.0.2.15. This will scan the first thousand ports on the localhost. Given that this is the initial installation, none of the ports should be open.

Fifth Step: Evaluate the Results

Only the first thousand ports are scanned when you run nmap using the default settings. If you needed to search through all 65535 ports, all you would need to do is add the -p- switch to the command that was just described.

Nmap 10.0.2.15 -p- Nmap OS Scan
The ability to determine the operating system of the host system is another fundamental function of nmap that serves a practical purpose. Because Kali Linux is secure by default, the host system on which Oracle’s VirtualBox is installed will serve as an example in this discussion. The host machine is a Surface with Windows 10 operating system. The Internet Protocol address of the host system is 10.28.2.26.

In the window labelled Terminal, type the following command for nmap:

A Review of the results obtained with nmap 10.28.2.26

The addition of the -A switch instructs nmap to not only carry out a port scan but also make an attempt to identify the running operating system.

Nmap is a utility that should be included in the toolbox of every security professional. To learn more about the available options and commands for Nmap, run the nmap -h command.

Nmap OS Scan

The Metasploit Framework is a project that is open source and provides a public resource for researching vulnerabilities and developing code. This resource gives security professionals the ability to infiltrate their own networks and identify security risks and vulnerabilities. Rapid 7 has recently acquired Metasploit, which can be found online at https://www.metasploit.com. On the other hand, the community edition of Metasploit can still be downloaded for free on Kali Linux. Metasploit is by far the most popular penetration tool used all over the world.

When utilising Metasploit, it is imperative that you exercise caution because scanning a network or environment that is not your own may, in certain circumstances, be regarded as illegal activity. During this Kali Linux metasploit tutorial, we will demonstrate how to launch Metasploit and conduct a fundamental scan using Kali Linux. It will take some time and effort to become proficient with Metasploit because it is an advanced utility; however, once you are familiar with the application, you will find that it is an invaluable resource.

What is Metasploit?

Actually, we are able to use Nmap right from within Metasploit. In this scenario, you will learn how to scan your local VirtualBox subnet from Metasploit by utilising the Nmap utility that we have recently acquired knowledge of.

1) On the Applications tab, select Metasploit by first scrolling down to the 08-Exploitation Tools section and then selecting it.

Step 2: A terminal window with the text “MSF” in the dialogue box will open. This is the Metasploit framework.

Step 3) In the following command, press [Enter].

db nmap -V -sV 10.0.2.15/24
(make sure that you replace 10.0.2.15 with the IP address of your computer)

Here:

db_ stands for database

-V Stands for verbose mode

-sV is an abbreviation that stands for “service version detection.”

Metasploit and Nmap

Metasploit is extremely versatile and powerful thanks to its many features. Exploitation of Vulnerabilities is a typical scenario that calls for the use of Metasploit. The following will be a step-by-step walkthrough of us reviewing some exploits and attempting to exploit a Windows 7 machine.

Step 1: Assuming that Metasploit is still running, navigate to the terminal window and type “Hosts -R.” This adds the hosts that were just discovered to the database that Metasploit uses.

Step 2: In the text box, type “show exploits.” This command will give you an in-depth look at all of the exploits that are accessible through Metasploit.

Step 3: Attempt to reduce the size of the list using the following command: search name: Windows 7, the purpose of this command is to look for exploits that specifically include Windows 7, and for the purpose of this demonstration, we will attempt to exploit a computer running Windows 7. You may need to change the search parameters in order to meet your criteria if the environment in which you are operating is different. For instance, if you are using a Mac or another machine that runs Linux, you will need to modify the search parameter so that it is compatible with your machine.

Step 4: For the purposes of this tutorial, we will make use of a flaw that was found in Apple’s iTunes software. In order to take advantage of the exploit, we need to enter the full path that is shown in the list, which is as follows: exploit/Windows/Browse/Apple iTunes Playlist is the URL that you should use.

Step 5: If the exploit was successful, the name of the exploit will be displayed at the command prompt, followed by the character >. This is illustrated in the screenshot below.

Step 6: Press the show options key to examine the various customization options that are offered by the exploit. Various options are available for each exploit, as one would expect.