0% found this document useful (0 votes)
35 views

Kali Setup On Raspberry Pi - Part 3, Setup VNC Server and Client - by Varsha Chahal - Medium

How to set up Kali linux on rasppbery pi

Uploaded by

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

Kali Setup On Raspberry Pi - Part 3, Setup VNC Server and Client - by Varsha Chahal - Medium

How to set up Kali linux on rasppbery pi

Uploaded by

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

6/28/24, 7:40 PM Kali setup on Raspberry Pi: Part 3, Setup VNC server and client | by Varsha Chahal | Medium

Kali setup on Raspberry Pi: Part 3,


Setup VNC server and client
Varsha Chahal · Follow
4 min read · Jan 25, 2024

36

I have used the x11vnc server and RealVNC viewer client.


To install VNC server on Kali run the following command,

sudo apt install x11vnc

Next, we will create a password for the VNC server and store it in the
/etc/vncserver.pass file by running the following command,

sudo x11vnc -storepasswd

https://medium.com/@VarshaChahal/kali-setup-on-raspberry-pi-part-3-setup-vnc-server-and-client-18a3f55776de#:~:text=Once the installation is completed,other s… 1/11


6/28/24, 7:40 PM Kali setup on Raspberry Pi: Part 3, Setup VNC server and client | by Varsha Chahal | Medium

If you want to run and manage the VNC server as a systemd service, you can
define a service for it under the /etc/systemd/system/ directory. This allows
for easy management and configuration of the VNC server using systemd, a
system and service manager for Linux operating systems.
Run the following command to create a service,

sudo nano /etc/systemd/system/vncserver.service

Paste the below script to the vncserver.service file:

ever -loop -noxdamage -repeat -rfbauth /etc/vncserver.pass -rfbport 5900 -shared

“After=multi-user.target “ is used to make sure that the service runs after all
the enabled services. It” represents the state of the system when it is ready to

https://medium.com/@VarshaChahal/kali-setup-on-raspberry-pi-part-3-setup-vnc-server-and-client-18a3f55776de#:~:text=Once the installation is completed,other s… 2/11


6/28/24, 7:40 PM Kali setup on Raspberry Pi: Part 3, Setup VNC server and client | by Varsha Chahal | Medium

accept non-graphical multi-user sessions.

In the /boot/config.txt file, uncomment the following flags,

Open in app Sign up Sign in

Search Write
framebuffer_width=1280
framebuffer_height=720
hdmi_force_hotplug=1

framebuffer_width and framebuff_height are used to adjust the resolution of


the display.
hdmi_force_hotplug=1 to enable HDMI mode even if no HDMI monitor is
detected.

Start the VNC server by running the following commands,

sudo systemctl enable vncserver


sudo systemctl start vncserver

Check the VNC server status by running:

systemctl status vncserver

https://medium.com/@VarshaChahal/kali-setup-on-raspberry-pi-part-3-setup-vnc-server-and-client-18a3f55776de#:~:text=Once the installation is completed,other s… 3/11


6/28/24, 7:40 PM Kali setup on Raspberry Pi: Part 3, Setup VNC server and client | by Varsha Chahal | Medium

VNC server is now running and using port 5900 by default.

Now that the VNC server is up, let’s get the client ready.
There are various clients available, I am using RealVNC. You can download it
from here: https://www.realvnc.com/en/connect/download/viewer/

Once the installation is completed, click on “File”, and then “New


Connection” to create a new VNC connection. You will see the following
window,

https://medium.com/@VarshaChahal/kali-setup-on-raspberry-pi-part-3-setup-vnc-server-and-client-18a3f55776de#:~:text=Once the installation is completed,other s… 4/11


6/28/24, 7:40 PM Kali setup on Raspberry Pi: Part 3, Setup VNC server and client | by Varsha Chahal | Medium

Enter the VNC server IP address or hostname. You can customize other
settings as you like.
Once you click “OK”, you will see your connection listed in the Address book.
Double-click on the connection, and you will be presented with the dialog
box indicating that the connection is unencrypted.

https://medium.com/@VarshaChahal/kali-setup-on-raspberry-pi-part-3-setup-vnc-server-and-client-18a3f55776de#:~:text=Once the installation is completed,other s… 5/11


6/28/24, 7:40 PM Kali setup on Raspberry Pi: Part 3, Setup VNC server and client | by Varsha Chahal | Medium

We will set up an SSH tunnel later to establish an encrypted connection to


the VNC server. Before that, let’s test whether the VNC connection was
established successfully. Click “Continue” and provide the VNC server
password that we configured earlier. You should now be able to access the
Kali box via a GUI.

If you encounter a black screen in your VNC viewer window, you may need
to adjust the resolution settings on your Raspberry Pi using the kalipi-

