Lightweight forensic kernel hardening audit tool for Linux security baseline verification.
The name LinSpec is a portmanteau of Linux and Inspection (or Specification).
It was designed to act as the "First Responder" in a security audit. Before deep memory analysis begins, LinSpec inspects the kernel's defensive specifications to determine if the system's "armor" is correctly fastened or if there are gaps that an attacker could exploit.
LinSpec is a specialized forensic utility designed to audit the security posture of the Linux Kernel in real-time.
It evaluates critical Kernel parameters, hardware mitigations, and system-level protection flags to generate a security baseline report. It serves as the Initial Triage phase in a forensic investigation.
Core Audit Areas:
- Memory Protection:
ASLR,NX, andDMArestrictions - Kernel Hardening: Pointer restrictions,
kexecdisabled, anddmesgvisibility - CPU Mitigations: Spectre and Meltdown mitigation status
- Network Stack: BPF JIT hardening and SYN Flood protection
LinSpec is the first component of a specialized three-stage forensic workflow:
LinSpec interfaces with:
/proc/sys/sys/devices
Steps:
- Retrieve Kernel parameters
- Evaluate against a hardened security baseline
- Validate CPU mitigation status
[ 01 ] MEMORY > Address Space Layout Randomization [+] [ PASS ]
[ 02 ] KERNEL > Kernel Pointer Restriction [-] [ VULN ]
[ 03 ] SYSTEM > Yama Ptrace Scope Protection [+] [ PASS ]
[ 04 ] KERNEL > Kernel Log Dmesg Restriction [+] [ PASS ]
[ 05 ] NETWORK > BPF JIT Compiler Hardening [!] [ WARN ]
[ 06 ] NETWORK > TCP SYN Flood Protection (Cookies) [+] [ PASS ]
[ 07 ] SYSTEM > Unprivileged User Namespaces [!] [ WARN ]

1 - System Audit Overview. Clean compilation and execution of the forensic engine, performing the initial security baseline triage.

2 - Forensic Validation via Tmux. Cross-referencing LinSpec output with manual inspection of /proc and /sys interfaces to confirm audit accuracy.
- Real-time Kernel auditing
- CPU vulnerability detection
- Minimalist terminal UI
- Pure C99 (no dependencies)
- PASS / WARN / VULN reporting
- Passive inspection
- Passive audit (no changes)
- Read-only access
- Stateless execution
# 1. Clone the repository
git clone https://github.com/jeffersoncesarantunes/LinSpec.git
# 2. Enter the directory
cd LinSpec
# 3. Compile the project
make clean && make
# 4. Run with root privileges for full access
sudo ./linspec- Entry point analysis (
ptrace) KASLRvalidation- CPU trust verification
βββ docs/
β βββ architecture.md
β βββ audit_reference.md
β βββ forensic_methodology.md
β βββ threat_model.md
βββ Imagens/
β βββ linspec1.png
β βββ linspec2.png
βββ include/
βββ scripts/
βββ src/
β βββ checks.h
β βββ main.c
β βββ memory_audit.c
β βββ system_audit.c
βββ .gitignore
βββ LICENSE
βββ Makefile
βββ README.md
- Language: C (C99)
- Data Sources:
/procand/sysinterfaces - Build Tool: GNU Make
- Target Platforms: Linux Kernel 4.x, 5.x, 6.x
- High-performance C99 Core Engine
- Side-channel Vulnerability Detection (Spectre/Meltdown)
- Brutalist-inspired Terminal UI
- Automated Remediation (System Hardening Scripts)
- Structured Output (JSON/CSV Export for Forensics)
- Ecosystem Integration (Pre-acquisition Audit for S.I.R.E.N)
This project is licensed under the MIT License.