0% found this document useful (0 votes)
12 views26 pages

Lecture 4 - Kali Linux

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views26 pages

Lecture 4 - Kali Linux

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

Kali

Linux
SE
Asst. Prof. Sayed Elham Sadat
[email protected]
[email protected]
Introduction to Kali Linux
• It is an an open-source Debian-based Linux distro containing
hundreds of tools for information security tasks such as Pentesting,
Forensics and Reverse Engineering.
• Developed, funded and maintained by Offensive Security, a leading
information security training company.
• Documentation:
• https://docs.kali.org/

SE Sayed Elham Sadat


Introduction to Kali Linux cont.
• Kali Linux was released on the 13th March 2013.
• As a complete, top-to-bottom rebuild of BackTrack Linux, adhering
completely to Debian development standards.
• "Kali" is simply a name that Offensive Security Ltd coined for its new
Linux distribution.

SE Sayed Elham Sadat


Kali Linux Features
• More than 600 penetration testing tools included.
• Free and always will be: Kali Linux, like BackTrack, is completely
free of charge and always will be. You will never, ever have to pay for
Kali Linux.
• Open source Git tree: We are committed to the open source
development model and our development tree is available for all to
see. All of the source code which goes into Kali Linux is available for
anyone who wants to tweak or rebuild packages to suit their specific
needs.

SE Sayed Elham Sadat


Kali Linux Features cont.
• Wide-ranging wireless device support
• Developed in a secure environment: The Kali Linux team is made up
of a small group of individuals who are the only ones trusted to
commit packages and interact with the repositories, all of which is
done using multiple secure protocols.
• Multi-language support
• Completely customizable
• Web Application Testing
• Wireless Network Auditing

SE Sayed Elham Sadat


Downloading Kali Linux
• https://www.kali.org/get-kali/#kali-platforms

SE Sayed Elham Sadat


System Requirements
• A minimum of 20GB hard disk space for installation, depending on
the version. Version 2020.2 requires at least 20GB.
• A minimum of 2GB RAM for i386 and AMD64 architectures.
• A bootable CD-DVD drive or a USB stick.
• A minimum of an Intel Core i3 or an AMD E1 processor for good
performance.

SE Sayed Elham Sadat


Kali Linux - Login
• Login details
• Username: kali
• Password: kali
• Before 2020, Kali directly uses 'root' (the admin account on Linux
distros) to login, since many pentesting tools require root privilege to
run.
• Starting from 2020, Kali introduces a common user account named
'kali' as the default login to reduce security risks.

SE Sayed Elham Sadat


Linux Shell or Terminal
 A shell is an interactive interface that allows users to execute
commands.
 Popular shell programs in Linux include: zsh, bash, tcsh, etc.
 Starting from 2020, Kali Linux uses zsh as its default shell program
 Zsh is also the default shell for MAC OS starting from 2019.
 Zsh provides heaps of convenient features for command lines.
 You don't need to worry about its abundant features, which you can learn
gradually.
 The key thing you need to know is that you can enter a command there and
execute it.

SE Sayed Elham Sadat


Linux Shell - Zsh
 Convenient features of Zsh you'll encounter immediately:

 If the color of your command is red, it means your command is not valid yet. A green
color indicates a valid command.
 The grey color gives you the suggested command. You can use the (->) key to select
this command. Or you can use 'tab' key to ask for more suggestions.
 When entering a directory, you can omit the 'cd' command.

SE Sayed Elham Sadat


Kali Linux – the ‘sudo’ command
 For the pentesting tools requiring root privileges, you need to invoke
them with the 'sudo' command. 'sudo' is a Linux command to allow a
non-root user to execute a command with root privilege.

 Syntax: sudo <command needing root privilege>

 Example: sudo nmap 192.168.0.100

SE Sayed Elham Sadat


Linux – Basic Commands
1. pwd
 When you first open the terminal, you are in the home directory of
your user.
 To know which directory you are in, you can use the “pwd”
command. It gives us the absolute path, which means the path that
starts from the root.
 The root is the base of the Linux file system. It is denoted by a
forward slash( / ). The user directory is usually something like
"/home/username".

SE Sayed Elham Sadat


Linux – Basic Commands
2. ls
 Use the "ls" command to know what files are in the directory you are
in.
 You can see all the hidden files by using the command “ls -a”.

