Install RustScan on Ubuntu 24.04

Install RustScan on Ubuntu 24.04

RustScan is a modern, fast, and efficient port scanner written in the Rust programming language. This tool is designed to perform network scanning tasks quickly and with fewer resource requirements. This tutorial explains how to install RustScan on Ubuntu 24.04.

Prepare environment

RustScan requires Nmap. You can read post how to install it.

Install RustScan

Retrieve the most recent version tag of the RustScan release and assign it to a variable:

RUSTSCAN_VERSION=$(curl -s "https://api.github.com/repos/RustScan/RustScan/releases/latest" | grep -Po '"tag_name": "\K[0-9.]+')

Download the RustScan release archive:

wget -qO rustscan.tar.xz https://github.com/RustScan/RustScan/releases/latest/download/rustscan-$RUSTSCAN_VERSION-x86_64-linux.tar.xz

Extract executable to /usr/local/bin directory:

sudo tar xf rustscan.tar.xz --strip-components=1 -C /usr/local/bin

We can check RustScan version using the following command:

rustscan --version

Remove unnecessary downloaded file:

rm -rf rustscan.tar.xz

Testing RustScan

Run rustscan command and provide the IP address of a network device with -a option.

rustscan -a 192.168.0.227 --ulimit 5000

The command scans the device for open ports. The file descriptor limit is set to 5000 to handle a larger number of simultaneous connections.

Output example:

[~] Automatically increasing ulimit value to 5000.
Open 192.168.0.227:22
[~] Starting Script(s)
[~] Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-06-14 14:39 UTC
Initiating Ping Scan at 14:39
Scanning 192.168.0.227 [2 ports]
Completed Ping Scan at 14:39, 0.00s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 14:39
Completed Parallel DNS resolution of 1 host. at 14:39, 0.00s elapsed
DNS resolution of 1 IPs took 0.00s. Mode: Async [#: 1, OK: 1, NX: 0, DR: 0, SF: 0, TR: 1, CN: 0]
Initiating Connect Scan at 14:39
Scanning ubuntu (192.168.0.227) [1 port]
Discovered open port 22/tcp on 192.168.0.227
Completed Connect Scan at 14:39, 0.00s elapsed (1 total ports)
Nmap scan report for ubuntu (192.168.0.227)
Host is up, received conn-refused (0.000039s latency).
Scanned at 2024-06-14 14:39:29 UTC for 0s

PORT   STATE SERVICE REASON
22/tcp open  ssh     syn-ack

Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 0.02 seconds

Uninstall RustScan

If you decided to completely remove RustScan, delete executable:

sudo rm -rf /usr/local/bin/rustscan

Leave a Comment

Cancel reply

Your email address will not be published.