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
https://download.zerotier.com/debian/buster/pool/main/z/zerotier-one/zerotier-one_1.4.6_arm64.deb

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 192.168.1.0/24 -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?

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

Forum:
sudo nmap -sV 192.168.1.0/24 -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 192.168.1.0/24 -oX report.xml && xsltproc report.xml -o "date +%m%d%y_tom_house_report.html"

2 Likes

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 http://http.re4son-kernel.com/re4son kali-pi InRelease [8133 B]
Err:2 http://http.re4son-kernel.com/re4son kali-pi InRelease
The following signatures were invalid: EXPKEYSIG 11764EE8AC24832F Carsten Boeving <carsten.boeving@whitedo me.com.au>

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 keys.gnupg.net --recv-keys 11764EE8AC24832F

Well there are fewer error messages nowā€¦ but still wonā€™t updateā€¦

: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease Clearsigned file isnā€™t valid, got ā€˜NOSPLITā€™ (does the network require authentication?)
E: The repository ā€˜http://http.kali.org/kali 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

Chris,

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 http://http.kali.org/kali 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 http://kali.download/kali http://http.kali.org/kali main contrib non-free
#deb-src http://kali.download/kali http://http.kali.org/kali main contrib non-free

deb http://http.kali.org/kali 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:
https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/

1 Like