How To Deploy Malcolm Network Traffic Analysis Tool With Ubuntu Server 22.04
Jack Wallen walks you through the steps of deploying a powerful and easy-to-use network analysis tool on Ubuntu Server 22.04.
Malcolm is an open source network traffic analysis tool that uses a framework of tools to create a robust analysis tool for network administrators. Malcolm accepts network traffic data in the form of PCAP (full packet capture) files and Zeek logs.
SEE: Recruitment Kit: Network Engineer (TechRepublic Premium)
Malcolm includes two different interfaces:
- OpenSearch Dashboards: A flexible data visualization plugin with dozens of pre-built dashboards.
- Arkime: A powerful tool to find and identify network sessions consisting of suspected security incidents.
Malcolm is easy to use, containerized, secure and in very active development. I want to walk you through the process of deploying this tool on Ubuntu Server 22.04.
What you will need for Malcolm
To get Malcolm up and running, you will need an Ubuntu Server 22.10 instance and a user with sudo privileges. That’s it: let’s get to work.
How to create a new user
The first thing we are going to do is create a new user. SSH or login to your Ubuntu Server instance and run the command:
sudo useradd -m -d /opt/malcolm -s /bin/bash -G sudo malcolm
Change the new user’s password with:
sudo passwd malcolm
Log in as this user with:
su - malcolm
How to Clone Malcolm and Run the Installer
Using git, clone the latest version of Malcolm with:
git clone https://github.com/idaholab/Malcolm
Switch to the newly created directory with:
Run the installer with:
During this first stage of the installation, you will be asked a few questions. For each Y/N question, answer with
Y. The only non-Y/N question is:
Enter user account:
To this, answer with:
How to configure Malcom
Once you have answered the installer questions, you need to configure Malcolm. Open the configuration file with:
sudo ./scripts/install.py –configure
Again, you will be asked several questions. Here are the questions and the answers you need to give:
- The Malcolm processes will run as UID 1000 and GID 1000. Is this OK? (We) :
- Setting 10g for OpenSearch and 3g for Logstash. Is it correct?
- Definition of 3 workers for Logstash pipelines. Is it correct? (We) :
- Restart Malcolm when the system or Docker daemon restarts:
Yes– be sure to choose the default option, unless stopped.
- Choose to configure Malcolm with HTTPS:
- Choose whether Malcolm will run behind any proxy:
- Choose networking: press
- Choose LDAP:
- Store OpenSearch index snapshosts locally in /opt/malcolm/Malcom/opensearch-backup?
- Choose to compress OpenSearch index snapshots:
- Automatically scan all PCAP files with Suricata:
- Periodically download updated Suricata signatures:
- Automatically scan all PCAP files with Zeek:
- If you want to delete the oldest indexes when the database exceeds a certain size:
- Local reverse DNS lookup for source and destination IP addresses in the logs:
- Hardware vendor YES searches for MAC addresses:
- Perform random string notation on some fields:
- Expose the OpenSearch port to external hosts:
- Expose the Logstash port to external hosts:
- Forward Logstash logs to an external OpenSearch instance:
- Expose the Filebeat TCP port to external hosts:
- Expose the SFTP server (for PCAP download) to external hosts:
- Enable file extraction with Zeek:
- Picking out
interestingthat the fetch behavior (Figure A).
- Choose the file retention method:
- Analyze extracted files/PE files with ClamAV:
- Analyze extracted files/PE files with Yara:
- Analyze extracted files/PE files with Capa:
- Look for hashes of files extracted with VirusTotal:
- Periodically download updated scanner signatures:
- Should Malcolm capture network traffic to PCAP files for analysis with Arkime:
- Specify the capture interface(s) (separated by commas) that Malcolm will use for network traffic:
- Capture packets using netsniff-ng (Y/n):
- Capture packets using tcpdump (y/N):
- Should Malcolm analyze traffic with Suricata:
- Capture filter (tcpdump-like filter expression; leave blank to capture all traffic) 8005
- Disable capture interface hardware offload and adjust ring buffer sizes: (y/n):
Once you’ve done that, reboot the system with:
How to create an administrator account for Malcolm
Once the system has restarted, log back in and access the Malcolm account with:
su – malcolm
Change into the Malcolm directory for the user:
Run the administrator account configuration script with:
Answer all required questions as such:
- Store admin username/password for Malcolm local access?
- Create a new admin user and assign a password.
- (Re)generate self-signed SSL certificates for HTTPS web traffic:
- (Re)generate self-signed certificates for a remote log forwarder:
- Save the username/password to forward Logstash events to a secondary external OpenSearch instance:
- Save username/password for email alert sender account:
How to extract the required Docker image
Malcolm is deployed with Docker, so first we need to pull the official image with:
The pull will take a while, so sit back and enjoy the ride or go do something else. Give between two to 10 minutes for this to complete.
How to Start and Access Malcolm
To start the Malcolm service, run the command:
The above command will deploy the Docker container. Give the containers enough time to deploy and you’re good to go. Malcolm has a few different URLs for different tasks. For each component, be sure to log in with the administrator account you created during the setup step.
- For the OpenSearch dashboard, the address is https://SERVER/dashbaords, where SERVER is the IP address of the hosting server.
- For the Malcolm Capture File and Log Archive Upload screen, the address is https://SERVER/upload, where SERVER is the IP address of the hosting server.
- For the Host and Subnet Map Editor, the address is https://SERVER/name-map-ui, where SERVER is the IP address of the hosting server.
- For the account management screen, the address is https://SERVER:488, where SERVER is the IP address of the hosting server.
And that’s all there is to deploying Malcolm Network Traffic Analyzer. I hope you will take full advantage of this powerful tool.
Subscribe to TechRepublic How to make the technology work on YouTube for all the latest tech tips for professionals from Jack Wallen.