SE Sayed Elham Sadat


Linux – Basic Commands
3. cd
 Use the "cd" command to go to a directory.
 For example, if you are in the home folder, and you want to go to the
downloads folder, then you can type in “cd Downloads”.
 Remember, this command is case sensitive, and you have to type in the name of the
folder exactly as it is.
 But there is a problem with these commands. Imagine you have a folder named
“Raspberry Pi”. In this case, when you type in “cd Raspberry Pi”, the shell will take
the second argument of the command as a different one, so you will get an error
saying that the directory does not exist. Here, you can use a backward slash.
 That is, you can use “cd Raspberry\ Pi” in this case.
 To go back from a folder to the folder before that, you can type “cd ..” . The two dots
represent back.

SE Sayed Elham Sadat


Linux – Basic Commands
4. Mkdir & rmdir
 Use the mkdir command when you need to create a folder or a directory.
 For example, if you want to make a directory called “DIY”, then you can type
“mkdir DIY”.
 Remember, as told before, if you want to create a directory named “DIY
Hacking”, then you can type “mkdir DIY\ Hacking”.
 Use rmdir to delete a directory. But rmdir can only be used to delete an empty
directory.
 To delete a directory containing files, use rm.

SE Sayed Elham Sadat


Linux – Basic Commands
5. rm
 Use the rm command to delete files and directories.
 Use "rm -r" to delete just the directory.
 It deletes both the folder and the files it contains when using only the rm
command.

SE Sayed Elham Sadat


Linux – Basic Commands
6. touch
 The touch command is used to create a file.
 It can be anything, from an empty txt file to an empty zip file.
 For example, “touch new.txt”.

SE Sayed Elham Sadat


Linux – Basic Commands
7. man
 To know more about a command and
how to use it, use the man command.
 It shows the manual pages of the
command.
 For example, “man cd” shows the
manual pages of the cd command.
 Typing in the command name and the
argument helps it show which ways
the command can be used (e.g., cd –
help).

SE Sayed Elham Sadat


Linux – Basic Commands
8. cp
 Use the cp command to copy files through the command line.
 It takes two arguments:
 The first is the location of the file to be copied, the second is where to copy.

SE Sayed Elham Sadat


Linux – Basic Commands
9. mv
 Use the mv command to move files through the command line.
 We can also use the mv command to rename a file.
 For example, if we want to rename the file “text” to “new”, we can use “mv
text new”.
 It takes the two arguments, just like the cp command.

SE Sayed Elham Sadat


Linux – Basic Commands
10. locate
 The locate command is used to locate a file in a Linux system, just like the
search command in Windows.
 This command is useful when you don't know where a file is saved or the actual
name of the file. Using the -i argument with the command helps to ignore the
case (it doesn't matter if it is uppercase or lowercase).
 So, if you want a file that has the word “hello”, it gives the list of all the files in
your Linux system containing the word "hello" when you type in “locate -i
hello”. If you remember two words, you can separate them using an asterisk (*).
 For example, to locate a file containing the words "hello" and "this", you can
use the command “locate -i *hello*this”.

SE Sayed Elham Sadat


Able to use a text editor under Linux
 Text-based:
 nano: simple
 vi: powerful, the most popular, however very different from Windows style
editors
 GUI:
 Mousepad
 gedit
 leafpad
 Note: The last two may need installation

SE Sayed Elham Sadat


Linux Networking Commands
 Networking Commands will be used a lot in pentesting.
 You should know how to use the following networking commands:
 ping: check whether a host is alive.

SE Sayed Elham Sadat


Linux Networking Commands cont.
 hostname: show the host name of a computer.

 host, nslookup, dig: find IP address given host name and vice versa. We'll talk
more about them in the next lecture on reconnaissance.
 traceroute: shows packet travelling path to a destination; same as 'tracert' in
Windows.

.
SE Sayed Elham Sadat
Linux Networking Commands cont.
 ip addr or ip a: show network interface IP address, MAC address,
network mask, etc.;
 Similar to 'ipconfig' in Windows.

SE Sayed Elham Sadat


Linux Networking Commands cont.
 ip addr or ip a: show network interface IP address, MAC address,
network mask, etc.;
 Similar to 'ipconfig' in Windows.

SE Sayed Elham Sadat

You might also like