config pre-installed in your Kali box, to ensure compatibility between the


Raspberry Pi’s display settings and those of your VNC viewer.
To configure the display settings, run:

sudo kalipi-config

You will see the following dialog box,

https://medium.com/@VarshaChahal/kali-setup-on-raspberry-pi-part-3-setup-vnc-server-and-client-18a3f55776de#:~:text=Once the installation is completed,other s… 6/11


6/28/24, 7:40 PM Kali setup on Raspberry Pi: Part 3, Setup VNC server and client | by Varsha Chahal | Medium

Navigate to the “Advanced Options” section and configure the resolution


settings according to your requirements.
When you finish modifying the configurations you will be asked whether
you want to reboot the system, select “Yes”.

Wait for Kali to reboot. Then connect to your Kali over SSH and check the
VNC server status to confirm that it has also booted up with your device. Try
to connect from the RealVNC to the Kali box, you should be able to see the
GUI interface now.

You can now manage your Kali box remotely via a GUI.

VNC traffic is unencrypted by default. To ensure the privacy and security of


your data, it’s recommended to set up an SSH tunnel when using VNC. You
can follow the next part of this series here to establish an SSH tunnel for
securing your VNC connection.

Raspberry Pi Kali Linux Ssh Vnc

https://medium.com/@VarshaChahal/kali-setup-on-raspberry-pi-part-3-setup-vnc-server-and-client-18a3f55776de#:~:text=Once the installation is completed,other s… 7/11


6/28/24, 7:40 PM Kali setup on Raspberry Pi: Part 3, Setup VNC server and client | by Varsha Chahal | Medium

Written by Varsha Chahal Follow

13 Followers

More from Varsha Chahal

Varsha Chahal Varsha Chahal

Same-origin Policy(SOP) Working with Macros in Burp Suite


What is Same-origin Policy? Recently, while testing for Server Side
Template Injection on a website, I observed…

Oct 10, 2023 4 Jan 14 2

https://medium.com/@VarshaChahal/kali-setup-on-raspberry-pi-part-3-setup-vnc-server-and-client-18a3f55776de#:~:text=Once the installation is completed,other s… 8/11


6/28/24, 7:40 PM Kali setup on Raspberry Pi: Part 3, Setup VNC server and client | by Varsha Chahal | Medium

Varsha Chahal Varsha Chahal

Using Lua Nginx module for Exploiting PHP deserialization with


dynamic routing based on Redis… a pre-built gadget chain
Working with Nginx modules can bring What is insecure deserialization? Insecure
amazing flexibility to customize and make th… deserialization occurs when user-controllabl…

Jul 25, 2021 189 1 Jan 7 3

See all from Varsha Chahal

Recommended from Medium

https://medium.com/@VarshaChahal/kali-setup-on-raspberry-pi-part-3-setup-vnc-server-and-client-18a3f55776de#:~:text=Once the installation is completed,other s… 9/11


6/28/24, 7:40 PM Kali setup on Raspberry Pi: Part 3, Setup VNC server and client | by Varsha Chahal | Medium

Shilleh Konstantinos Patronas

Raspberry Pi Pico/Pico W Free How to hide a file inside another file


Simulator Assume the following scenario! you are a spy
Recently, I discovered a useful tool that makes and you want to hide your files! Since you are…
coding on the Raspberry Pi Pico and Pico W…

6d ago Jun 11 146 2

Lists

Staff Picks
673 stories · 1096 saves

Audrey's weBlog & reViews in OSINT TEAM Oliver Lövström in Wake. Write. Win.

Ethical Hacking 101 with Linux — A My Homelab


Booklet The homelab is complete, at least for now. So,
I thought it would make for a fun Medium…

https://medium.com/@VarshaChahal/kali-setup-on-raspberry-pi-part-3-setup-vnc-server-and-client-18a3f55776de#:~:text=Once the installation is completed,other … 10/11


6/28/24, 7:40 PM Kali setup on Raspberry Pi: Part 3, Setup VNC server and client | by Varsha Chahal | Medium

This compilation is a mere amalgamation of


short pieces in the beginners’ series “Ethical… Mar 26 110

Jun 16 111 2

Vijay Gupta 🌬️ Mitch in Read or Die!


Kali Linux Tools: The Ultimate I Almost Got Genius Level
Guide Scammed Today.
Kali Linux is a powerful Debian-based Have you ever heard of Vishing?
distribution tailored for security professional…

May 21 33 1 Jun 14 11.5K 231

See more recommendations

https://medium.com/@VarshaChahal/kali-setup-on-raspberry-pi-part-3-setup-vnc-server-and-client-18a3f55776de#:~:text=Once the installation is completed,other … 11/11

You might also like