Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 31

1.

Update and Upgrade:

Step 1: Open your terminal and run the following command to update and upgrade the Kali System.
The below command ensures that the package lists are refreshed, providing the latest available
versions of software packages. It is a crucial first step to keep the system up-to-date and secure.

sudo apt update

Step 2: Once we update the system using “sudo apt update,” the next important step is to execute
“sudo apt upgrade -y” in the terminal. This command initiates the upgrade process, automatically
installing the latest versions of packages without requiring manual confirmation for each. This
ensures that the Kali Linux system is up-to-date and benefits from the most recent security patches
and performance enhancements. It is a fundamental post-installation task for maintaining the
stability and reliability of the operating system.

sudo apt upgrade -y

sudo apt dist-upgrade

Remote Access To Kali Linux – Native Solution


Ensure SSH Service is Running

Before diving into the remote desktop setup, make sure the SSH (Secure Shell) service is up and
running on your Kali Linux machine. SSH serves as the foundation for secure communication
between devices.
To confirm if SSH is active, open a terminal and enter the following command:

service ssh status

If the service is not running, start it using:

service ssh start

Create a Standard User:

So, Now we will create the Standard User for our Kali Linux System, To enhance security and adhere
to best practices, it is advisable to refrain from utilizing the root account for routine activities.
Instead, create a standard user account with sudo privileges. This can be accomplished by executing
the command. Set up a non-root user for daily tasks you can create the standard user using the
following command – Replace “your_username” with your desired username. This ensures that daily
tasks are performed with a non-root user, contributing to a more secure computing environment.

sudo adduser your_username

Install and Configure XRDP

XRDP (X Remote Desktop Protocol) is the key component for enabling remote desktop
functionality on Kali Linux. Install XRDP using the following command:

sudo apt install xrdp -y

Once installed, start the XRDP service and set it to run on boot:

sudo service xrdp start

sudo update-rc.d xrdp enable

Configure Firewall Settings

To ensure smooth remote desktop access, configure your firewall to allow connections on the
default RDP port (3389). Use the following commands:

sudo apt install ufw

sudo ufw allow 3389/tcp

sudo ufw reload

Connect to Kali Linux Remotely

With everything set up, you can connect to your Kali Linux machine remotely using an RDP client.
Enter the IP address of your Kali system, and you'll be prompted to enter your credentials.

Enjoy the convenience of managing your Kali Linux environment remotely, enhancing your
efficiency and flexibility in cybersecurity tasks.

Setting up RDP with XFCE

Enhancing the remote desktop experience on Kali Linux often involves choosing a suitable desktop
environment. XFCE, known for its lightweight and user-friendly nature, can be seamlessly
integrated with RDP.
Install XFCE Desktop Environment

Begin by installing the XFCE desktop environment using the following command:

sudo apt install xfce4

Configure XRDP to Use XFCE

After XFCE is installed, configure XRDP to use it as the default desktop environment. Open the
XRDP configuration file:

sudo nano /etc/xrdp/xrdp.ini

Locate the `[xrdp1]` section and change the `port=-1` to `port=ask-1`. Save the changes and exit the
editor.

Restart XRDP Service

Restart the XRDP service to apply the configuration changes:

sudo service xrdp restart

Now, when you connect to Kali Linux via RDP, you'll be prompted to choose the desktop
environment. Select "XFCE Session" to initiate the remote connection with the XFCE desktop.

VNC for Kali Remote Desktop

VNC (Virtual Network Computing) provides an alternative method for remote desktop access on
Kali Linux. Explore how to set up VNC for Kali Remote Desktop for a versatile and user-friendly
experience.

Install VNC Server

Install a VNC server on your Kali Linux machine. For example, using TightVNC:

sudo apt install tightvncserver

Start VNC Server

Start the VNC server using the following command:

tightvncserver

Set up a VNC password when prompted.

Install VNC Viewer on Local Machine

On your local machine, install a VNC viewer. RealVNC or TigerVNC are popular choices.

Connect to Kali Linux via VNC

Open the VNC viewer, and enter the Kali Linux IP address followed by the VNC server display
number (e.g., `192.168.1.2:1`). Enter the VNC password when prompted.

Terminal Access Using SSH

While remote desktop solutions provide graphical access, terminal access using SSH remains a
fundamental aspect of Kali Linux. Here's a guide on utilizing SSH for efficient and secure terminal
access.
Install OpenSSH Server

