Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitLabGitLab/tariqjenkins/linux-hardening
Defensive ToolsVulnerability ScannersScripting & AutomationConfiguration AuditingPenetration TestingDevSecOpsRemote Access Tool
GitLabtariqjenkins/linux-hardening

linux-hardening

Scan a Linux machine, fix findings one setting at a time, rescan, undo. Vulnerability scanner + per-setting hardening (RHEL/Debian families, CIS templates) with a GUI and SSH fleet mode.

View RepositoryWebsite
11h 7m agoNot yet reviewed
Share

Linux hardening toolkit

Scan a Linux machine, fix what the scan finds one setting at a time, scan again, and undo any of it later. Works on the RHEL family (Fedora, RHEL, Rocky, Alma, Oracle) and the Debian family (Debian, Ubuntu, Mint), on one machine or a fleet over SSH.

  • vuln_scan.sh: a standalone audit script. It covers SSH, sysctl, PAM, sudo, auditd, mounts, services, firewall, packages, MAC, containers and more, prints PASS / FAIL / WARN with a 0–100 score, and tags each finding with the setting that fixes it.
  • Hardening settings: about 130 small scripts, one per change, per OS family. Each one can be selected, previewed, applied and undone on its own, so you can apply e.g. all SSH hardening except disabling root login, and save that choice as a template. CIS Level 1/2 profiles ship as templates.
  • harden_gui.py / fleet.py: a Tk control panel and a headless CLI that run the scan, select the fixes for what failed, apply them locally or over SSH, rescan, and show what changed.

Quick start

git clone https://gitlab.com/TariqJenkins/linux-hardening.git
cd linux-hardening

sudo ./vuln_scan.sh                              # audit this machine
./harden-workstation.sh --list-settings          # what can be applied
./harden-workstation.sh --template templates/cis-server-level1.tpl --dry-run   # preview a profile
python3 harden_gui.py                            # or do it all from the GUI

Read a script before you run it as root. That includes this one: clone it and look first, rather than piping a URL into sudo bash.

The scanner

vuln_scan.sh needs no install and nothing from the rest of this repository. It needs root to read logs, sysctls and protected config files (--help and --version work without it).

Usage: vuln_scan.sh [OPTIONS]
  -o, --output <file>   Write the report to <file> instead of
                        /var/log/vuln-scan/vuln_scan_<timestamp>.log
      --no-color        Disable ANSI color in terminal output.
      --version         Print version and exit.
  -h, --help            Show this help and exit.
  • Exit status: 0 = no FAIL findings, 1 = one or more FAILs (or not run as root), 2 = usage error. That makes it safe to wire into cron, a systemd OnFailure= or CI.
  • Config: /etc/vuln-scan/vuln-scan.conf, if present, is sourced and can override REPORT_DIR and the thresholds (AUTH_FAIL_WARN_THRESHOLD, AUTH_FAIL_HIGH_THRESHOLD, AUTH_FAIL_CRIT_THRESHOLD, SUDO_LOCKOUT_DENY_MAX, PASS_MAX_DAYS_RECOMMENDED). Because it is sourced as shell, keep it root-owned and not writable by anyone else.
  • Fix tags: a finding that a setting here can fix ends in [fix: <setting-id>]. The tag is hidden on PASS lines unless SCAN_TAGS=1.
  • Inside a container, checks that need the host's kernel (raw sysctls, firewall, mounts) are reported as WARN rather than FAIL, since the guest cannot fix them.

The hardening side

Every hardening change is an individually selectable setting with its own script, driven by the scanner's findings.

FileWhat it is
vuln_scan.shThe scanner. Audits ~50 areas, prints PASS/FAIL/WARN and a 0–100 score. Version 3.4 has a check for every setting here; findings end in [fix: <setting-id>], which the GUI uses to tick the matching settings.
harden-workstation.shThe runner. Picks the OS family, runs the chosen setting scripts in order, reloads sysctl/sshd once.
settings/rhel/, settings/debian/One script per setting, one tree per OS family.
lib/Shell helpers the settings share: common.sh, rhel.sh, debian.sh, and journal.sh (the undo journal).
templates/, templates.pyNamed selections of settings (shipped examples; yours are saved elsewhere).
harden_gui.pyTk control panel: pick settings, pick hosts, apply, scan, undo.
compare.pyBefore/after comparison of two scans (fixed / still failing / new).
tests/Container tests for the undo journal and lockout guards, unit tests for the GUI logic.
.gitlab-ci.ymlCI: unit tests, the root tests on Fedora/Ubuntu/Debian, package builds.
fleet.pySSH transport and host inventory. Also runs headlessly.
install.shInstalls it as a desktop app. No root needed.
packaging/Icon, desktop entry, and the .deb / .rpm builders.

