Member-only story

Installing Snort on Kali Linux

2020 Setup

--

Hi! In this tutorial, I will show you how to install Snort on Kali Linux. Installing Snort is not as easy (it’s a pain in the a**) as installing other tools where we simply need to run the command sudo apt install [tool_name]. Because Snort does not exist as a package within Kali’s apt repository, we will need to use Ubuntu’s apt repositories. Let’s get Snort installed on your machine.

Make a Backup of Current Sources.list File

First, we need to create a backup of Kali’s sources.list file in order to restore it later:

mv /etc/apt/sources.list /etc/apt/sources.list.bak

Remove currently installed Kali Updates

Go to /var/lib/apt/lists and delete all the files within the directory, leaving only the partial and auxfiles directory:

find /var/lib/apt/lists -type f -exec rm {} \;

Download Ubuntu Sources.list File

Download Ubuntu’s sources.list file into the /etc/apt/ directory:

wget https://gist.githubusercontent.com/ishad0w/788555191c7037e249a439542c53e170/raw/3822ba49241e6fd851ca1c1cbcc4d7e87382f484/sources.list -O /etc/apt/sources.list

Attempting to Update

Attempting to update withsudo apt updateusing the Ubuntu Sources.list file will generate an error regarding GPG public keys:

GPG error: http://archive.ubuntu.com/ubuntu focal-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C

informing us that the Ubuntu server public keys were not found on our machine. So, we need to add the specified public keys to our computer:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C

Run sudo apt update and you should be ready to install snort now!

Install Snort

--

--

Alex Rodriguez
Alex Rodriguez

Written by Alex Rodriguez

I am an Offensive Security Engineer @ Amazon who writes about cybersecurity and anything related to technology. Opinions are my own.

Responses (19)

Write a response