Ensure the OpenSSH server is installed on your Kali Linux machine:

sudo apt install openssh-server

Start SSH Service

If not started automatically, initiate the SSH service:

sudo service ssh start

Connect via SSH

On your local machine, open a terminal and use the following command to connect to your Kali
Linux machine:

ssh username@kali-linux-ip

Replace `username` with your Kali Linux username and `kali-linux-ip` with the actual IP address.

Install Xrdp

sudo apt install xrdp -y

sudo adduser xrdp ssl-cert

sudo systemctl enable xrdp

sudo reboot

3. Install Tor for anonymity and privacy


Tor is a valuable tool for maintaining online anonymity and privacy. It
directs your internet traffic through a network of volunteer-operated servers,
making it difficult for others to track your online activities. Installing Tor on
Kali Linux is a straightforward process. Use the following command:

sudo apt install tor


2. Install Essential Tools:

Here, we will be installing essential tools for penetration testing on Kali Linux using the command
“sudo apt install kali-linux-default.” This command installs a default set of tools curated for
penetration testing purposes, providing security professionals and ethical hackers with a
comprehensive toolkit to assess and secure systems effectively. It ensures that Kali Linux is equipped
with the necessary tools right from the start.

sudo apt install kali-linux-default

3. Create a Standard User:

So, Now we will create the Standard User for our Kali Linux System, To enhance security and adhere
to best practices, it is advisable to refrain from utilizing the root account for routine activities.
Instead, create a standard user account with sudo privileges. This can be accomplished by executing
the command. Set up a non-root user for daily tasks you can create the standard user using the
following command – Replace “your_username” with your desired username. This ensures that daily
tasks are performed with a non-root user, contributing to a more secure computing environment.

sudo adduser your_username


4. Configure Network Repositories:

After that, you can Ensure the correct network repository configuration using the following
command. Once the initial setup is complete, it is imperative to validate and optimize the network
repository configuration. This verification ensures your system fetches software packages from
accurate and current sources. Execute the following command to safeguard this configuration. This
crucial step guarantees that your system remains synchronized with the latest software releases and
security patches.

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

sudo echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" | sudo tee
/etc/apt/sources.list

5. Set Keyboard Layout:

So, to optimize that keyboard layout Configure the correct keyboard layout using the following
command, it used to enhance typing efficiency and accuracy, it is crucial to configure the correct
keyboard layout. Utilize the following command for this purpose. This ensures a seamless and
optimized typing experience in alignment with your preferred layout.

sudo dpkg-reconfigure keyboard-configuration


6. Enable SSH (if needed):

So, here, install the OpenSSH server and initiate its services, facilitating a secure and encrypted
communication channel for remote access to your Kali Linux system. Ensure that SSH is configured
with appropriate security measures, such as key-based authentication, for enhanced security. If
remote access to your Kali Linux machine is required, enabling SSH (Secure Shell) is a secure and
recommended method. Execute the following commands to install and start the SSH server.

sudo apt install openssh-server

sudo service ssh start

7. Configure Firewall:

Ensuring robust network security involves the establishment and configuration of a firewall. Execute
the following commands to set up and configure the Uncomplicated Firewall (ufw). The
Uncomplicated Firewall provides a straightforward interface for controlling both incoming and
outgoing network traffic, enhancing the overall security posture of your Kali Linux system. Now you
can set up and configure the firewall using ufw using the following command:
sudo apt install ufw

sudo ufw enable

8. Install VPN Software:

VPNs (Virtual Private Networks) are pivotal in augmenting security by encrypting internet
connections. The installation of VPN software, such as OpenVPN, introduces an additional layer of
protection. This becomes particularly significant when connecting to potentially insecure networks or
conducting security assessments, fortifying the overall security infrastructure of your Kali Linux
system. If secure connections are a priority, consider installing and configuring VPN software.

sudo apt install openvpn


9. Install GDebi (for handling .deb files):

So, now we will Install GDebi serves as a convenient tool for streamlining the installation of software
packages in the .deb format. By efficiently resolving dependencies, GDebi ensures a seamless
installation process when dealing with external packages. This tool enhances the overall package
management experience on your Kali Linux system. Simplify the installation of .deb packages with
the following command:

sudo apt install gdebi

10. Install Wireshark (if not already installed):