Install

./install.sh                 # just you, no root        (~/.local)
sudo ./install.sh --system   # everyone                 (/usr/local)
./install.sh --uninstall     # remove it again

Workstation Hardening then appears in your application menu, and harden-gui (the app) and harden-fleet (the CLI) land on your PATH. Uninstalling never touches ~/.config/harden-gui/hosts.json.

Packages

./packaging/build-rpm.sh     # dist/harden-gui-<version>-1.*.noarch.rpm
./packaging/build-deb.sh     # dist/harden-gui_<version>_all.deb

Neither needs a build toolchain installed: if rpmbuild or dpkg-deb is missing, the script builds inside a container instead. The version comes from the VERSION file; set VERSION= to override it. CI builds both packages on every push and keeps them as job artifacts.

sudo dnf install ./dist/harden-gui-<version>-1.*.noarch.rpm
sudo apt install ./dist/harden-gui_<version>_all.deb

Both install to /usr, depend only on python3 (3.10+), Tk and an SSH client, and remove cleanly.

Running from a git checkout still works too: python3 harden_gui.py.

Settings: one script each, per OS family

settings/
  rhel/ssh_disable_root_login.sh        Fedora, RHEL, CentOS, Rocky, Alma
  debian/ssh_disable_root_login.sh      Debian, Ubuntu, Mint, Pop!_OS
  groups                                group ids, labels and their order in the GUI

The runner reads /etc/os-release (ID and ID_LIKE, so derivatives work) and uses the matching tree; the two never mix, so a setting file contains no if rhel … else …. Where a control is the same on both families (a sysctl key, an sshd directive) both files say so independently, on purpose: you can change one family without touching the other. A setting that only makes sense on one family — SELinux boot parameters, SETroubleshoot — exists only in rhel/; on a Debian host the runner reports it as not available rather than failing.

Any setting can be run on its own, with no GUI and no runner:

sudo settings/debian/ssh_banner.sh              # apply this one setting
settings/rhel/sysctl_aslr.sh --dry-run          # preview it, no root needed

Adding or changing a setting

A setting is a short file: a metadata header the GUI reads without running anything, then one apply() function.

#!/usr/bin/env bash
# group: kernel
# risk:  safe                    safe | moderate | disruptive
# order: 230                     where it runs relative to the others
# label: Full ASLR (randomize_va_space=2)
# desc:  Randomises memory layout including the heap.
# cis:   1.5.3                   optional
. "${HARDEN_LIB:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../lib" && pwd)}/debian.sh"

apply() {
  sysctl_opt "kernel.randomize_va_space = 2"
  note "ASLR set to full"
}

harden_run "$@"

The file name is the setting id. Source rhel.sh or debian.sh to match the directory. lib/common.sh has the helpers (sysctl_opt, ssh_opt, write_file, set_kv, fix_perm, svc_disable, modprobe_disable, ensure_pkg, …); each writes its own drop-in file named after the setting, so settings stay independent and individually reversible. Use note to report what was done, and do the work through run / if_changed so --dry-run stays truthful. order matters only when one setting needs another to have run first (auditd before its rules).

Settings that ask for a value

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    One-tap Android kernel exploit app for CVE-2026-43499, providing privilege escalation via kernel module loading, with offset extraction and on-device analysis tools.

    1.0k
  • 2

    Callisto

    jetp1ane/callisto

    Automated binary vulnerability analysis tool that decompiles executables via Ghidra, scans pseudo-C code with Semgrep, and validates findings using GPT-3.5-Turbo to reduce false positives.

    872
  • 3

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    814
  • 4

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    525
  • 5

    mcp-reverse

    1llu50ry/mcp-reverse

    MCP server exposing 180+ reverse-engineering tools that aggregate Ghidra, IDA, x64dbg, Frida and 56 other backends with native binary parsers and a 4,200-skill knowledge base.

    382
  • 6

    DFRoot

    a2333c/dfroot

    Android root tool for Samsung Galaxy S25 Ultra (SM-S938B) that chains DirtyFrag CVE-2026-43284 and CVE-2026-43499 to gain root automatically at boot via KernelSU.

    323

Explore all tools

Browse our collection of tools

View all tools →