Courses-Study

My notes for studying courses

View on GitHub

Getting Comfortable with Kali Linux

1 - BOOTING UP KALI LINUX

passwd
sudo command

2 - THE KALI MENU

3 - KALI DOCUMENTATION

4 - FINDING YOUR WAY AROUND KALI

4-1 - THE LINUX FILESYSTEM

4-2 BASIC LINUX COMMANDS

man passwd
man -k passwd 
apropos partition # Search commands which have partition in their description
ls # List files
ls *.* ?.? # List files based on wildcard
ls -a1 # List all files in single line (automation)
cd directory # Change directory to specified directory
pwd # show current directory
cd ~ # change to home directory
mkdir # Create Directory
mkdir a b # Create to directories names a,b
mkdir "a b" # Create one directory named "a b"
mkdir -p ./a/b/c/d # Create recursive directories
mkdir -p test/{recon,exploit,report}

4-3 FINDING FILES IN KALI LINUX

# Searches in $PATH variable
which filename

# Quickest way to find file, searches in built-in DB locate.db, updatebd command updates it
locate filename

# Most complex and flexbile tool to find files based on timestamp,name,permission,...
find

5 - MANAGING KALI LINUX SERVICES

5-1 SSH SERVICE

sudo systemctl start ssh # Starts SSH Service
sudo ss -alnpt | grep sshd # Verify SSH service is up and running
sudo systemctl enable ssh # Starts SSH on boot time

5-2 HTTP SERVICE

sudo systemctl start apache2 # Starts Apache Service
sudo ss -alnpt | grep sshd # Verify Apache service is up and running
sudo systemctl enable ssh # Starts Apache on boot time
sudo systemctl list-unit-files # See all services

6 - SEARCHING, INSTALLING, AND REMOVING TOOLS

Explore package tools, Not all tools can be installed by default

6.1 - APT UPDATE

sudo apt update # update list of repositories

6.2 - APT UPGRADE

# Upgrade single packege with name
sudo apt upgrade <package name>

# Upgrade entire OS but better to take snapshot before upgrading
sudo apt upgrade

6.3 - APT-CACHE SEARCH AND APT SHOW

# Search for package name in cached repositories based on name and description
apt-cache search <package name>

# Show all information about package name
apt show <package name>

6.4 - APT INSTALL

# Add and install package to system
sudo apt install <package name>

6.5 - APT REMOVE –PURGE

# Completely removes and all package data but leaves config files
sudo apt remove <package name>

# Completely remove all package data including config files
sudo apt remove --purge <package name>

6.6 - DPKG

# install <package-name>.deb file 
sudo dpkg -i <package name>.deb

7 - WRAPPING UP