So here we will install the Wireshark Network Analyzer tool that serves as a robust network protocol
analyzer, facilitating the capture and analysis of network traffic. This tool is important for conducting
comprehensive security assessments and troubleshooting network-related issues. By installing
Wireshark, you gain valuable insights into network behavior, thereby bolstering the security posture
of your system.

sudo apt install wireshark

To open the Wireshark you have to run the following command.

wireshark
11. Optimize Power Management (for laptops):

Optimizing power management with tools like TLP involves tweaking various settings to achieve
better power efficiency. This step is crucial for users relying on laptops, ensuring an extended battery
life while running Kali Linux. Adjust TLP configurations as needed to strike the right balance between
performance and power conservation. Enhance power efficiency and extend battery life on laptops
running Kali Linux by installing tools like TLP.

sudo apt install tlp

12. Install a Terminal Multiplexer

A terminal multiplexer allows you to manage multiple terminal sessions within a single window.
Think of it like having multiple tabs in your web browser, but for your command line. This is
invaluable for multitasking and organizing your workflow.

Installing tilix

sudo apt-get install tilix


installing a terminal multiplexer

13. Installing Git in Kali Linux

Git is a powerful distributed version control system (DVCS) widely used for tracking changes in files
and directories, primarily in software development projects. It allows you to manage different
versions of your code, collaborate with others, and revert to previous versions

Command:

sudo apt install git

installing git in kali linux

14. Installing Latest Version of tor in kali Linux

In Kali Linux, Tor is primarily used to browse the internet anonymously, access restricted content,
enhance privacy and security, conduct research and investigations, protect whistleblowers’ identities,
and bypass internet censorship. It serves as a valuable tool for maintaining privacy and anonymity
while using the internet, making it essential for cybersecurity professionals and privacy-conscious
individuals.
Command to Install tor:

sudo apt install tor

install tor in kali Linux

15. Installing Code Editor in Kali Linux

Installing a code editor in Kali Linux is essential for tasks like scripting, automation, software and web
development, and general text editing. It provides features such as syntax highlighting,
autocompletion, and code navigation, making it easier to write and edit code efficiently. Whether
you’re writing scripts for penetration testing, developing applications, or editing configuration files, a
code editor is a valuable tool for anyone working with code on Kali Linux. For example: Visual Code ,
Sublime Text and Atom.

Installing Visual Studio Code (VS Code):

sudo apt install code

Installing Sublime Text:

sudo apt install sublime-text

Installing Atom:

sudo apt install atom

15 Things To Do After Installing Kali Linux – FAQs

How do I update Kali Linux after installation?

After installing Kali Linux, it’s important to update the system to ensure you have the latest security
patches and software updates. You can do this by opening a terminal and running the following
commands:

sudo apt update


sudo apt upgrade

How do I install new tools and software on Kali Linux?


Kali Linux comes with a wide range of pre-installed tools, but you may need to install additional
software or tools. You can do this using the apt package manager.

For example, to install the gimp image editor, you would use the following command:

sudo apt install gimp

How do I configure my network settings in Kali Linux?

You can configure your network settings in Kali Linux using the Network Manager tool. You can
access this tool by clicking on the network icon in the system tray. From there, you can configure your
network connection settings, such as IP address, gateway, and DNS servers.

How do I enable the root user in Kali Linux?

By default, the root user is disabled in Kali Linux for security reasons. However, you can enable the
root user by running the following command in a terminal:

sudo passwd root

You will be prompted to enter a new password for the root user.

How do I secure my Kali Linux installation?

To secure your Kali Linux installation, you should follow best practices for securing any Linux system.
This includes regularly updating your system, using strong passwords, and configuring a firewall. You
can also use tools like `fail2ban` to protect against brute-force attacks.

4. Install Git for version control


Git is a predominantly used version control system that allows you to track
file changes and collaborate with others on software development projects.
To install Git on your Kali Linux system, use the following command:

sudo apt install git


Install git
After installation, you can use Git to manage your source code repositories
efficiently.

5. Install proprietary graphics card drivers


Installing proprietary graphics card drivers can significantly improve the
performance and compatibility of your system. Proprietary drivers, provided
by graphics card manufacturers, often offer better performance and
advanced features than open-source drivers. Installing these drivers varies
depending on your graphics card vendor and model.

Also Read
 How to install Metasploit on Kali Linux
 How to update Kali Linux repository
 Mastering the Kali Linux sources.list file usage
