3 stable releases

new 1.2.0 May 19, 2024
1.1.0 Mar 24, 2024
1.0.0 Mar 24, 2024

#17 in #port-scan

Download history 416/week @ 2024-03-19 1023/week @ 2024-03-26 1046/week @ 2024-04-02 731/week @ 2024-04-09 979/week @ 2024-04-16 994/week @ 2024-04-23 996/week @ 2024-04-30 847/week @ 2024-05-07 119/week @ 2024-05-14

3,093 downloads per month
Used in nerum

MIT license

1MB
13K SLoC

nerum Crates.io

Simple and Fast Network Mapper. Written in Rust.
Designed to be used in network mapping, probe, and security tests.

Features

  • Port Scan
  • Host Scan
  • Ping
  • Traceroute
  • Neighbor Discovery
  • Subdomain scan
  • Show Network Interfaces

Supported platforms

  • Linux
  • macOS
  • Windows

Installation

Precompiled binaries

Archives of precompiled binaries for nerum are available for Linux, macOS and Windows.
You can download from the releases .

Cargo

If you have Rust and the Cargo package manager installed on your system, you can install (download and build) nerum with the following command:

cargo install nerum

Or you can use binstall for install nerum from github release.

cargo binstall nerum

Basic Usage

Default Port Scan

To scan the default 1000 ports on a target, simply specify the target

nerum --target scanme.nmap.org

Sub-commands and Options

Usage: nerum [OPTIONS] [COMMAND]

Commands:
  port        Scan port. nerum port --help for more information
  host        Scan host in specified network or host-list. nerum host --help for more information
  ping        Ping to specified host. nerum ping --help for more information
  trace       Traceroute to specified host. nerum trace --help for more information
  subdomain   Find subdomains. nerum subdomain --help for more information
  nei         Resolve IP address to MAC address
  interfaces  Show network interfaces
  interface   Show default network interface
  check       Check dependencies (Windows only)
  help        Print this message or the help of the given subcommand(s)

Options:
  -t, --target <target>             Specify the target host. IP address or Hostname
  -i, --interface <interface_name>  Specify the network interface
      --noping                      Disable initial ping
  -F, --full                        Scan all ports (1-65535)
  -j, --json                        Displays results in JSON format.
  -o, --save <file_path>            Save scan result in JSON format - Example: -o result.json
  -h, --help                        Print help
  -V, --version                     Print version

Examples

Port scan

Scan default 1000 ports

nerum port scanme.nmap.org

Specify the ports

nerum port scanme.nmap.org --ports 22,80,443,5000,8080

Specify the range

nerum port scanme.nmap.org --range 20-100

Scan well-known ports

nerum port scanme.nmap.org --wellknown

Settings

By default, nerum determines the waiting time until packet reception (before concluding the scan task) based on the results of the initial PING.
The initial PING is executed in the order of ICMP Ping, UDP Ping, TCP Ping (on port 80), and if successful, proceeds to the next scan task.
If all PING attempts fail, nerum exits before executing the scan. This step can be skipped by setting the --noping flag.
For other settings, please refer to nerum port -h for details.

Host scan

ICMP Host scan

nerum host 192.168.1.0/24
nerum host <path-to-host-list>

TCP Host scan

nerum host 192.168.1.0/24 -P TCP --port 80

Ping

Default ICMP Ping

nerum ping 1.1.1.1

UDP Ping

nerum ping 1.1.1.1 -P UDP

TCP Ping

nerum ping 1.1.1.1:443 -P TCP

Traceroute

TCP Ping

nerum trace 8.8.8.8

You can specify the interval in milliseconds for faster trace.

nerum trace 8.8.8.8 --rate 500

Subdomain scan

nerum subdomain google.com

Neighbor (ARP/NDP)

nerum nei 192.168.1.1

Specify the network interface

nerum -i tun0 port 10.10.11.14

Privileges

nerum uses a raw socket which require elevated privileges. Execute with administrator privileges.

Note for Windows Users

If you are using Windows, please consider the following points before building and running the application:

  • Npcap or WinPcap Installation:
    • Ensure that you have Npcap or WinPcap installed on your system.
    • You can check installation by nerum check command. Or Please install Npcap from https://npcap.com/#download
    • If using Npcap, make sure to install it with the "Install Npcap in WinPcap API-compatible Mode" option.
  • Build Dependencies:
    • Place the Packet.lib file from the Npcap SDK or WinPcap Developers pack in a directory named lib at the root of this repository.
    • You can use any of the locations listed in the %LIB% or $Env:LIB environment variables.
    • For the 64-bit toolchain, the Packet.lib is located in /Lib/x64/Packet.lib.
    • For the 32-bit toolchain, the Packet.lib is located in /Lib/Packet.lib.

Dependencies

~22–59MB
~1M SLoC