How to Install Shaark on POP! OS Latest

Shaark is a web interface to manage and capture packets from remote devices.

In this tutorial, we will show you how to install Shaark on POP! OS Latest, step by step.

Requirements

Step 1: Update the System

Before installing any package on your POP! OS Latest server, it is recommended to update the system and installed packages to their latest versions.

sudo apt update
sudo apt upgrade

Step 2: Install Dependencies

We need to install some dependencies before installing Shaark. To install them, run the following command:

sudo apt install apache2 php7.4 php7.4-cli php-curl php-xml php-mysql php-mbstring libapache2-mod-php7.4 libpcap-dev tshark

Step 3: Download and Install Shaark

Download Shaark using the following command:

wget https://github.com/MarceauKa/shaark/releases/download/2.4.1/shaark.tar.gz

Extract the downloaded file:

tar -xzf shaark.tar.gz

Move the extracted folder to the Apache web root directory:

sudo mv Shaark /var/www/html

Change the ownership of the Shaark folder and its contents:

sudo chown -R www-data:www-data /var/www/html/Shaark

Step 4: Configure Apache

Create a virtual host configuration file for Shaark:

sudo nano /etc/apache2/sites-available/shaark.conf

Add the following configuration to the file:

<VirtualHost *:80>
    ServerName  yourservername.com   # Replace with your server name or IP address
    DocumentRoot /var/www/html/Shaark

    <Directory /var/www/html/Shaark>
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/shaark_error.log
    CustomLog ${APACHE_LOG_DIR}/shaark_access.log combined
</VirtualHost>

Save and close the file.

Enable the virtual host and restart the Apache service:

sudo a2ensite shaark.conf
sudo systemctl restart apache2

Step 5: Configure Shaark

Copy the configuration file:

sudo cp /var/www/html/Shaark/Config.json.example /var/www/html/Shaark/Config.json

Edit the configuration file:

sudo nano /var/www/html/Shaark/Config.json

Change the following values:

"pcapFolder": "/var/www/html/Shaark/Packets",
"pcapShowRows": "15",
"password": "shaark",
"tcpdump": "/usr/bin/tcpdump",
"maxPacketsSaved": "100000",
"maxTimeSaved": "10080",

Save and close the file.

Step 6: Access Shaark

Open your favorite web browser and access the Shaark web interface by entering your server IP address or domain name followed by "/Shaark".

http://yourservername.com/Shaark

Conclusion

In this tutorial, we have shown you how to install Shaark on POP! OS Latest. Now, you can easily capture and manage packets from remote devices using a web interface.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!