For NVIDIA graphics cards, you can use the nvidia-detect command to
identify the appropriate driver for your system:

sudo apt install nvidia-detect

nvidia-detect

The command will provide instructions on installing the recommended


driver for your NVIDIA graphics card if you have NVIDIA graphics.
However, if you don’t like what I do, you will get a message similar to the
output shown below:

Install nvidia-detect and check drivers


For AMD graphics cards, the fglrx driver is the proprietary option. You can
install it using the subsequent line of code:

sudo apt install fglrx-driver

Ensure you consult your specific graphics card model’s official


documentation or support resources to find the most suitable and up-to-
date proprietary driver.

6. Install Gdebi package manager


Gdebi is a lightweight package manager that simplifies the installation of
Debian package files (.deb). It automatically resolves dependencies and
provides a convenient way to install packages from local files. To install
Gdebi on Kali Linux, use the following command:

sudo apt install gdebi


Install Gdebi package manager
Once installed, you can right-click on a .deb package file and choose
“Open with GDebi Package Installer” to install the package using Gdebi.

7. Customize your desktop with themes


Customizing the appearance of your Kali Linux desktop can enhance your
computing experience and make it more enjoyable and personalized.
Installing a new theme allows you to change the feel and look of your
desktop environment. There are various themes available online that you
can choose from to suit your preferences.

To install a new theme, you must first download the theme file in the
appropriate format (usually a .tar.gz or .zip file). After downloading the
theme, extract it and move it to the appropriate directory. It is crucial to note
that the directory where you place the theme files may vary depending on
your desktop environment.

For instance, if you are using the Xfce desktop environment, you can move
the extracted theme folder to the ~/.themes directory:

# Move the theme folder to the ~/.themes directory

mv /path/to/theme ~/.themes/

After moving the theme folder, you can apply the theme through the
appearance settings of your desktop environment.
Also Read
 How to install Metasploit on Kali Linux
 How to update Kali Linux repository
 Mastering the Kali Linux sources.list file usage
Let’s install a theme to change the look and feel of your Xfce desktop
environment.

1. Visit a website that offers Xfce themes, such as xfce-look.org.

Download a theme
2. Download a theme of your choice in the appropriate format (usually a
.tar.gz or .zip file).
3. Extract the downloaded theme archive to a location of your choice.
Extract downloaded theme
4. Move the extracted file to the ~themes folder using the following
command:

5. cd Downloads/
6.

mv Mkos-Big-Sur/ ~/.themes/
Move files to themes folder
7. Open the “Tweaks” application from the application menu. If you don’t
have it installed in your Kali Linux OS, execute the following line of
code:

sudo apt install gnome-tweaks

Install gnome-tweaks
8. Launch “Tweaks” application > go to the “Appearance” or “Style”
settings and choose the installed theme.
macOS theme
Once a theme has been installed, you can choose the it from the options
above.

With the installed theme, your Xfce desktop environment will now sport a
fresh look.
macOS theme home screen
8. Explore different desktop environments
Kali Linux comes with the Xfce desktop environment as the default choice.
However, you may want to explore other desktop environments to find the
one that best suits your needs and preferences. Different desktop
environments offer different features, aesthetics, and workflows.

To install a new desktop environment, you need to identify the name of the
desktop environment you want to install. Some popular choices include
GNOME, KDE, and Cinnamon. Use the following command to install a new
desktop environment:

sudo apt install <desktop-environment>

Replace <desktop-environment> with the name of the desktop


environment you want to install. For example, to install GNOME, use sudo
apt install gnome-core. Installing a new desktop environment may require
significant disk space and additional packages.
Once the installation process is complete, log out of your current session,
and on the login screen, you can choose the newly installed desktop
environment from the session options.

Let’s install GNOME, a popular and feature-rich desktop environment:

sudo apt install gnome-core


Install gnome desktop environment
Once the installation process is complete, log out of your current session.
On the login screen, locate the gear icon and select “GNOME” from the
desktop environments list provided. Log in, and you’ll be greeted with the
GNOME desktop environment.

9. Enable autologin for a seamless login experience


Enabling autologin allows you to bypass the login screen and automatically
log into your Kali Linux system. This can be impactful if you are the sole
user of the system or prefer a faster login experience. To enable autologin,
you need to modify the LightDM configuration file.

