1.3.7 Lab - Investigate Kali Linux - ILM
1.3.7 Lab - Investigate Kali Linux - ILM
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
In this lab, you will complete the following objectives:
Familiarize yourself with the Kali Linux GUI.
Familiarize yourself with the Kali Linux shell.
Background / Scenario
Linux is open source, fast, reliable, and small. It requires very little hardware resources to run and is highly
customizable. Unlike other operating systems such as Windows and Mac OS X, Linux was created, and is
currently maintained by, a community of programmers. Linux is part of several platforms and can be found on
devices anywhere from “wristwatches to supercomputers”. Because Linux is open source, any person or
company can get the kernel’s source code, inspect it, modify it, and re-compile it at will. They are also allowed
to redistribute the program with or without charges.
Linux distributions are packages created by different organizations. Linux distributions (or distros) include the
Linux kernel with customized tools and software packages. While some of these organizations may charge for
their Linux distribution support (geared towards Linux-based businesses), most of them also offer their
distribution for free without support. Debian, Red Hat, Ubuntu, CentOS, and SUSE are just a few examples of
Linux distributions.
Kali Linux is a special version of Linux designed specifically for security auditing and penetration testing.
Many changes have been implemented to ensure security, system integrity, and security-specific capabilities.
It is not recommended to use Kali for standard uses, such as gaming, development, and other day-to-day
uses. As a security and pentesting expert, it is very important for you to know how to get around in Kali, both
in the GUI and at the terminal. You need to be able to find the tools that you need to perform your job and
manipulate files in the file system.
Required Resources
Kali VM customized for Ethical Hacker course
Internet access
Instructions
ã 2023 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 10
Lab - Investigate Kali Linux
and files that you use for specific tasks. You can switch to the desktop that has the items you need when
you are working on a certain job.
b. Right-click the panel, click Panel, and then + Add New Items…
Here you can add many items to the panel to help you get to the tools and configurations that you use the
most. Close the Add New Items window.
c. Right-click the panel, click Panel, and then Panel Preferences…
Here you can modify many settings to customize how the panel works and what it looks like. Additional
panels can be added as well, to accommodate more items.
d. Investigate the settings and change the settings if you desire.
e. Close both configuration windows when you are finished.
The top-right corner shows some settings and information, such as network connection, audio, time and
date, and the power button. You can add additional items to this area using the panel configuration if you
wish. This is a good place to look for useful information.
Scroll through the output and name a few sections that are included in a man page.
Type your answers here.
A few sections in a man page are: Name, Synopsis, Configuration, Description, Options, Exit
status, Return value, Errors, Environment, Files, Versions, Conforming to, Notes, Bugs, Example,
Authors, and See Also.
c. Type q to exit the man page.
ã 2023 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 10
Lab - Investigate Kali Linux
To invoke a command via the shell, simply type its name. The shell will try to find it in the system path and
execute it.
The table lists some basic Linux commands and their functions.
Command Description
Many command line tools are included in Linux by default. To adjust the command operation, users can
pass parameters and switches along with the command. The table lists a few of the most common
commands related to files and directories.
Command Description
ã 2023 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 10
Lab - Investigate Kali Linux
Command Description
cat Lists the contents of a file and expects the file name as the parameter.
For complete help on everything Kali Linux, open the Firefox web browser and go to
https://www.kali.org/docs/.
Here, you can perform a search by typing keywords in the search box or use the categories to find an
answer by subject.
ã 2023 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 10
Lab - Investigate Kali Linux
d. In the current directory, use the mkdir command to create three new folders: kali_folder1, kali_folder2,
and kali_folder3. Type mkdir kali_folder1 and press Enter. Repeat these steps to create kali_folder2
and kali_folder3.
┌──(kali㉿Kali)-[~]
└─$ mkdir kali_folder1
┌──(kali㉿Kali)-[~]
└─$ mkdir kali_folder2
┌──(kali㉿Kali)-[~]
└─$ mkdir kali_folder3
You can also specify multiple folders as in:
┌──(kali㉿Kali)-[~]
└─$ mkdir kali_folder1 kali_folder2 kali_folder3
e. Type ls -l to verify that the folders have been created and navigate to a new folder:
┌──(kali㉿Kali)-[~]
└─$ ls -l
total 48
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Desktop
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Documents
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Downloads
drwxr-xr-x 2 kali kali 4096 Apr 21 15:09 kali_folder1
drwxr-xr-x 2 kali kali 4096 Apr 21 15:09 kali_folder2
drwxr-xr-x 2 kali kali 4096 Apr 21 15:09 kali_folder3
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Music
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Pictures
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Public
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Templates
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Videos
┌──(kali㉿Kali)-[~]
└─$ cd /home/kali/kali_folder3
┌──(kali㉿Kali)-[~/kali_folder3]
└─$
Question:
ã 2023 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 10
Lab - Investigate Kali Linux
Question:
Challenge: Type the command cd ~ and describe what happens. Why did this happen?
Type your answers here.
The directory is changed to the home directory. Because the shell interprets the ~ as a shortcut
for the current user’s home directory, cd ~ changes to the current user’s home.
f. Use the mkdir command to create a new folder named kali_folder4 inside the kali_folder3 folder:
┌──(kali㉿Kali)-[~]
└─$ mkdir /home/kali/kali_folder3/kali_folder4
1) Use the ls -l command to verify the folder creation.
┌──(kali㉿Kali)-[~]
└─$ ls -l /home/kali/kali_folder3
total 4
drwxr-xr-x 2 kali kali 4096 Apr 21 15:19 kali_folder4
2) Up to this point, we have been using full paths. Full path is the term used when referring to paths
that always start at the root (/) directory. It is also possible to work with relative paths. Relative paths
reduce the amount of text to be typed. To understand relative paths, we must understand the . and ..
(dot and double dots) directories. From the kali_folder3 directory, issue ls –la:
┌──(kali㉿Kali)-[~/kali_folder3]
└─$ ls -la
total 12
drwxr-xr-x 3 kali kali 4096 Apr 21 15:09 .
drwx------ 20 kali kali 4096 Apr 21 15:07 ..
drwxr-xr-x 2 kali kali 4096 Apr 21 15:19 kali_folder4
The -a option tells ls to show all files. Notice the . and .. listings shown by ls. These listings are used
by the operating system to track the current directory (.) and the parent directory (..) You can use .
and .. with the cd command to change directories. Using the cd command to change the directory to
the . directory incurs no visible directory change as the . points to the current directory itself.
3) Change the current directory to /home/kali/kali_folder3:
┌──(kali㉿Kali)-[~]
└─$ cd /home/kali/kali_folder3
4) Type cd .
┌──(kali㉿Kali)-[~/kali_folder3]
└─$ cd .
Question:
What happens?
Type your answers here.
Apparently, nothing, but the command interpreter has changed the directory to the current
directory itself.
5) Changing the directory to the .. directory, will change to the directory that is one level up the path.
This directory is also known as parent directory. Type cd ..
┌──(kali㉿Kali)-[~/kali_folder3]
└─$ cd ..
Question:
What happens?
Type your answers here.
ã 2023 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 10
Lab - Investigate Kali Linux
The directory was changed to /home/kali, which is the directory immediately above
kali_folder3, also known as parent directory.
If you issued the cd .. command at
┌──(kali㉿Kali)-[~]
└─$
Question:
ã 2023 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 10
Lab - Investigate Kali Linux
c. Use the > operator to redirect the output of echo to a text file instead of to the screen:
┌──(kali㉿Kali)-[~]
└─$ echo redirect this to a file > text_file.txt
Questions:
ã 2023 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 10
Lab - Investigate Kali Linux
d. Issue the command below to move the text_file.txt from /home/kali/kali_folder2 to the home directory.
Note: There is a dot at the end of command.
┌──(kali㉿Kali)-[~]
└─$ mv kali_folder2/text_file.txt .
┌──(kali㉿Kali)-[~]
└─$ ls -l
total 48
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Desktop
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Documents
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Downloads
drwxr-xr-x 2 kali kali 4096 Apr 21 15:25 kali_folder2
drwxr-xr-x 3 kali kali 4096 Apr 21 15:25 kali_folder3
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Music
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Pictures
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Public
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Templates
-rw-r--r-- 1 kali kali 18 Apr 21 15:49 text_file.txt
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Videos
Question:
Why was the dot (“.”) used as the destination parameter for mv?
Type your answers here.
The dot (“.”) means that mv should move the file to the current directory. Because the current
directory was already /home/kali/ (the directory where the file should be moved), using the dot “.”
represents just that.
e. The mv command can also be used to move entire directories and the files they contain. To move the
kali_folder3 (and all the files and directories it contains) into kali_folder2, use the command below:
┌──(kali㉿Kali)-[~]
└─$ mv kali_folder3/ kali_folder2/
┌──(kali㉿Kali)-[~]
└─$ ls -l /home/kali
total 44
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Desktop
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Documents
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Downloads
drwxr-xr-x 3 kali kali 4096 Apr 21 16:03 kali_folder2
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Music
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Pictures
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Public
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Templates
-rw-r--r-- 1 kali kali 18 Apr 21 15:49 text_file.txt
drwxr-xr-x 2 kali kali 4096 Apr 10 14:51 Videos
f. Use the ls command to verify that the kali_folder3 directory was correctly moved to kali_folder2.
┌──(kali㉿Kali)-[~]
└─$ ls -l kali_folder2/
total 4
ã 2023 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 10
Lab - Investigate Kali Linux
Reflection
You have learned some basic ways to use Kali Linux in this lab. You learned how to use the Kali GUI and
terminal with some basic Linux commands. The strength of Kali is in its collection of tools. We will cover some
of those tools in labs to come.
How can you learn more about Kali command line tools?
Type your answers here.
Each tool has man pages and help text to help guide the usage of the tools. In addition, the internet
has many resources for learning the tools specifically, and Linux in general, including text and video
demonstrations and question and answer forums.
End of document
ã 2023 - 2023 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 10 of 10