Leprechaun purpose of this tool is to help penetration testers identify potentially valuable targets on the internal network environment. By aggregating netstat routes from multiple hosts, you can easily figure out what’s going on within.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
You’ll need a few Ruby gems to get started – if you don’t have them already, that is.
gem install ‘securerandom’
gem install ‘terminal-table’
gem install ‘getopt’
Lastly, make sure you have Graphviz installed. You can install that with the following command:
apt install graphviz -y
Also Read – Evil-Winrm : The Ultimate WinRM Shell For Hacking/Pentesting
If you run the script without any arguments, you’ll see the following help menu:
[root:vonahisec-kali:~/scripts/leprechaun]# ./leprechaun.rb
————————————————————————————————-
Leprechaun v1.0 – Alton Johnson (@altonjx)
————————————————————————————————-
Usage: ./leprechaun.rb -f /path/to/netstat_results.txt -p
-f File containing the output of netstat results
-p Port you’re interested in. e.g., 80. Specify “all”, “common”, or separate ports with commas
-e The type of destination IP addresses you want to see connections to (e.g. external/internal/all)
Example: ./leprechaun.rb -f netstat_output.txt -p 80
Example: ./leprechaun.rb -f netstat_output.txt -p all
Example: ./leprechaun.rb -f netstat_output.txt -p common
Example: ./leprechaun.rb -f netstat_output.txt -p 80,443 -t external
Example Outputs
+--------------+-----------------------------+----------------------------+ | Server | Number of connected clients | Highest traffic destination port | +--------------+-----------------------------+----------------------------+ | 192.12.70.71 | 4 | 80/tcp (4 clients) | | 192.12.70.18 | 2 | 443/tcp (2 clients) | | 192.12.70.45 | 1 | 445/tcp (1 clients) | +--------------+-----------------------------+----------------------------+
Credit: Alton Johnson
PHP 8.5 is included in Ubuntu 26.04's default repositories and is the recommended version for…
Ubuntu 26.04 LTS "Resolute Raccoon" arrived on April 23, 2026 with Linux kernel 7.0, GNOME 50,…
Kubernetes is the standard platform for running containerized workloads across multiple servers with self-healing, rolling…
Ubuntu 26.04 LTS "Resolute Raccoon" was released on April 23, 2026 with Linux kernel 7.0, GNOME desktop, and standard security support until April 2031. A clean install gives you a known-good starting point on new hardware, when replacing another operating system, or when an upgrade path is not practical. This guide walks through how to install Ubuntu 26.04: downloading and verifying the ISO, writing a bootable USB drive, completing the installer, and doing the initial setup after the first boot. Before you start: You need a USB drive with at least 12 GB of free space. Back up any existing data on the target machine — the installer can erase the entire disk. Install Ubuntu 26.04: Download the ISO…
The correct timezone affects more than the clock on your screen. It drives cron job scheduling, systemd timer execution, log file timestamps, database record timing, and SSL certificate validity checks. A mismatched timezone can cause scheduled jobs to fire at the wrong hour and make log timestamps impossible to match with real-world events. This guide shows how to change timezone on Ubuntu using the timedatectl command (the recommended approach for servers and remote machines) and through the graphical Date & Time settings on desktop systems. The steps apply to all current Ubuntu releases including 24.04 and 26.04. <strong>Prerequisite:</strong> Only the root user or a user with sudo access can change the system timezone. Check the Current Timezone Before You Change It Run timedatectl with no arguments to see the active timezone and clock status: bashtimedatectl Sample output: Local…
Atom is a free, open-source, cross-platform code editor developed by GitHub. Built on Electron, it uses…