Static Badge   Static Badge   Static Badge   Static Badge   Static Badge   Static Badge   Static Badge   Static Badge   Static Badge   Static Badge   Static Badge   Static Badge   Static Badge   Static Badge   Static Badge   Static Badge  

1. CISS.debian.live.builder

Centurion Intelligence Consulting Agency Information Security Standard
Debian Live Build Generator for hardened live environment and CISS Debian Installer
Master Version: 8.02
Build: V8.03.127.2025.06.02

This shell wrapper automates the creation of a Debian Bookworm live ISO hardened according to the latest best practices in server and service security. It integrates into your build pipeline to deliver an isolated, robust environment suitable for cloud deployment or unattended installations via the forthcoming CISS.debian.installer. Find here more information to download the latest ISO available. To download the latest public available CISS.debian.live.builder ISO, see: tba.

Check out more:

1.1. Preliminary Remarks

1.1.1. HSM

Please note that all my signing keys are stored in an HSM and that the signing environment is air-gapped. The next step is to move to a room-gapped environment. ^^

1.1.2. HSTS and DNSSEC

Please note that coresecret.dev is included in the (HSTS Preload List) and always serves the headers:

add_header Expect-CT                 "max-age=86400, enforce"                       always;
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;

Additionally, the entire zone is dual-signed with DNSSEC. See the current DNSSEC status at DNSSEC Audit Report

1.2. Immutable Source-of-Truth System

This live ISO establishes a secure, fully deterministic, integrity self-verifying boot environment based entirely on static source-code definitions. All configurations, system components, and installation routines are embedded during build time and locked for runtime immutability. This ensures that the live environment functions as a trusted Source of Truth — not only for boot-time operations, but for deploying entire systems in a secure and reproducible way.

Once booted, the environment optionally launches a fully scripted installer, via the forthcoming CISS.debian.installer, yet to deploy, that provisions the target system (the hardware the DVD is running on). The installer pulls no external dependencies besides of the necessary Debian debootstrap and Debian Packages and never exposes the target system in a not secure manner to the internet during installation. It operates strictly from within the verified image content, providing fully secured provisioning. Combined with checksum verification, activated by default, at boot and strict firewall defaults, this architecture guarantees that what is executed has not been tampered with and corresponds exactly to the intended source definition.

An even more secure deployment variant — an unattended and headless version — can be built without any active network interface or shell-access, also via the forthcoming CISS.debian.installer. Such a version performs all verification steps autonomously, provisions the target device from embedded source artifacts, and reboots into a fully encrypted system image. The system then awaits the decryption passphrase input via an embedded Dropbear SSH server (SSH PubKey only) in the initramfs, exposing no ports without cryptographic hardened access, while also the /boot partition could be encrypted via the built-in support of grub2 (2.12-1~bpo12+1).

This approach provides a fully reproducible, audit-friendly, and tamper-resistant provisioning workflow rooted entirely in source-defined infrastructure logic.

After build and configuration, the following audit reports can be generated:

1.2. Preview

CISS.debian.live.builder

1.3. Caution. Significant information for those considering using D-I.

The Debian Installer (d-i) will ALWAYS boot a new system.

Regardless of whether you start it:

The following happens in all cases:

The Debian Installer loads:

This means function status of the CISS.2025.debian.live.builder ISO after d-i start:

2. Features & Rationale

Below is a breakdown of each hardening component, with a summary of why each is critical to your security posture.

2.1. Kernel Hardening

2.1.1. Boot Parameters

2.1.2. CPU Vulnerability Mitigations

2.1.3. Kernel Self-Protection

2.1.4. Local Kernel Hardening

###########################################################################################
# Globals: Wrapper for loading CISS.2025 hardened Kernel Parameters
# Arguments:
#  none
###########################################################################################
# shellcheck disable=SC2317
sysp() {
  sysctl -p /etc/sysctl.d/99_local.hardened
  # sleep 1
  sysctl -a | grep -E 'kernel|vm|net' > /var/log/sysctl_check"$(date +"%Y-%m-%d_%H:%M:%S")".log
}

Warning Once applied, some hardening settings cannot be undone via sysctl without a reboot, and dynamic module loading remains disabled until the next boot. Automatic enforcement at startup is therefore omitted by design—run sysp() manually and plan a reboot to apply or revert these controls.

2.2. Module Blacklisting

2.3. Network Hardening

2.4. Core Dump & Kernel Hardening

2.5. Entropy Collection Improvements

2.6. Permissions & Authentication

2.7. High-Security Baseline (Lynis Audit)

2.8. SSH Tunnel & Access Security

2.9. UFW Hardening

2.10. Fail2Ban Enhancements

2.11. NTPsec & Chrony

3. Script Features & Rationale

3.1. Input Validation & Security

3.2. Debug Mode with Detailed Logging

3.3. Secure Debug Logging

3.4. Secure Password Handling

3.5. Variable Declaration & Validation

3.6. Pure Bash Implementation

3.7. Bash Error Handling

set -o errexit   # Exit script when a command exits with non-zero status (same as "set -e").
set -o errtrace  # Inherit ERR traps in subshells (same as "set -E").
set -o functrace # Inherit DEBUG and RETURN traps in subshells (same as "set -T").
set -o nounset   # Exit script on use of an undefined variable (same as "set -u").
set -o pipefail  # Return the exit status of the last failed command in a pipeline.
set -o noclobber # Prevent overwriting files via redirection (same as "set -C").

