Skip to content

SiteQ8/hardnix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ HardNix β€” System Hardening Auditor

A comprehensive Linux security auditing tool for red teamers, pentesters, and security engineers.

Bash License Platform Version Checks

HardNix

HardNix performs 107+ automated security checks across 12 modules and produces a scored, graded report in terminal, JSON, or HTML format. Built for speed, portability, and depth β€” no dependencies beyond standard Linux tools.

🌐 Live Demo Page β†’


πŸ“Έ Screenshots

Hero β€” Live Terminal Output

HardNix terminal animation showing live audit

12 Security Modules

HardNix module grid showing all 12 audit categories

Scoring System

HardNix scoring system with letter grades A through F


✨ Features

  • 12 security modules covering the entire Linux attack surface
  • Scoring system (0–100) with letter grades (A β†’ F)
  • Severity levels: CRITICAL / HIGH / MEDIUM / LOW / INFO
  • Three output formats: terminal (colored), JSON, HTML (dark theme)
  • Zero dependencies β€” pure Bash, standard Linux tools only
  • GTFOBins-aware SUID/capability detection
  • Container escape vector detection (Docker, AppArmor, Seccomp)
  • Root-aware β€” gracefully skips checks requiring root when unprivileged
  • CI/CD friendly β€” exit codes, `--no-color`, JSON output

πŸ“¦ Installation

```bash git clone https://github.com/siteq8/hardnix.git cd hardnix chmod +x hardnix.sh ```


πŸš€ Usage

```bash

Full audit (root for complete coverage)

sudo ./hardnix.sh

Run specific modules only

sudo ./hardnix.sh -m ssh,kernel,users

Verbose β€” show passing checks too

sudo ./hardnix.sh -v

Save JSON report

sudo ./hardnix.sh -f json -o /tmp/reports

Generate HTML report (dark theme, open in browser)

sudo ./hardnix.sh -f html

No color β€” for piping / CI pipelines

sudo ./hardnix.sh -n | tee audit.txt ```


πŸ”¬ Modules

Module Checks Description
`kernel` 15 ASLR, kptr_restrict, Spectre/Meltdown, NX bit, ptrace scope, eBPF
`ssh` 18 Root login, PasswordAuth, weak ciphers & MACs, timeouts, AllowUsers
`users` 11 UID 0 accounts, empty passwords, NOPASSWD sudo, world-writable homes
`fs` 11 Mount options (noexec/nosuid), world-writable files, /etc/shadow perms
`network` 17 IP forwarding, SYN cookies, rp_filter, ICMP redirects, firewall
`services` 4 Telnet, FTP, rsh, xinetd, excessive enabled services
`pam` 4 Password quality, account lockout, nullok, pam_limits
`containers` 7 Docker socket, docker group, rootless mode, AppArmor/SELinux, Seccomp
`crypto` 5 SSLv2/v3, weak TLS ciphers, GRUB password, SSH host key strength
`logging` 5 auditd rules, syslog daemon, auth log permissions, logrotate
`suid` 5 SUID/SGID binaries, dangerous capabilities, GTFOBins detection, PwnKit
`cron` 5 World-writable cron dirs, suspicious root crontabs (wget/curl/nc IOCs)

πŸ“Š Scoring

HardNix produces a 0–100 score based on failed check severity:

Severity Points Deducted
CRITICAL βˆ’10 pts
HIGH βˆ’5 pts
MEDIUM βˆ’2 pts
LOW βˆ’1 pt
Score Grade
90–100 🟒 A β€” Hardened
75–89 πŸ”΅ B β€” Good
60–74 🟑 C β€” Fair
40–59 🟠 D β€” Weak
0–39 πŸ”΄ F β€” Critical Risk

πŸ–₯️ Output Examples

Terminal (default)

``` ━━━ SSH DAEMON ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ❌ [CRITICAL ] [S-001] Root login disabled ↳ PermitRootLogin = yes βœ… [HIGH ] [S-002] Password authentication disabled ❌ [HIGH ] [S-014] Weak SSH ciphers configured ↳ arcfour,3des-cbc detected

━━━ AUDIT SUMMARY ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Score : 62 / 100 Grade : C β€” Fair ```

JSON (`-f json`)

```json { "meta": { "tool": "HardNix", "version": "1.0.0", "hostname": "prod-server" }, "score": 62, "grade": "C β€” Fair", "stats": { "total": 107, "passed": 79, "failed": 22, "warnings": 6 }, "findings": [ { "module": "ssh", "id": "S-001", "severity": "CRITICAL", "status": "FAIL", "title": "Root login disabled", "detail": "PermitRootLogin = yes" } ] } ```

HTML (`-f html`)

A self-contained dark-theme report with severity badges grouped by module, requiring no external dependencies.


πŸ”’ Ethical Use

For authorized assessments only. Use on systems you own or have explicit written permission to audit. Never run against systems without authorization.


🀝 Contributing

  1. Open the relevant module in `modules/`
  2. Call `record_check "" "" "" "" "<title>" ""`
  3. Submit a PR describing the check and why it matters

πŸ“„ License

MIT β€” see LICENSE


πŸ™ References

About

A comprehensive Linux security auditing tool for red teamers, pentesters, and security engineers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages