Lecture 1
Lecture 1
Instructor:
Assistant Professor, PhD Akzhibek Amirova
[email protected]
Assessment
* Each assignment is a combination of tasks including Labs, practical assessments and other
forms of submission depending on the topic of the week.
Network Hacking – In this section you will learn how to
test network basics, how they work, and how devices
communicate with each other. Then it will branch into
three sub sections:
• Pre-connection attacks
• Gaining Access
• Post Connection attacks
General objective
Social engineering techniques – In this section you will
This course is highly practical, the students learn how to improve cybersecurity awareness level.
will start with hacking basics, breakdown Also will create fake site to harvest credentials.
the different penetration testing fields and • Maltego to gathering personal data
• BadPDF attack
install the needed software
02 Gathering information
Basic Literature:
1. L.S. Aldasheva, A.S. Abdiraman, S.T. Amanzholova, Z.A. Issagalyeva Introduction to Hacking Lab:
Study guide / L.S. Aldasheva, A.S. Abdiraman, S.T. Amanzholova, Z.A. Issagalyeva. – Almaty:
Daryn, 2024. – 200 p.
2. Glen D.Singh.The Ultimate Kali Linux Book / D.S. Glen. - 2 ed. - Burmingham : Packt Publishing Ltd.,
January 2022. - 718 p.
Supplementary Literature:
1. Jeremy Martin.Hacking lab with Kali: Build a portable Cyber Live Fire Range / M. Jeremy. - 1st ed. -
Great Britain : Information Warfare center, 2020. - 60 p.
2. Ric Messier. CEH v12 Certified Ethical Hacker Study Guide [Текст] : Includes interactive online
learning environment and study tools: 750 practice questions, 100 electronic flashcards,
Searchable key term glossary / M. Ric. - 1st ed. - UK : Wiley, 2023. - 724 p"
Lecture 1
Gray Hat: Hackers working without permission but not necessarily with bad intent
Example: A penetration tester tries to hack into a corporate network so the company can fix
vulnerabilities before real hackers exploit them.
Defensive Security (Protective Security)
This is the practice of protecting systems from attacks and ensuring data security. It includes:
Example: An Intrusion Detection System (IDS) detects suspicious activity, and security
Offensive Security:
Attack simulations
Defensive Security:
Techniques:
Open-source intelligence (OSINT)
Social engineering
WHOIS lookups, DNS queries
Google dorking
For example, let’s say we are testing a bank’s website. By checking LinkedIn
job postings, we might discover that the bank uses Apache servers and
AWS cloud services. Using WHOIS, we can find domain registration details,
and with Google dorking, we might locate exposed files or sensitive
information. This kind of information is valuable when planning an attack
Scanning (Stage 2)
Goal: Identify live hosts, open ports, and services
Techniques:
Network scanning (e.g., Nmap, Netdiscover)
Vulnerability scanning (e.g., Nessus, OpenVAS)
Banner grabbing
For example, if we use Nmap on our target bank’s server, we might find
that port 22 (SSH) is open, meaning the server allows remote
connections. If we also find an outdated version of Apache, a
vulnerability scanner like Nessus may confirm that it has known
security flaws. This information will help us in the next phase, gaining
access."
Gaining Access (Stage 3)
Techniques:
Exploiting known vulnerabilities (Metasploit, manual exploitation)
Password cracking (John the Ripper, Hydra)
Phishing attacks
Maintaining Access (Stage 4)
For instance, if we gain access to a system, we might delete authentication logs (rm -
rf /var/log/auth.log) to erase any sign of our login. We could also disable security
monitoring tools to prevent alerts from being triggered
Reporting (Stage 6)
You can additionally open a terminal window from the current session using the key
combination CTRL+SHIFT+T.
To close the terminal window, use the combination CTRL + D or the exit command
Investigate Kali Linux
To view the history of command execution, use the history command, and to reuse a
previously executed command, the key combination CRTL + R
Investigate Kali Linux
To save the list of files in the ls directory to a txt text file, you need to run the command: ls > ls-list.txt
The command used above, using the > symbol, will save the list of files into a text file named ls-list.txt.
Investigate Kali Linux
Using the cat command and the < symbol, you can do the opposite < display the contents of the file in a terminal
window:
cat < ls-list.txt
Investigate Kali Linux
The | parameter is responsible for combining the output of each command and use it in the next command
Basic Kali Linux Commands
Using the cat command and the < symbol, you can do the opposite < display the contents of the file in a terminal
window:
cat < ls-list.txt
Basic Kali Linux Commands
man ls
This will display the ls command user manual
Basic Kali Linux Commands
man passwd
The above command will show information about the passwd command
Changing directory in Kali Linux terminal
To change to a different directory, use the cd command followed by the path to the desired directory. The pwd
command will display the current directory, and the cd command will return to the home directory:
/home/username
Creating a directory in the Kali Linux terminal
To create a directory, use the mkdir command followed by the name of the new directory.
To create a new file, use the touch command, followed by the name of the new file. An example of using the mkdir and
touch commands is shown in the following screenshot
Creating a directory in the Kali Linux terminal
To create multiple directories at once, use the -p argument. This argument can create directories within the parent
directory. Let's say we need to add two directories to our newly created baby-new-folder directory:
You can do this using the -p argument:
mkdir -p /home/kali/new_folder/baby-new-folder/{testing,info,exploit}
Searching for files in the Kali Linux terminal
The which command searches the directories specified in the $PATH environment variable. This variable contains a
list of all directories that Kali Linux searches when the command is applied without a path. If a match is found, the full
path to the file is returned, as shown below:
Searching for files in the Kali Linux terminal
Locate
The locate command is the fastest way to find files and directories in Kali Linux. Unlike other commands, instead of
searching for data on the hard drive, it searches its locate.db database.
This database is regularly updated automatically by the cron scheduler. To manually update the locate.db database,
use the command
Searching for files in the Kali Linux terminal
Find
The find command is the most complex, but at the same time flexible search tool. Its syntax is quite difficult to
understand, but the results are much better. In the following screenshot, we have performed a very basic search using
the find command, where we search from the root directory / and look for files starting with the word sbd.
Introduction to
Hacking Lab
Kali Linux Terminal Tasks
Task 1: Create a New File
cat myfile.txt
Kali Linux Terminal Tasks