4. Prerequisites

5. Installation & Usage

5.1. Interactive CLI / Dialog Wrapper

  1. Clone the repository:

    git clone https://git.coresecret.dev/msw/CISS.debian.live.builder.git
    cd CISS.debian.live.builder
  2. Preparation:

    1. Ensure you are root.
    2. Create the build directory mkdir /opt/livebuild.
    3. Place your desired SSH public key in the authorized_keys file, for example, in the /opt/gitea/CISS.debian.live.builder directory.
    4. Place your desired Password in the password.txt file, for example, in the /opt/gitea/CISS.debian.live.builder directory.
    5. Make any other changes you need to.
  3. Run the config builder script ./ciss_live_builder.sh and the integrated lb build command (example):

    chmod 0700 ./ciss_live_builder.sh
    ./ciss_live_builder.sh --architecture amd64 \
                           --build-directory /opt/livebuild \
                           --change-splash hexagon \
                           --control 384 \
                           --debug \
                           --dhcp-centurion \
                           --jump-host 10.0.0.128 [c0de:4711:0815:4242::1] [2abc:4711:0815:4242::1]/64 \
                           --provider-netcup-ipv6 [c0de:4711:0815:4242::ffff] \
                           --renice-priority "-19" \
                           --reionice-priority 1 2 \
                           --root-password-file /opt/gitea/CISS.debian.live.builder/password.txt \
                           --ssh-port 4242 \
                           --ssh-pubkey /opt/gitea/CISS.debian.live.builder
  4. Locate your ISO in the --build-directory.

  5. Boot from the ISO and login to the live image via the console, or the multi-layer secured coresecret SSH tunnel.

  6. Type sysp for the final kernel hardening features.

  7. Check the boot log with jboot and via ssf that all services are up.

  8. Finally, audit your environment with lsadt for a comprehensive Lynis audit.

  9. Type celp for some shortcuts.

5.2. CI/CD Gitea Runner Workflow Example

  1. Clone the repository:

    git clone https://git.coresecret.dev/msw/CISS.debian.live.builder.git
    cd CISS.debian.live.builder
  2. Edit the .gitea/workflows/generate-iso.yaml file according to your requirements. Ensure that the trigger file .gitea/trigger/t_generate.iso.yaml and the counter are updated. Change all the necessary {{ secrets.VAR }}. Push your commits to trigger the workflow. Then download your final ISO from the specified Location.

#...
    steps:
      - name: Preparing SSH Setup, SSH Deploy Key, Known Hosts, .config.
        run: |
          rm -rf ~/.ssh && mkdir -m700 ~/.ssh

          ### Private Key
          echo "${{ secrets.CHANGE_ME }}" >| ~/.ssh/id_ed25519
          chmod 600 ~/.ssh/id_ed25519
#...
      ### https://github.com/actions/checkout/issues/1843
      - name: Using manual clone via SSH to circumvent Gitea SHA-256 object issues.
        run: |
          git clone --branch "${GITHUB_REF_NAME}" ssh://git@CHANGE_ME .
#...
      - name: Importing the 'CI PGP DEPLOY ONLY' key.
        run: |
          ### GPG-Home relative to the Runner Workspace to avoid changing global files.
          export GNUPGHOME="$(pwd)/.gnupg"
          mkdir -m700 "${GNUPGHOME}"
          echo "${{ secrets.CHANGE_ME }}" >| ci-bot.sec.asc
#...
      - name: Configuring Git for signed CI/DEPLOY commits.
        run: |
          export GNUPGHOME="$(pwd)/.gnupg"
          git config user.name "CHANGE_ME"
          git config user.email "CHANGE_ME"
#...
      - name: Preparing the build environment.
        run: |
          mkdir -p /opt/config
          mkdir -p /opt/livebuild
          echo "${{ secrets.CHANGE_ME }}" >| /opt/config/password.txt
          echo "${{ secrets.CHANGE_ME }}" >| /opt/config/authorized_keys
#...
      - name: Starting CISS.debian.live.builder. This may take a while ...
        run: |
          chmod 0700 ciss_live_builder.sh && chown root:root ciss_live_builder.sh
          timestamp=$(date -u +"%Y_%m_%d_%H_%M_Z")
          ### Change "--autobuild=" to the specific kernel version you need: '6.12.22+bpo-amd64'.
          ./ciss_live_builder.sh \
            --autobuild=CHANGE_ME \
            --architecture CHANGE_ME \
            --build-directory /opt/livebuild \
            --control "${timestamp}" \
            --jump-host "${{ secrets.CHANGE_ME }}" \
            --root-password-file /opt/config/password.txt \
            --ssh-port CHANGE_ME \
            --ssh-pubkey /opt/config
#...
      ### SKIP OR CHANGE ALL REMAINING STEPS

6. Licensing & Compliance

This repository is fully SPDX-compliant. All source files include appropriate SPDX license identifiers and headers to ensure clear and unambiguous licensing. You can verify compliance by reviewing the top of each file, which follows the SPDX standard for license expressions and metadata.

7. Disclaimer

This README is provided "as-is" without any warranty. Review your organization's policies before deploying to production.


no tracking | no logging | no advertising | no profiling | no bullshit