Skip to content

Instantly share code, notes, and snippets.

@incogbyte
Last active April 4, 2024 16:25
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save incogbyte/41fb4902b2db2bbddf5b5af264e41ca5 to your computer and use it in GitHub Desktop.
Save incogbyte/41fb4902b2db2bbddf5b5af264e41ca5 to your computer and use it in GitHub Desktop.
Convert Debian 10 or Ubuntu > 12 to Kali Linux on Google Cloud or Any Debian

Convert Debian 10 to Kali Linux on Google Cloud or Any Debian

After you create an account on Google Cloud, and create your VPS using Debian 10, follow the below guide to convert your Debian to Kali Linux Latest Version:

Convert Debian to Kali:

Step 1:

apt-get update -y && apt-get full-upgrade -y && apt-get dist-upgrade -y && apt autoremove -y && apt autoclean

Step 2:

apt-get install wget gnupg dirmngr

Step 3:

wget -q -O - https://archive.kali.org/archive-key.asc | gpg --import

Step 4:

echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" >> /etc/apt/sources.list gpg -a --export ED444FF07D8D0BF6 | sudo apt-key add -

Step 5:

apt-get update -y && apt-get full-upgrade -y && apt-get dist-upgrade -y && apt autoremove -y && apt autoclean

Step 6:

apt-get install kali-linux-default or core, everything and for the biggest image large

Script to update:

touch kali_update.sh

echo "apt-get update -y && apt-get full-upgrade -y && apt-get dist-upgrade -y && apt autoremove -y && apt autoclean" > kali_update.sh

chmod +x kali_update.sh

Enable Root Login SSH:

/etc/ssh/sshd_config

PermitRootLogin yes PasswordAuthentication yes

Some Tools:

Install PIP

apt install python3-pip

Enable Remote GUI:

Install Gui:

First Create a Firewall Rule for Port 5900 and 5901 in Google Cloud on 0.0.0.0/0

apt-get install xfce4 xfce4-goodies -y

Configure:

nano ~/.vnc/xstartup

Put:

#!/bin/bash xrdb $HOME/.Xresources startxfce4 &

chmod +x ~/.vnc/xstartup

First Try with tightvncserver

apt-get install tightvncserver

Then try with X11vnc if you need.

apt-get install x11vnc novnc net-tools

Set PW: x11vnc -storepasswd

Check: ps wwwaux | grep auth

Connect with RealVNC

@ccataha
Copy link

ccataha commented Jul 6, 2022

if you have issues with libcrypt:
cd /tmp
apt -y download libcrypt1
dpkg-deb -x libcrypt1 .deb .
cp -av lib/x86_64-linux-gnu/* /lib/x86_64-linux-gnu/
apt -y --fix-broken install

and if you have issues with dbus
generate UUID through dbus-uuidgen and paste to directory like /etc/machine-id or /var/lib/dbus/machine-id

@c0wb0yp0tat0
Copy link

c0wb0yp0tat0 commented Apr 2, 2023

Great guide, thanks! I use it frequently.

I find it helpful to amend step 3 and 4.

Step: 3

wget https://http.kali.org/pool/main/k/kali-archive-keyring/kali-archive-keyring_2024.1_all.deb

and then

dpkg -i kali-archive-keyring_2024.1_all.deb

then on step 4:

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

@incogbyte
Copy link
Author

Thanks! @c0wb0yp0tat0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment