KALI SETUP

root@kali:~# weaponize a clean Kali in one shot - keep every box in sync
BASH ยท ZSH KALI ROLLING PIPX / IMPACKET NETEXEC MULTI-HOST AUTO-SYNC
./clone_repo ./quick_start
๐Ÿ‡ฌ๐Ÿ‡ง EN ยท ๐Ÿ‡ฎ๐Ÿ‡น IT
โ–ผ scroll

quick_start

root@kali: ~

    

what it is

kali-setup automates the setup and upkeep of a Kali pentest box. Instead of configuring every machine by hand, you declare it once (tool lists + scripts): clone, run one command, and get the exact same environment - clean, with every tool up to date.

Instead of remembering by hand what you installed, where and with which package manager, you declare it once in this repo. From there, any Kali becomes identical with one command - and stays that way over time.

clone โ†’ setup.sh โ†’ ready attacker box. Every week update-all and everything is fresh. Add a tool once, it shows up on every Kali.

the problem

A Kali used in the field degrades fast:

kali-decay.log
โœ— PATH polluted by pipx venvs โ†’ wrong commands, broken imports
โœ— impacket installed 3 times (apt + pip + pipx), duplicate scripts
โœ— obsolete tools from old versions (crackmapexec, wfuzzโ€ฆ)
โœ— /opt binaries downloaded by hand months ago, never updated
โœ— 3 different Kali boxes (VM, laptop, VPS) configured differently
โœ— redoing everything from scratch on each reinstall

This repo solves all of these automatically and in a versioned way.

the 3 pillars

๐Ÿงน setup.sh

cleans up + configures a Kali (PATH, duplicates, impacket, deps, tools). Once, on a new machine.

๐Ÿ”„ update-all

updates everything (system + tools + the repo itself) in one command. Weekly / pre-engagement.

๐Ÿ“ฆ tools-sync

manages /opt/pentest-tools from declarative manifests. Inside update-all, or by hand.

โš™ philosophy

declarative ยท idempotent ยท single source of truth ยท multi-host ยท non-destructive by default.

setup.sh --steps

01
AUDIT - initial state: PATH, pipx, apt pentest tools
02
FIX PATH - removes venvs from PATH ยท ~/.local/bin before /usr/bin
03
PURGE - crackmapexec ยท dirbuster ยท zenmap ยท wfuzz (obsolete apt)
04
IMPACKET - cleans real scripts ยท reinstalls via pipx from fortra/impacket
05
LEGACY - removes old bloodhound pipx
06
DEPS - libyaml-dev (fixes gem psych)
07
TOOLS - creates /opt/pentest-tools ยท installs tools from manifests ยท scaffolds local lists
08
ARM - wires update-all into ~/.zshrc (source-based auto-sync)

update-all()

One command. Updates everything. It even updates itself.

#targetwhat
1kali-setupgit pull of the config repo itself โ†’ multi-host auto-sync
2tools-sync/opt/pentest-tools from manifests (git + release, shared + local)
3aptsystem packages + full-upgrade ยท recovers kept-back ยท purges old kernels ยท reboot notice
4pipxPython tools (impacket, netexec, bloodyad, dploot, git-dumper)
5gemRuby tools (evil-winrm)
6npmglobal Node.js tools (from local npm.list)
7pip --userPython libraries (from local pip.list)
8/optmanual clones in /opt/pentest-tools/ (not in the manifests)

tool manager /opt/pentest-tools

Declarative management of external tools: you declare what you want in a manifest, tools-sync.sh rebuilds it identically on every Kali. No fragile scans, no copying by hand.

manifestformatupdate
tools/git.listname | git_urlgit clone โ†’ then git pull
tools/release.listname | owner/repo | globlatest GitHub release (only if the tag changes)

shared

tools/*.list in the repo โ†’ commit + push. Propagates to all Kali boxes on the next update-all.

local (this box only)

~/.config/kali-setup/local.*.list. Stays on this machine, outside git.
tools-sync.sh
bin/tools-sync.sh                 # full sync (git + release)
bin/tools-sync.sh --import        # suggests found tools (moves nothing)
bin/tools-sync.sh --dedup         # scattered copies โ†’ keep/backup/trash/delete (asks)
bin/tools-sync.sh --prune         # removes undeclared tools (opt-in, asks confirmation)

multi-host sync [strategy B]

   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      git push      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”‚   KALI #1   โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถ โ”‚     github.com    โ”‚
   โ”‚   (edit)    โ”‚                    โ”‚  SysK69/kali-setup โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                               โ”‚
                  update-all โ†’ git pull        โ”‚
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
         โ–ผ              โ–ผ                       โ–ผ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ KALI #2 โ”‚    โ”‚ KALI #3 โ”‚    ...     โ”‚ KALI #n โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    

You edit update-all.zsh on one machine โ†’ push โ†’ every other Kali receives it on the next update-all. Zero manual copying.

rules_of_engagement

apt

system dependencies, tools with no pipx alternative

pipx

Python CLI tools (impacket, netexec, bloodyad, dploot, git-dumper)

gem

Ruby tools (evil-winrm)

npm install -g

global Node.js tools - --include=optional + --allow-scripts on npm โ‰ฅ11

/opt/pentest-tools/

manual / git / release tools, managed by tools-sync

canonical PATH

~/.local/bin โ†’ ~/.npm-global/bin โ†’ /usr/local/bin โ†’ /usr/bin
never venvs/*/bin in PATH