Also Read
 How to install Metasploit on Kali Linux
 How to update Kali Linux repository
 Mastering the Kali Linux sources.list file usage
Open the LightDM configuration file using a text editor:

sudo nano /etc/lightdm/lightdm.conf

Within the file, find the [SeatDefaults or Seat*] section and add the
following lines:
autologin-user=<your-username>

autologin-user-timeout=0

Configure autologin
Replace <your-username> with your actual username. Save the file and
terminate the text editor session. Afterward, restart your system, and it will
automatically log in to the specified user account.
10. Resolve the “Device Not Managed” error
The “Device not managed” error in Network Manager can prevent you from
accessing specific network settings and features. This error typically occurs
when other tools, such as ifupdown or manual configuration, manage
network interfaces.

You need to modify the Network Manager configuration file to resolve this
issue. Launch the configuration file in a text editor:

sudo nano /etc/NetworkManager/NetworkManager.conf


Within the file, add the following lines under the [device] section:

wifi.scan-rand-mac-address=no

Append the following line of code


Save the file and terminate the text editor session. Then, restart the
Network Manager service to apply the changes:

sudo service network-manager restart

The “Device not managed” error should no longer appear, and you can
manage your network interfaces through the Network Manager.

11. Clone the Rubber Ducky Encoder


The Rubber Ducky is a popular USB-based keystroke injection tool for
security auditing and penetration testing. You can clone the Rubber Ducky
encoder repository from GitHub to work with Rubber Ducky scripts on Kali
Linux.
First, move to the directory where you want to clone the repository. Then,
use the following command:

Also Read
 How to install Metasploit on Kali Linux
 How to update Kali Linux repository
 Mastering the Kali Linux sources.list file usage

git clone https://github.com/securipy/USB-Rubber-Ducky.git

Clone USB-Rubber-Ducky
This line of code will create a local copy of the Rubber Ducky encoder
repository on your system. You can now explore and utilize the Rubber
Ducky scripts and tools.

12. Set up a code editor


Having a reliable code editor is essential for writing and editing scripts,
code, and configuration files. Kali Linux offers various code editors,
including popular options like Visual Studio Code, Sublime Text, and Atom.

You can install your preferred code editor by either using the package
manager or downloading it from the official website. Here are a few
examples:
 Visual Studio Code (VS Code):

sudo apt install code

 Sublime Text:

sudo apt install sublime-text

 Atom:

sudo apt install atom

Choose the code editor that best suits your needs and preferences and
install it using the appropriate command.

Install Visual Studio Code


13. Configure file sharing with syncthing
Syncthing is an open-source file synchronization tool allowing you to
securely share files between devices. It ensures that your files are always
up to date across multiple platforms and devices. To install Syncthing,
follow these steps:

1. Add the Syncthing repository key:

curl -s https://syncthing.net/release-key.txt | sudo apt-key add –


2. Add the Syncthing repository to your sources list:

echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee


/etc/apt/sources.list.d/syncthing.list

3. Update the package list and install Syncthing:

sudo apt update

sudo apt install syncthing

Install syncthing
After installation, you can access the Syncthing web interface by opening a
web browser and navigating to http://localhost:8384. You can configure
file sharing and sync your files across devices from there.
Start syncthing from the web
14. Install your favorite hacking tools
Kali Linux is renowned for its extensive collection of pre-installed hacking
tools. However, dependent on your specific needs and preferences, you
may want to install additional tools that are not included by default. You can
install your favorite hacking tools using the package manager or by
following the installation instructions provided by the tool’s developers.

For example, to install the popular tool “Wireshark” for network analysis
and packet sniffing, use the following command:

sudo apt install wireshark


Install Wireshark
Similarly, you can install other tools of your choice by replacing <tool-
name> with the name of the specific tool.

Wireshark
15. Boost your productivity with a terminal multiplexer
A terminal multiplexer allows you to manage multiple terminal sessions
within a single window, enabling efficient multitasking and process
management. One popular terminal multiplexer is tmux. To install tmux,
use the following command:
Also Read
 How to install Metasploit on Kali Linux
 How to update Kali Linux repository
 Mastering the Kali Linux sources.list file usage

sudo apt install tmux

Install Tmux
Once installed, you can launch tmux by typing tmux in the terminal. Refer
to the tmux documentation for information on how to use it effectively.

You might also like