How to Use Kali Linux on Raspberry Pi 4 As a Remote NMAP Network Access and

Hardware used for this video
CanaKit Raspberry Pi 4 4GB Starter Kit with Clear Case (4GB RAM)

Commands used in the video:
installing X2GO Server
apt-get install x2goserver

Zero Tier One Arm64 Download

sudo dpkg -i zerotier-one_1.4.6_arm64.deb
sudo update-rc.d zerotier-one enable
sudo zerotier-cli join

The NMAP commands
sudo apt-get install xsltproc
sudo nmap --script discovery -oX report.xml && xsltproc report.xml -o "date +%m%d%y_tom_house_report.html"

Other videos mentioned

Zerotier Tutorial: Delivering the Capabilities of VPN, SDN, and SD-WAN via an Open Source System

X2GO: Linux Remote Desktop & Terminal Server System With Support For Published Applications

Linux Proxychains Using SSH & SOCKS Proxy For Easy Remote Management & Testing

Getting Started With TMUX

1 Like

Hey @LTS_Tom,

You’re missing the end quote on the NMAP command :wink:

Tom, the nmap command here is different from the video. Is this command option (-sV) more recommended than using the discovery script? -sV probes for open ports. Does the discovery script do more?

sudo nmap --script discovery -oX report.xml && xsltproc report.xml -o "date +%m%d%y_toms_house_report.html"

sudo nmap -sV -oX report.xml && xsltproc report.xml -o "date +%m%d%y_toms_house_report.html"

Also, missing the `'s around the date command, but I think that’s the forum’s markup language’s fault.

Oh and it’s “Khaaahlee”, not “Kayley” :slight_smile:

I am sometimes bad at pronouncing things, sometimes words are hard. But I did update the command in the original post.

sudo nmap --script discovery -oX report.xml && xsltproc report.xml -o "date +%m%d%y_tom_house_report.html"


For some reason, when I try to restart the image on a RPi 4 4g, the pi doesn’t restart. The RPi shows a red light solid only and the fan turns off but it does not restart without me disconnecting and reconnecting power. Has anyone seen this? Downloaded the image from kali and used the latest version of etcher.

Have you tried to use a different SD-Card?

Like Tom said, try another sd card. Always try to exclude reasons by testing.

If the same card works with raspbian, it could be that the image you’ve downloaded is corrupted.
Maybe the sd card is not working correctly, so try another card. :wink:

Thanks @zuidwijk @LTS_Tom. Going to try that today but I’m pretty sure I narrowed it down to the kernel version as Kali stated in its 2020.3 release " A few things which are work in progress:

  • RaspberryPi images are using 4.19 kernels. We would like to move to 5.4 however, nexmon isn’t working properly with it (as the new kernel requires firmware version => 7.45.202) for which no nexmon patch exists yet"

Also, I can’t access bluetooth and other users on reddit (under r/Kalilinux) are having issues with wifi. Still going to try the SD card replacement method but this feels like a kernel version issue. I’ll keep you posted. Thanks for your replies.

@LTS_Tom Just popped in another SD card and I’m still seeing the same issues. Do you notice the same behavior on your pi with a fresh 2020.3 image?

I downloaded it the day before I made the video and had no issues. I just flashed it to the SD card and it booted right away. As is stated in the video, I am using the “Kali Linux RaspberryPi 2 (v1.2), 3 and 4 (64-Bit)” one.

Hey Tom,

I decided to build one of these… but following along when I apt-get install x2goserver I get E: Unable to locate package x2goserver… Did I miss adding a repository or something?

Worked for me using the default repository. Did you do a sudo apt-get update && sudo apt-get upgrade first?

Yup… something strange here… seems to be complaining that the repository isn’t working… problem with it’s signature? perhaps I should start over… :confused: I tried to copy and paste the entire error but it contains too many links and I’m only allowed two.

kali@kali:~$ sudo apt-get update && upgrade
[sudo] password for kali:
Get:2 kali-pi InRelease [8133 B]
Err:2 kali-pi InRelease
The following signatures were invalid: EXPKEYSIG 11764EE8AC24832F Carsten Boeving <carsten.boeving@whitedo>

Sounds like a bad key signature. Try running this to update the keys and then run the system update again.

sudo apt-key adv --keyserver --recv-keys 11764EE8AC24832F

Well there are fewer error messages now… but still won’t update…

: Failed to fetch Clearsigned file isn’t valid, got ‘NOSPLIT’ (does the network require authentication?)
E: The repository ‘ kali-rolling InRelease’ is not signed.

That’s all I can post because of the two link limit… so hopefully those make sense.

Might want to try their forums.

Nice job Tom! I Have an old pi3 kicking around. I am gonna give this a go on that and see how it works. If it makes sense to use in my IT business especially with pentests etc, I will buy a couple of 4’s

Thanks again!

1 Like


I ran into the same issues as you did. I knew it had to be a sources.list issue.

After doing a bit of digging I came up with this (link)

Basically I think if you run the system for the first time without it connected to the internet (which is what I did) it may not pull the real sources list? I can’t be for sure, but my system is upgrading now. I will, however, burn it down to the ground and start over later with it plugged into the network and see if that changes things.

Anyways the thing you need in your sources.list is deb kali-rolling main non-free contrib

@LTS_Tom - Might be helpful to your video if anyone asks again.

For reference mine looks like this now. I commented out the first two lines;

kali@kali:/etc/apt$ cat sources.list
#deb main contrib non-free
#deb-src main contrib non-free

deb kali-rolling main non-free contrib

Deployed the box i built last night at a clients site today. This has so many use cases above and beyond just discovery and pentesting!

proxychains remmina Bang secure RDP without a VPN!

I ran into the same error. Running update / upgrade won’t resolve the issue because they evidently don’t include all of the repositories in their default config.

Go to the Kali repositories page and they will give you the commands to add the repositories to your config. I didn’t really play around to see which one actually worked, but I added both the regular and latest-snapshot lines.

Once you do this, then re-run your apt update/upgrade commands and then try to install x2goserver. It should work perfectly.

I hope this helps.

The Kali repositories page is:

1 Like