From 3acc2fd12f84701e86d5ed1b5c75ddcf441984cc Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:23:31 +0330 Subject: [PATCH 01/30] Add networking and security audit documentation --- docs/networking-and-security-audit.md | 217 ++++++++++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 docs/networking-and-security-audit.md diff --git a/docs/networking-and-security-audit.md b/docs/networking-and-security-audit.md new file mode 100644 index 0000000..098d66c --- /dev/null +++ b/docs/networking-and-security-audit.md @@ -0,0 +1,217 @@ +# Networking and Security Baseline Audit + +## 1. Overview + +This document records a read-only networking and security baseline review of the Linux From Scratch (LFS) 13.1-systemd system built for this project. The captured system identifies itself as Linux From Scratch, runs on x86_64, and reported kernel `7.1.8`. The virtual machine uses KVM/QEMU. + +The purpose is to document the system as built, not to apply custom hardening. No firewall, resolver, account, kernel, or systemd service settings were changed during this audit. + +This is a configuration and evidence review. It is not a penetration test, vulnerability scan, security certification, or production-readiness assessment. + +## 2. Scope and methodology + +The audit uses 30 command-output captures collected in two phases: + +- **Phase 2 (14 captures):** interfaces, IP addressing, routing, DNS lookup, listening sockets, running and failed services, accounts, groups, account-file metadata, SSH unit lookup, kernel, OS release, and hostname. +- **Phase 3 (16 captures):** resolver status and service, networkd service, resolver files, network configuration file inventory, enabled unit files, systemd sandboxing scores, firewall command availability, forwarding settings, selected network sysctls, login definitions, shell umask, and interactive-shell account listing. + +The evidence describes the state at collection time (2026-11-15). It is not a guarantee of the system's current state after later boots or configuration changes. Original command output has been retained in individual text files, with identifying values anonymized where appropriate. + +### Evidence labels + +- **Verified from captured output:** directly shown by one or more supplied command outputs. +- **Observed:** a recorded runtime/configuration value that is not automatically a defect. +- **Not verified:** the available commands or output do not establish the claim. +- **Out of scope:** deliberately not tested or modified. + +## 3. Network configuration + +**Verified from captured output:** + +- Interface `enp1s0` was up. +- IPv4 address: `192.168.122.54/24`, obtained through DHCP. +- Default gateway: `192.168.122.1`. +- Connected network: `192.168.122.0/24`. +- The loopback interface was present. + +The `getent hosts example.com` test returned two IPv6 address records. This verifies that this particular name lookup succeeded at collection time. It does not independently establish general Internet reachability, connectivity to arbitrary destinations, or DNS reliability. + +## 4. DNS and name resolution + +**Verified from captured output:** + +- `systemd-resolved.service` was enabled and active (running). +- `/etc/resolv.conf` was a symbolic link to `../run/systemd/resolve/stub-resolv.conf`. +- The stub resolver file pointed local clients to `127.0.0.53`. +- `resolvectl status` reported global current DNS server `1.1.1.1` and the per-link DNS server `192.168.122.1` for `enp1s0`. +- The output listed fallback servers from Cloudflare, Google, and Quad9. + +**Observed runtime protocol state:** + +- Global LLMNR: enabled. +- Global mDNS: enabled. +- On `enp1s0`: LLMNR enabled and mDNS disabled. +- DNS-over-TLS: disabled in the reported status. +- DNSSEC: reported as `no/unsupported`. + +The captured `/etc/systemd/resolved.conf` showed the relevant directives commented out. This means the file does not show explicit local values for those settings. The audit does not infer that the runtime state was manually configured, nor does it establish whether drop-in configuration exists outside the captured file. Runtime observations are taken from `resolvectl status`. + +## 5. Network and systemd services + +**Verified from captured output:** + +- Phase 2 listed 11 loaded service units in the running state. +- `systemctl --failed` listed zero loaded failed units at collection time. +- `systemd-networkd.service` and `systemd-resolved.service` were enabled and active. +- Phase 3 listed 32 enabled unit files. + +The 32 enabled unit files are not 32 running services. The list includes services, sockets, and targets; enabled state describes unit enablement, not necessarily current activity. + +The networkd journal included: + +`Could not set hostname: Access denied` + +The available evidence does not establish the cause, whether the message was transient, or whether it had an operational impact. It is recorded as an observation, not diagnosed as a failure. + +The command `systemctl is-enabled sshd` returned `not-found` (exit status 4). This only means the queried systemd unit name was not found. It does not prove that no SSH client, differently named unit, or other SSH server implementation exists. + +## 6. Listening sockets + +The `ss -tulpn` capture showed: + +- DNS stub sockets on loopback addresses `127.0.0.53:53` and `127.0.0.54:53`. +- UDP sockets on wildcard addresses at port 5353. +- UDP and TCP sockets on wildcard addresses at port 5355. + +Ports 5353 and 5355 are commonly associated with mDNS and LLMNR. The resolver status is consistent with LLMNR being active on the captured link and mDNS being disabled on that link, despite global mDNS being enabled. + +A wildcard-bound socket is a listening-socket observation. It does not by itself prove reachability from an untrusted network, successful remote access, exploitability, or a vulnerability. Network topology and packet-filtering state were not established by these captures. + +## 7. Accounts and account-file permissions + +The captured account listing showed `root` as the only account whose shell did not end in `false` or `nologin`. The separate shell-filter command returned: + +`root:/bin/bash` + +This is a statement about the captured `getent passwd` data and the exact filter used; it is not a complete authentication or authorization audit. + +The captured metadata for account files was: + +| File | Mode | Owner | +|---|---:|---| +| `/etc/passwd` | `0644` | `root:root` | +| `/etc/group` | `0644` | `root:root` | +| `/etc/shadow` | `0400` | `root:root` | + +Only file metadata was collected for `/etc/shadow`; its contents were not included. + +## 8. Kernel network parameters + +The following values were captured: + +| Parameter | Observed value | +|---|---:| +| `net.ipv4.ip_forward` | `0` | +| `net.ipv6.conf.all.forwarding` | `0` | +| `net.ipv4.conf.all.rp_filter` | `0` | +| `net.ipv4.conf.all.accept_redirects` | `1` | +| `net.ipv4.conf.all.send_redirects` | `1` | +| `net.ipv4.conf.all.accept_source_route` | `0` | +| `net.ipv6.conf.all.accept_redirects` | `1` | + +These are reported as observed values. They are not automatically classified as defects, and this report does not claim they are universal defaults for every LFS installation. + +## 9. Firewall inspection + +The two captured commands reported: + +- `nft list ruleset`: `Command unavailable: nft` +- `iptables-save`: `Command unavailable: iptables-save` + +**Firewall state: Not verified.** + +The absence of these command-line utilities does not prove that packet filtering is disabled or that no firewall rules exist in the kernel or elsewhere. The evidence is insufficient to claim that a firewall is enabled or disabled. + +## 10. systemd service sandboxing analysis + +`systemd-analyze security --no-pager` returned exposure scores and labels including `UNSAFE`, `EXPOSED`, `MEDIUM`, and `OK`. + +These are systemd's service-sandboxing exposure heuristics. They are not vulnerability scan findings, exploitability assessments, or evidence that a service is compromised. A score must be interpreted in the context of each unit's purpose and required privileges. No sandbox settings were changed. + +## 11. Login definitions and umask + +The captured `/etc/login.defs` included, among other values: + +- `UMASK 022` +- `ENCRYPT_METHOD YESCRYPT` +- `PASS_MIN_LEN 5` +- `PASS_ALWAYS_WARN yes` +- `LOGIN_RETRIES 5` +- `LOGIN_TIMEOUT 60` +- `PASS_CHANGE_TRIES 5` +- `SU_WHEEL_ONLY no` +- `PREVENT_NO_AUTH superuser` +- UID/GID allocation ranges and subordinate-ID ranges as shown in the raw capture. + +The separate Bash umask probe returned `0022`. + +These are configuration values as printed by the system. The presence of `ENCRYPT_METHOD YESCRYPT` in `login.defs` does not prove that existing password hashes use yescrypt; the shadow-file contents and actual password-change path were not audited. Likewise, `PASS_MIN_LEN` is recorded as a setting, not proof that a particular PAM or password-change path enforces that minimum. + +## 12. Findings and evidence classification + +### Verified from captured output + +- The system identified itself as Linux From Scratch and reported kernel `7.1.8`. +- `enp1s0` was up with the captured DHCP IPv4 address and default route. +- The tested lookup for `example.com` returned IPv6 records. +- `systemd-networkd` and `systemd-resolved` were enabled and active. +- The running-service query listed 11 units; the failed-unit query listed zero. +- The account-file metadata and selected kernel network parameters were captured. +- IPv4 and IPv6 forwarding were both reported as disabled. + +### Observed, not automatically classified as defects + +- LLMNR and mDNS runtime state. +- DNSSEC and DNS-over-TLS status. +- Wildcard-bound sockets on ports 5353 and 5355. +- Selected network sysctl values. +- Login defaults and Bash umask. +- systemd sandboxing exposure scores. +- The networkd hostname access-denied journal message. + +### Not verified + +- Effective firewall ruleset and packet-filtering state. +- General Internet reachability or DNS reliability beyond the single lookup. +- Availability of every possible SSH server implementation. +- Cause and impact of the networkd hostname message. +- Actual password-hash algorithms for existing accounts. +- Overall resistance to attack or production security posture. + +### Out of scope + +- Penetration testing and vulnerability scanning. +- Custom kernel hardening. +- Firewall installation or policy changes. +- Resolver or DNS policy changes. +- Account/authentication policy changes. +- systemd service sandbox modifications. +- Production security certification. + +## 13. Collection limitations + +The Phase 3 collector had an exit-status reporting defect: the helper could print the status of a subsequent `echo` rather than the command being tested. Consequently, the Phase 3 `Exit status` annotations are not authoritative. The command output itself, including explicit errors and unavailable-command messages, remains the evidence to interpret. + +The Phase 2 `systemctl is-enabled sshd` output explicitly reported `not-found` and exit status 4. Do not generalize that result beyond the queried unit. + +## 14. Conclusion + +This review documents the observed networking and security baseline of the captured LFS 13.1-systemd build. It intentionally preserves the system as built and does not prescribe or apply custom hardening. + +The evidence supports specific statements about the captured interfaces, resolver, service state, account metadata, and selected kernel parameters. It does not support a blanket claim that the system is secure, insecure, firewall-protected, or production-ready. + +## 15. Evidence and reproducibility + +The accompanying `screenshots/09-networking-and-system-audit/` directory contains the 30 individual Phase 2 and Phase 3 text captures. Identifying MAC/UUID values and the MAC-derived IPv6 link-local interface identifier are replaced with explicit placeholders; technical configuration values and command output are retained. + +The read-only collector is available at `scripts/collect-evidence/collect-network-security-evidence.sh`. It writes fresh raw output to a separate directory. Review and anonymize that output before publishing; do not overwrite the existing evidence. From 4daf93fe94115eb1e773e2bb570829202a65525b Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:23:33 +0330 Subject: [PATCH 02/30] Add networking and security audit documentation --- .../09-networking-and-system-audit/README.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 screenshots/09-networking-and-system-audit/README.md diff --git a/screenshots/09-networking-and-system-audit/README.md b/screenshots/09-networking-and-system-audit/README.md new file mode 100644 index 0000000..638a9b5 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/README.md @@ -0,0 +1,60 @@ +# Networking and System Audit Evidence + +This directory contains 30 individual text captures from the Phase 2 and Phase 3 read-only audit. + +## File map + +### Phase 2 + +1. `01-network-interfaces.txt` +2. `02-ip-addresses.txt` +3. `03-routing-table.txt` +4. `04-dns-resolution.txt` +5. `05-listening-sockets.txt` +6. `06-running-services.txt` +7. `07-failed-services.txt` +8. `08-user-accounts.txt` +9. `09-groups.txt` +10. `10-account-file-permissions.txt` +11. `11-sshd-enabled-state.txt` +12. `12-kernel-information.txt` +13. `13-os-release.txt` +14. `14-hostname.txt` + +### Phase 3 + +15. `15-resolvectl-status.txt` +16. `16-resolved-service.txt` +17. `17-networkd-service.txt` +18. `18-resolv-conf.txt` +19. `19-resolved-conf.txt` +20. `20-network-config-file-list.txt` +21. `21-enabled-services.txt` +22. `22-systemd-security.txt` +23. `23-nftables-rules.txt` +24. `24-iptables-rules.txt` +25. `25-ipv4-forwarding.txt` +26. `26-ipv6-forwarding.txt` +27. `27-kernel-network-hardening.txt` +28. `28-login-definitions.txt` +29. `29-shell-umask.txt` +30. `30-system-users-shells.txt` + +## Anonymization + +The published captures retain technical lines, command output, errors, versions, configuration values, and service names. Identifying values are replaced consistently: + +- MAC addresses: `` +- MAC-derived IPv6 link-local interface identifier: `fe80::[ANONYMIZED_INTERFACE_ID]/64` +- Machine ID: `` +- Boot ID: `` +- Product UUID: `` +- systemd invocation IDs: `` + +Private IPv4 addresses, interface names, and the hostname `lfs` are retained because they are needed to understand the captured virtual-network topology. The original system was not modified. + +## Evidence integrity + +The Phase 3 collector's exit-status annotation has a logging defect and must not be treated as authoritative. Preserve the command output and document this limitation. The Phase 2 SSH unit lookup explicitly returned `not-found` with exit status 4. + +See [the audit report](../../docs/networking-and-security-audit.md) for interpretation, limitations, and findings. From 7a9e431dc9d4314d08250d752e99b0c735750a3b Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:23:35 +0330 Subject: [PATCH 03/30] Add networking and security audit documentation --- .../anonymize-audit-evidence.py | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 scripts/collect-evidence/anonymize-audit-evidence.py diff --git a/scripts/collect-evidence/anonymize-audit-evidence.py b/scripts/collect-evidence/anonymize-audit-evidence.py new file mode 100644 index 0000000..1fb5718 --- /dev/null +++ b/scripts/collect-evidence/anonymize-audit-evidence.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 +"""Write anonymized copies of LFS audit text evidence; never modify originals.""" + +from __future__ import annotations + +import argparse +import re +from pathlib import Path + +MAC_RE = re.compile(r"(?i)\\b(?:[0-9a-f]{2}:){5}[0-9a-f]{2}\\b") +IPV6_LL_RE = re.compile(r"(?i)\\bfe80::[0-9a-f:]+(?:/\\d{1,3})?\\b") +UUID_FIELD_RE = re.compile( + r"(?im)(?P\\b(?:Machine\\s+ID|Boot\\s+ID|Product\\s+UUID|Hardware\\s+UUID|Invocation(?:\\s+ID)?)\\s*:\\s*)" + r"(?P[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{32})" +) + +def anonymize(text: str) -> str: + text = MAC_RE.sub("", text) + text = IPV6_LL_RE.sub("fe80::[ANONYMIZED_INTERFACE_ID]/64", text) + + def replace_uuid(match: re.Match[str]) -> str: + label = match.group("prefix").lower() + if "machine" in label: + token = "" + elif "boot" in label: + token = "" + elif "product" in label or "hardware" in label: + token = "" + else: + token = "" + return match.group("prefix") + token + + text = UUID_FIELD_RE.sub(replace_uuid, text) + # systemctl status formats Invocation IDs without the word "ID". + text = re.sub(r"(?im)(\\bInvocation:\\s*)[0-9a-f]{32}\\b", r"\\1", text) + return text + +def main() -> int: + parser = argparse.ArgumentParser() + parser.add_argument("source", type=Path, help="Directory containing original .txt evidence") + parser.add_argument("destination", type=Path, help="Separate directory for anonymized copies") + args = parser.parse_args() + + source = args.source.resolve() + destination = args.destination.resolve() + if not source.is_dir(): + parser.error(f"source directory does not exist: {source}") + if source == destination or source in destination.parents: + parser.error("destination must be separate from, not inside, the source directory") + + files = sorted(source.glob("*.txt")) + if not files: + parser.error(f"no .txt files found in {source}") + + destination.mkdir(parents=True, exist_ok=True) + for original_path in files: + original = original_path.read_text(encoding="utf-8", errors="replace") + (destination / original_path.name).write_text(anonymize(original), encoding="utf-8") + + print(f"Anonymized copies written: {len(files)}") + print(f"Originals unchanged: {source}") + print(f"Anonymized output: {destination}") + print("Review every output manually before publication.") + return 0 + +if __name__ == "__main__": + raise SystemExit(main()) From 8342e2a1fffc6d9ce27df003576c74fe29b691aa Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:23:39 +0330 Subject: [PATCH 04/30] Add networking and security audit documentation --- .../collect-network-security-evidence.sh | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 scripts/collect-evidence/collect-network-security-evidence.sh diff --git a/scripts/collect-evidence/collect-network-security-evidence.sh b/scripts/collect-evidence/collect-network-security-evidence.sh new file mode 100644 index 0000000..5426b2c --- /dev/null +++ b/scripts/collect-evidence/collect-network-security-evidence.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash +# Read-only LFS networking/security evidence collector. +# Writes raw output only to the selected output directory. +set -u + +OUTPUT_DIR="${1:-$PWD/lfs-network-security-evidence-raw}" +mkdir -p -- "$OUTPUT_DIR" || exit 1 +OUTPUT_DIR="$(cd -- "$OUTPUT_DIR" && pwd -P)" || exit 1 + +capture() { + local filename="$1" + shift + local status + { + printf 'Command:' + printf ' %q' "$@" + printf '\n\n' + if "$@" 2>&1; then + status=0 + else + status=$? + fi + printf '\nExit status: %d\n' "$status" + } > "$OUTPUT_DIR/$filename" +} + +capture 01-network-interfaces.txt ip -br link +capture 02-ip-addresses.txt ip -br address +capture 03-routing-table.txt ip route show +capture 04-dns-resolution.txt getent hosts example.com +capture 05-listening-sockets.txt ss -tulpn +capture 06-running-services.txt systemctl list-units --type=service --state=running --no-pager +capture 07-failed-services.txt systemctl --failed --no-pager +capture 08-user-accounts.txt getent passwd +capture 09-groups.txt getent group +capture 10-account-file-permissions.txt stat /etc/passwd /etc/group /etc/shadow +capture 11-sshd-enabled-state.txt systemctl is-enabled sshd +capture 12-kernel-information.txt uname -a +capture 13-os-release.txt cat /etc/os-release +capture 14-hostname.txt hostnamectl status + +capture 15-resolvectl-status.txt resolvectl status +capture 16-resolved-service.txt systemctl status systemd-resolved --no-pager +capture 17-networkd-service.txt systemctl status systemd-networkd --no-pager +capture 18-resolv-conf.txt bash -c 'printf "resolv.conf symlink:\\n"; readlink /etc/resolv.conf; printf "\\nresolv.conf contents:\\n"; cat /etc/resolv.conf' +capture 19-resolved-conf.txt cat /etc/systemd/resolved.conf +capture 20-network-config-file-list.txt find /etc/systemd/network -maxdepth 1 -type f -print +capture 21-enabled-services.txt systemctl list-unit-files --state=enabled --no-pager +capture 22-systemd-security.txt systemd-analyze security --no-pager +capture 23-nftables-rules.txt nft list ruleset +capture 24-iptables-rules.txt iptables-save +capture 25-ipv4-forwarding.txt sysctl net.ipv4.ip_forward +capture 26-ipv6-forwarding.txt sysctl net.ipv6.conf.all.forwarding +capture 27-kernel-network-hardening.txt sysctl net.ipv4.conf.all.rp_filter net.ipv4.conf.all.accept_redirects net.ipv4.conf.all.send_redirects net.ipv4.conf.all.accept_source_route net.ipv6.conf.all.accept_redirects +capture 28-login-definitions.txt cat /etc/login.defs +capture 29-shell-umask.txt bash -c 'umask' +capture 30-system-users-shells.txt bash -c "awk -F: '\$7 !~ /(false|nologin)\$/ {print \$1 \":\" \$7}' /etc/passwd" + +printf 'Raw evidence written to: %s\n' "$OUTPUT_DIR" +printf 'Review and anonymize the output before publishing.\n' From 1f9d169a6e2fb0fb6198473a3be32cc0273ff50a Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:23:52 +0330 Subject: [PATCH 05/30] Fix audit evidence collection and anonymization --- scripts/collect-evidence/anonymize-audit-evidence.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/collect-evidence/anonymize-audit-evidence.py b/scripts/collect-evidence/anonymize-audit-evidence.py index 1fb5718..be98cd6 100644 --- a/scripts/collect-evidence/anonymize-audit-evidence.py +++ b/scripts/collect-evidence/anonymize-audit-evidence.py @@ -7,10 +7,10 @@ import re from pathlib import Path -MAC_RE = re.compile(r"(?i)\\b(?:[0-9a-f]{2}:){5}[0-9a-f]{2}\\b") -IPV6_LL_RE = re.compile(r"(?i)\\bfe80::[0-9a-f:]+(?:/\\d{1,3})?\\b") +MAC_RE = re.compile(r"(?i)\b(?:[0-9a-f]{2}:){5}[0-9a-f]{2}\b") +IPV6_LL_RE = re.compile(r"(?i)\bfe80::[0-9a-f:]+(?:/\d{1,3})?\b") UUID_FIELD_RE = re.compile( - r"(?im)(?P\\b(?:Machine\\s+ID|Boot\\s+ID|Product\\s+UUID|Hardware\\s+UUID|Invocation(?:\\s+ID)?)\\s*:\\s*)" + r"(?im)(?P\b(?:Machine\s+ID|Boot\s+ID|Product\s+UUID|Hardware\s+UUID|Invocation(?:\s+ID)?)\s*:\s*)" r"(?P[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{32})" ) @@ -31,8 +31,7 @@ def replace_uuid(match: re.Match[str]) -> str: return match.group("prefix") + token text = UUID_FIELD_RE.sub(replace_uuid, text) - # systemctl status formats Invocation IDs without the word "ID". - text = re.sub(r"(?im)(\\bInvocation:\\s*)[0-9a-f]{32}\\b", r"\\1", text) + text = re.sub(r"(?im)(\bInvocation:\s*)[0-9a-f]{32}\b", r"\1", text) return text def main() -> int: From f459ca7d0c8665675dde891aad5f3ecdcd24be5a Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:23:55 +0330 Subject: [PATCH 06/30] Fix audit evidence collection and anonymization --- .../collect-evidence/collect-network-security-evidence.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/collect-evidence/collect-network-security-evidence.sh b/scripts/collect-evidence/collect-network-security-evidence.sh index 5426b2c..ab0f2dd 100644 --- a/scripts/collect-evidence/collect-network-security-evidence.sh +++ b/scripts/collect-evidence/collect-network-security-evidence.sh @@ -42,7 +42,7 @@ capture 14-hostname.txt hostnamectl status capture 15-resolvectl-status.txt resolvectl status capture 16-resolved-service.txt systemctl status systemd-resolved --no-pager capture 17-networkd-service.txt systemctl status systemd-networkd --no-pager -capture 18-resolv-conf.txt bash -c 'printf "resolv.conf symlink:\\n"; readlink /etc/resolv.conf; printf "\\nresolv.conf contents:\\n"; cat /etc/resolv.conf' +capture 18-resolv-conf.txt bash -c 'printf "resolv.conf symlink:\n"; readlink /etc/resolv.conf; printf "\nresolv.conf contents:\n"; cat /etc/resolv.conf' capture 19-resolved-conf.txt cat /etc/systemd/resolved.conf capture 20-network-config-file-list.txt find /etc/systemd/network -maxdepth 1 -type f -print capture 21-enabled-services.txt systemctl list-unit-files --state=enabled --no-pager @@ -53,8 +53,8 @@ capture 25-ipv4-forwarding.txt sysctl net.ipv4.ip_forward capture 26-ipv6-forwarding.txt sysctl net.ipv6.conf.all.forwarding capture 27-kernel-network-hardening.txt sysctl net.ipv4.conf.all.rp_filter net.ipv4.conf.all.accept_redirects net.ipv4.conf.all.send_redirects net.ipv4.conf.all.accept_source_route net.ipv6.conf.all.accept_redirects capture 28-login-definitions.txt cat /etc/login.defs -capture 29-shell-umask.txt bash -c 'umask' -capture 30-system-users-shells.txt bash -c "awk -F: '\$7 !~ /(false|nologin)\$/ {print \$1 \":\" \$7}' /etc/passwd" +capture 29-shell-umask.txt bash -c umask +capture 30-system-users-shells.txt awk -F: '$7 !~ /(false|nologin)$/ {print $1 ":" $7}' /etc/passwd printf 'Raw evidence written to: %s\n' "$OUTPUT_DIR" printf 'Review and anonymize the output before publishing.\n' From 2aa69712a1931a7a799f4cb666784d9dfd6935ea Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:24:45 +0330 Subject: [PATCH 07/30] Add anonymized networking and security evidence --- README.md | 66 +++++++------------ docs/README.md | 11 ++-- .../01-network-interfaces.txt | 6 ++ .../02-ip-addresses.txt | 6 ++ .../03-routing-table.txt | 7 ++ .../04-dns-resolution.txt | 6 ++ .../05-listening-sockets.txt | 15 +++++ .../06-running-services.txt | 22 +++++++ .../07-failed-services.txt | 7 ++ .../08-user-accounts.txt | 18 +++++ .../09-groups.txt | 37 +++++++++++ .../10-account-file-permissions.txt | 28 ++++++++ .../11-sshd-enabled-state.txt | 5 ++ .../12-kernel-information.txt | 5 ++ .../13-os-release.txt | 5 ++ .../14-hostname.txt | 20 ++++++ .../15-resolvectl-status.txt | 22 +++++++ .../16-resolved-service.txt | 29 ++++++++ .../17-networkd-service.txt | 33 ++++++++++ .../18-resolv-conf.txt | 27 ++++++++ .../19-resolved-conf.txt | 48 ++++++++++++++ .../20-network-config-file-list.txt | 1 + .../21-enabled-services.txt | 39 +++++++++++ .../22-systemd-security.txt | 24 +++++++ .../23-nftables-rules.txt | 3 + .../24-iptables-rules.txt | 3 + .../25-ipv4-forwarding.txt | 5 ++ .../26-ipv6-forwarding.txt | 5 ++ .../27-kernel-network-hardening.txt | 9 +++ .../29-shell-umask.txt | 5 ++ .../30-system-users-shells.txt | 5 ++ screenshots/README.md | 23 ++++--- scripts/collect-evidence/README.md | 22 +++++-- 33 files changed, 503 insertions(+), 64 deletions(-) create mode 100644 screenshots/09-networking-and-system-audit/01-network-interfaces.txt create mode 100644 screenshots/09-networking-and-system-audit/02-ip-addresses.txt create mode 100644 screenshots/09-networking-and-system-audit/03-routing-table.txt create mode 100644 screenshots/09-networking-and-system-audit/04-dns-resolution.txt create mode 100644 screenshots/09-networking-and-system-audit/05-listening-sockets.txt create mode 100644 screenshots/09-networking-and-system-audit/06-running-services.txt create mode 100644 screenshots/09-networking-and-system-audit/07-failed-services.txt create mode 100644 screenshots/09-networking-and-system-audit/08-user-accounts.txt create mode 100644 screenshots/09-networking-and-system-audit/09-groups.txt create mode 100644 screenshots/09-networking-and-system-audit/10-account-file-permissions.txt create mode 100644 screenshots/09-networking-and-system-audit/11-sshd-enabled-state.txt create mode 100644 screenshots/09-networking-and-system-audit/12-kernel-information.txt create mode 100644 screenshots/09-networking-and-system-audit/13-os-release.txt create mode 100644 screenshots/09-networking-and-system-audit/14-hostname.txt create mode 100644 screenshots/09-networking-and-system-audit/15-resolvectl-status.txt create mode 100644 screenshots/09-networking-and-system-audit/16-resolved-service.txt create mode 100644 screenshots/09-networking-and-system-audit/17-networkd-service.txt create mode 100644 screenshots/09-networking-and-system-audit/18-resolv-conf.txt create mode 100644 screenshots/09-networking-and-system-audit/19-resolved-conf.txt create mode 100644 screenshots/09-networking-and-system-audit/20-network-config-file-list.txt create mode 100644 screenshots/09-networking-and-system-audit/21-enabled-services.txt create mode 100644 screenshots/09-networking-and-system-audit/22-systemd-security.txt create mode 100644 screenshots/09-networking-and-system-audit/23-nftables-rules.txt create mode 100644 screenshots/09-networking-and-system-audit/24-iptables-rules.txt create mode 100644 screenshots/09-networking-and-system-audit/25-ipv4-forwarding.txt create mode 100644 screenshots/09-networking-and-system-audit/26-ipv6-forwarding.txt create mode 100644 screenshots/09-networking-and-system-audit/27-kernel-network-hardening.txt create mode 100644 screenshots/09-networking-and-system-audit/29-shell-umask.txt create mode 100644 screenshots/09-networking-and-system-audit/30-system-users-shells.txt diff --git a/README.md b/README.md index f9f0827..b8e4c7e 100644 --- a/README.md +++ b/README.md @@ -6,19 +6,13 @@ systemd

-

- Booted and documented - Fedora 43 - KVM and QEMU -

- -A hands-on build of a complete Linux system from source, following the **Linux From Scratch 13.1-systemd** book. The project covers the build environment, toolchain, base user space, system configuration, Linux kernel, GRUB and first boot. +A hands-on build of a complete Linux system from source, following the **Linux From Scratch 13.1-systemd** book. ## Project status -**System built and booted.** The repository contains evidence of the final system boot, running kernel, systemd state, filesystem layout and GRUB configuration. +**System built and booted.** The repository documents the build environment, toolchain, base system, system configuration, kernel, GRUB, first boot, test-log review, and a read-only networking/security baseline audit. -This status describes the existence of a bootable system; it does **not** mean every package test suite passed. Test results are documented separately and must be interpreted from their original logs. +This status does **not** mean every package test suite passed. Test results are documented separately and interpreted from their original logs. ## Build environment @@ -34,54 +28,40 @@ This status describes the existence of a bootable system; it does **not** mean e | Filesystem | ext4 | | Init system | systemd | -See [the build reference](references/BUILD-REFERENCE.md) and [build environment evidence](screenshots/01-build-environment/README.md). - ## Build stages and evidence | Stage | Contents | |---|---| -| [01 — Build environment](screenshots/01-build-environment/README.md) | Fedora environment, KVM/QEMU VM and allocated resources | -| [02 — Storage and filesystem](screenshots/02-storage-and-filesystem/README.md) | Dedicated LFS disk, partition, ext4 and mount point | -| [03 — Toolchain](screenshots/03-toolchain/README.md) | Captured Binutils/GCC/glibc information and compiler smoke test | -| [04 — Base system](screenshots/04-base-system/README.md) | Selected component versions and presence-check methodology | -| [05 — System configuration](screenshots/05-system-configuration/README.md) | Hostname, locale, timezone, mounts, systemd and shell | -| [06 — Kernel and bootloader](screenshots/06-kernel-and-bootloader/README.md) | Kernel configuration, modules, boot files and GRUB | -| [07 — Testing and validation](screenshots/07-testing-and-validation/README.md) | Existing test-log inventory and validation limitations | -| [08 — Final system](screenshots/08-final-system/README.md) | GRUB menu, first boot and final system state | - -The `screenshots/` directory retains its historical name, but includes text captures, scripts and archives as well as images. +| [01 — Build environment](screenshots/01-build-environment/README.md) | Host and build VM | +| [02 — Storage and filesystem](screenshots/02-storage-and-filesystem/README.md) | LFS disk, partition and ext4 | +| [03 — Toolchain](screenshots/03-toolchain/README.md) | Binutils, GCC and glibc evidence | +| [04 — Base system](screenshots/04-base-system/README.md) | Base-system component evidence | +| [05 — System configuration](screenshots/05-system-configuration/README.md) | Hostname, locale, timezone and systemd | +| [06 — Kernel and bootloader](screenshots/06-kernel-and-bootloader/README.md) | Kernel, modules and GRUB | +| [07 — Testing and validation](screenshots/07-testing-and-validation/README.md) | Test-log inventory and limitations | +| [08 — Final system](screenshots/08-final-system/README.md) | First boot and final system state | +| [09 — Networking and system audit](screenshots/09-networking-and-system-audit/README.md) | 30 raw text captures, anonymized identifiers and audit report | + +The `screenshots/` directory retains its historical name but also contains text captures and scripts. ## Technical documentation - [Build process](docs/build-process.md) -- [Boot process: firmware, GRUB, kernel and systemd](docs/boot-process.md) -- [ELF binaries and dynamic linking](docs/elf-and-dynamic-linking.md) -- [Testing and validation methodology](docs/testing-and-validation.md) +- [Boot process](docs/boot-process.md) +- [ELF and dynamic linking](docs/elf-and-dynamic-linking.md) +- [Testing and validation](docs/testing-and-validation.md) +- [Networking and security baseline audit](docs/networking-and-security-audit.md) - [Troubleshooting](troubleshooting/README.md) -- [Project sources](references/sources.md) - -## Technical focus - -- Cross-compilation and toolchain construction -- GNU Binutils, GCC and glibc -- ELF executables, shared libraries and dynamic linking -- Filesystem hierarchy and system configuration -- Linux kernel configuration and modules -- GRUB bootloader and system initialization with systemd -- Test-log interpretation and troubleshooting +- [Build reference](references/BUILD-REFERENCE.md) ## Evidence policy - Captured output records what a command reported at collection time. - A command-presence check is not proof that a package test suite passed. -- A compiler's native target is not automatically the LFS target triplet. -- Test failures, skips and incomplete records must not be relabeled as successful results. -- The LFS book itself is not included; use the official [LFS 13.1-systemd book](https://www.linuxfromscratch.org/lfs/view/13.1-systemd/). +- Test failures, skips and incomplete records are not relabeled as successful results. +- The network/security audit is read-only and does not claim penetration testing, firewall verification, or production readiness. +- The LFS book itself is not included; see the official [LFS 13.1-systemd book](https://www.linuxfromscratch.org/lfs/view/13.1-systemd/). ## License -Original repository materials are licensed under [GPL-3.0-only](LICENSE). Project copyright and third-party licensing notes are recorded in [NOTICE](NOTICE). The LFS book and upstream software remain subject to their own copyright and license terms; see [the build reference](references/BUILD-REFERENCE.md). - ---- - -

Build · Inspect · Test · Understand

+Original repository materials are licensed under [GPL-3.0-only](LICENSE). See [NOTICE](NOTICE) for third-party licensing notes. diff --git a/docs/README.md b/docs/README.md index f15d064..5acb23c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,11 +2,12 @@ Project-authored explanations that complement the captured evidence. These documents do not replace the official LFS instructions. -- [Build process](build-process.md) — phases of the LFS build and evidence map. -- [Boot process](boot-process.md) — firmware, GRUB, Linux kernel and systemd. -- [ELF and dynamic linking](elf-and-dynamic-linking.md) — executable formats, shared libraries and inspection commands. -- [Testing and validation](testing-and-validation.md) — interpreting logs and separating presence checks from test results. -- [Test archive audit](test-archive-audit.md) — findings and limitations from the archived LFS test summaries. +- [Build process](build-process.md) +- [Boot process](boot-process.md) +- [ELF and dynamic linking](elf-and-dynamic-linking.md) +- [Testing and validation](testing-and-validation.md) +- [Test archive audit](test-archive-audit.md) +- [Networking and security baseline audit](networking-and-security-audit.md) ## Documentation rules diff --git a/screenshots/09-networking-and-system-audit/01-network-interfaces.txt b/screenshots/09-networking-and-system-audit/01-network-interfaces.txt new file mode 100644 index 0000000..e55c71a --- /dev/null +++ b/screenshots/09-networking-and-system-audit/01-network-interfaces.txt @@ -0,0 +1,6 @@ +Command: ip -br link + +lo UNKNOWN 00:00:00:00:00:00 +enp1s0 UP + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/02-ip-addresses.txt b/screenshots/09-networking-and-system-audit/02-ip-addresses.txt new file mode 100644 index 0000000..e822364 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/02-ip-addresses.txt @@ -0,0 +1,6 @@ +Command: ip -br address + +lo UNKNOWN 127.0.0.1/8 ::1/128 +enp1s0 UP 192.168.122.54/24 metric 1024 fe80::[ANONYMIZED_INTERFACE_ID]/64 + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/03-routing-table.txt b/screenshots/09-networking-and-system-audit/03-routing-table.txt new file mode 100644 index 0000000..24877b8 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/03-routing-table.txt @@ -0,0 +1,7 @@ +Command: ip route show + +default via 192.168.122.1 dev enp1s0 proto dhcp src 192.168.122.54 metric 1024 +192.168.122.0/24 dev enp1s0 proto kernel scope link src 192.168.122.54 metric 1024 +192.168.122.1 dev enp1s0 proto dhcp scope link src 192.168.122.54 metric 1024 + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/04-dns-resolution.txt b/screenshots/09-networking-and-system-audit/04-dns-resolution.txt new file mode 100644 index 0000000..25826c0 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/04-dns-resolution.txt @@ -0,0 +1,6 @@ +Command: getent hosts example.com + +2a06:98c1:3122:: example.com +2a06:98c1:3123:: example.com + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/05-listening-sockets.txt b/screenshots/09-networking-and-system-audit/05-listening-sockets.txt new file mode 100644 index 0000000..44aef54 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/05-listening-sockets.txt @@ -0,0 +1,15 @@ +Command: ss -tulpn + +Netid State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess +udp UNCONN 0 0 0.0.0.0:5353 0.0.0.0:* users:(("systemd-resolve",pid=183,fd=17)) +udp UNCONN 0 0 0.0.0.0:5355 0.0.0.0:* users:(("systemd-resolve",pid=183,fd=13)) +udp UNCONN 0 0 127.0.0.54:53 0.0.0.0:* users:(("systemd-resolve",pid=183,fd=24)) +udp UNCONN 0 0 127.0.0.53:53 0.0.0.0:* users:(("systemd-resolve",pid=183,fd=22)) +udp UNCONN 0 0 *:5353 *:* users:(("systemd-resolve",pid=183,fd=18)) +udp UNCONN 0 0 *:5355 *:* users:(("systemd-resolve",pid=183,fd=15)) +tcp LISTEN 0 0 127.0.0.54:53 0.0.0.0:* users:(("systemd-resolve",pid=183,fd=25)) +tcp LISTEN 0 0 127.0.0.53:53 0.0.0.0:* users:(("systemd-resolve",pid=183,fd=23)) +tcp LISTEN 0 0 0.0.0.0:5355 0.0.0.0:* users:(("systemd-resolve",pid=183,fd=14)) +tcp LISTEN 0 0 *:5355 *:* users:(("systemd-resolve",pid=183,fd=16)) + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/06-running-services.txt b/screenshots/09-networking-and-system-audit/06-running-services.txt new file mode 100644 index 0000000..a37b420 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/06-running-services.txt @@ -0,0 +1,22 @@ +Command: systemctl list-units --type=service --state=running --no-pager + + UNIT LOAD ACTIVE SUB DESCRIPTION + dbus.service loaded active running D-Bus System Message Bus + getty@tty1.service loaded active running Getty on tty1 + systemd-journald.service loaded active running Journal Service + systemd-logind.service loaded active running User Login Management + systemd-networkd.service loaded active running Network Management + systemd-nsresourced.service loaded active running Namespace Resource Manager + systemd-oomd.service loaded active running Userspace Out-Of-Memory (OOM) Killer + systemd-resolved.service loaded active running Network Name Resolution + systemd-timesyncd.service loaded active running Network Time Synchronization + systemd-udevd.service loaded active running Rule-based Manager for Device Events and Files + systemd-userdbd.service loaded active running User Database Manager + +Legend: LOAD → Reflects whether the unit definition was properly loaded. + ACTIVE → The high-level unit activation state, i.e. generalization of SUB. + SUB → The low-level unit activation state, values depend on unit type. + +11 loaded units listed. + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/07-failed-services.txt b/screenshots/09-networking-and-system-audit/07-failed-services.txt new file mode 100644 index 0000000..9da2e83 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/07-failed-services.txt @@ -0,0 +1,7 @@ +Command: systemctl --failed --no-pager + + UNIT LOAD ACTIVE SUB DESCRIPTION + +0 loaded units listed. + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/08-user-accounts.txt b/screenshots/09-networking-and-system-audit/08-user-accounts.txt new file mode 100644 index 0000000..e5a48f8 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/08-user-accounts.txt @@ -0,0 +1,18 @@ +Command: getent passwd + +root:x:0:0:root:/root:/bin/bash +bin:x:1:1:bin:/dev/null:/usr/bin/false +daemon:x:6:6:Daemon User:/dev/null:/usr/bin/false +messagebus:x:18:18:D-Bus Message Daemon User:/run/dbus:/usr/bin/false +systemd-journal-gateway:x:73:73:systemd Journal Gateway:/:/usr/bin/false +systemd-journal-remote:x:74:74:systemd Journal Remote:/:/usr/bin/false +systemd-journal-upload:x:75:75:systemd Journal Upload:/:/usr/bin/false +systemd-network:x:76:76:systemd Network Management:/:/usr/bin/false +systemd-resolve:x:77:77:systemd Resolver:/:/usr/bin/false +systemd-timesync:x:78:78:systemd Time Synchronization:/:/usr/bin/false +systemd-coredump:x:79:79:systemd Core Dumper:/:/usr/bin/false +uuidd:x:80:80:UUID Generation Daemon User:/dev/null:/usr/bin/false +systemd-oom:x:81:81:systemd Out Of Memory Daemon:/:/usr/bin/false +nobody:x:65534:65534:Unprivileged User:/dev/null:/usr/bin/false + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/09-groups.txt b/screenshots/09-networking-and-system-audit/09-groups.txt new file mode 100644 index 0000000..88b417d --- /dev/null +++ b/screenshots/09-networking-and-system-audit/09-groups.txt @@ -0,0 +1,37 @@ +Command: getent group + +root:x:0: +bin:x:1:daemon +sys:x:2: +kmem:x:3: +tape:x:4: +tty:x:5: +daemon:x:6: +floppy:x:7: +disk:x:8: +lp:x:9: +dialout:x:10: +audio:x:11: +video:x:12: +utmp:x:13: +clock:x:14: +cdrom:x:15: +adm:x:16: +messagebus:x:18: +systemd-journal:x:23: +input:x:24: +mail:x:34: +kvm:x:61: +systemd-journal-gateway:x:73: +systemd-journal-remote:x:74: +systemd-journal-upload:x:75: +systemd-resolve:x:76: +systemd-timesync:x:78: +systemd-coredump:x:79: +uuidd:x:80: +systemd-oom:x:81: +wheel:x:97: +users:x:999: +nogroup:x:65534: + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/10-account-file-permissions.txt b/screenshots/09-networking-and-system-audit/10-account-file-permissions.txt new file mode 100644 index 0000000..13db02c --- /dev/null +++ b/screenshots/09-networking-and-system-audit/10-account-file-permissions.txt @@ -0,0 +1,28 @@ +Command: stat /etc/passwd /etc/group /etc/shadow + + File: /etc/passwd + Size: 862 Blocks: 8 IO Block: 4096 regular file +Device: 253,17 Inode: 2359323 Links: 1 +Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) +Access: 2026-11-14 20:38:22.537262524 +0330 +Modify: 2026-11-03 22:23:07.700287849 +0330 +Change: 2026-11-03 22:23:07.702696060 +0330 + Birth: 2026-11-03 22:23:07.699696048 +0330 + File: /etc/group + Size: 488 Blocks: 8 IO Block: 4096 regular file +Device: 253,17 Inode: 2359345 Links: 1 +Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) +Access: 2026-11-14 20:38:22.537262524 +0330 +Modify: 2026-11-03 22:23:07.712044393 +0330 +Change: 2026-11-03 22:23:07.715696115 +0330 + Birth: 2026-11-03 22:23:07.711696098 +0330 + File: /etc/shadow + Size: 456 Blocks: 8 IO Block: 4096 regular file +Device: 253,17 Inode: 2359330 Links: 1 +Access: (0400/-r--------) Uid: ( 0/ root) Gid: ( 0/ root) +Access: 2026-11-14 20:39:10.216262524 +0330 +Modify: 2026-11-03 22:23:07.706079053 +0330 +Change: 2026-11-03 22:23:07.708696085 +0330 + Birth: 2026-11-03 22:23:07.705696073 +0330 + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/11-sshd-enabled-state.txt b/screenshots/09-networking-and-system-audit/11-sshd-enabled-state.txt new file mode 100644 index 0000000..4e27106 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/11-sshd-enabled-state.txt @@ -0,0 +1,5 @@ +Command: systemctl is-enabled sshd + +not-found + +Exit status: 4 diff --git a/screenshots/09-networking-and-system-audit/12-kernel-information.txt b/screenshots/09-networking-and-system-audit/12-kernel-information.txt new file mode 100644 index 0000000..0bbb83d --- /dev/null +++ b/screenshots/09-networking-and-system-audit/12-kernel-information.txt @@ -0,0 +1,5 @@ +Command: uname -a + +Linux lfs 7.1.8 #1 SMP PREEMPT_DYNAMIC Wed Nov 4 17:56:56 +0330 2026 x86_64 GNU/Linux + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/13-os-release.txt b/screenshots/09-networking-and-system-audit/13-os-release.txt new file mode 100644 index 0000000..12738bf --- /dev/null +++ b/screenshots/09-networking-and-system-audit/13-os-release.txt @@ -0,0 +1,5 @@ +Command: cat /etc/os-release + +NAME="Linux From Scratch" + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/14-hostname.txt b/screenshots/09-networking-and-system-audit/14-hostname.txt new file mode 100644 index 0000000..8c8dbc8 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/14-hostname.txt @@ -0,0 +1,20 @@ +Command: hostnamectl status + + Static hostname: lfs + Icon name: computer-vm + Chassis: vm 💽 + Machine ID: + Boot ID: + Product UUID: + Virtualization: kvm +Operating System: Linux From Scratch + Kernel: Linux 7.1.8 + Architecture: x86-64 + Hardware Vendor: QEMU + Hardware Model: Standard PC _Q35 + ICH9, 2009_ +Hardware Version: pc-q35-10.2 +Firmware Version: edk2-20260812-8.fc44 + Firmware Date: Wed 2026-08-12 + Firmware Age: 3month 3d + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/15-resolvectl-status.txt b/screenshots/09-networking-and-system-audit/15-resolvectl-status.txt new file mode 100644 index 0000000..bd5dc3e --- /dev/null +++ b/screenshots/09-networking-and-system-audit/15-resolvectl-status.txt @@ -0,0 +1,22 @@ +Command: resolvectl status + +Global + Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported + resolv.conf mode: stub + Current DNS Server: 1.1.1.1#one.one.one.one +Fallback DNS Servers: 1.1.1.1#one.one.one.one 8.8.8.8#dns.google + 9.9.9.9#dns.quad9.net 1.0.0.1#one.one.one.one + 8.8.4.4#dns.google 149.112.112.112#dns.quad9.net + 2606:4700:4700::1111#one.one.one.one + 2001:4860:4860::8888#dns.google 2620:fe::fe#dns.quad9.net + 2606:4700:4700::1001#one.one.one.one + 2001:4860:4860::8844#dns.google 2620:fe::9#dns.quad9.net + +Link 2 (enp1s0) + Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6 + Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported +Current DNS Server: 192.168.122.1 + DNS Servers: 192.168.122.1 + Default Route: yes + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/16-resolved-service.txt b/screenshots/09-networking-and-system-audit/16-resolved-service.txt new file mode 100644 index 0000000..630da4e --- /dev/null +++ b/screenshots/09-networking-and-system-audit/16-resolved-service.txt @@ -0,0 +1,29 @@ +Command: systemctl status systemd-resolved --no-pager + +● systemd-resolved.service - Network Name Resolution + Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; enabled; preset: enabled) + Active: active (running) since Sun 2026-11-15 00:57:14 +0330; 41s ago + Invocation: +TriggeredBy: ● systemd-resolved-varlink.socket + ● systemd-resolved-monitor.socket + Docs: man:systemd-resolved.service(8) + man:org.freedesktop.resolve1(5) + https://systemd.io/WRITING_NETWORK_CONFIGURATION_MANAGERS + https://systemd.io/WRITING_RESOLVER_CLIENTS + Main PID: 178 (systemd-resolve) + Status: "Processing requests..." + Tasks: 1 (limit: 14274) + Memory: 4.5M (peak: 4.6M) + CPU: 25ms + CGroup: /system.slice/systemd-resolved.service + └─178 /usr/lib/systemd/systemd-resolved + +Nov 15 00:57:14 lfs systemd-resolved[178]: Positive Trust Anchors: +Nov 15 00:57:14 lfs systemd-resolved[178]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d +Nov 15 00:57:14 lfs systemd-resolved[178]: . IN DS 38696 8 2 683d2d0acb8c9b712a1948b27f741219298d0a450d612c483af444a4c0fb2b16 +Nov 15 00:57:14 lfs systemd-resolved[178]: Negative trust anchors: home.arpa 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.in-addr.arpa 21.172.in-addr.arpa 22.172.in-addr.arpa 23.172.in-addr.arpa 24.172.in-addr.arpa 25.172.in-addr.arpa 26.172.in-addr.arpa 27.172.in-addr.arpa 28.172.in-addr.arpa 29.172.in-addr.arpa 30.172.in-addr.arpa 31.172.in-addr.arpa 170.0.0.192.in-addr.arpa 171.0.0.192.in-addr.arpa 168.192.in-addr.arpa d.f.ip6.arpa ipv4only.arpa resolver.arpa corp home internal intranet lan local private test +Nov 15 00:57:14 lfs systemd-resolved[178]: Using system hostname 'lfs'. +Nov 15 00:57:14 lfs systemd[1]: Started Network Name Resolution. +Nov 15 00:57:14 lfs systemd-resolved[178]: Switching to fallback DNS server 1.1.1.1#one.one.one.one. + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/17-networkd-service.txt b/screenshots/09-networking-and-system-audit/17-networkd-service.txt new file mode 100644 index 0000000..c188599 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/17-networkd-service.txt @@ -0,0 +1,33 @@ +Command: systemctl status systemd-networkd --no-pager + +● systemd-networkd.service - Network Management + Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; preset: enabled) + Active: active (running) since Sun 2026-11-15 00:57:14 +0330; 40s ago + Invocation: +TriggeredBy: ● systemd-networkd-varlink-metrics.socket + ● systemd-networkd-varlink.socket + ● systemd-networkd-resolve-hook.socket + ● systemd-networkd.socket + Docs: man:systemd-networkd.service(8) + man:org.freedesktop.network1(5) + Main PID: 244 (systemd-network) + Status: "Processing requests..." + Tasks: 1 (limit: 14274) + FD Store: 0 (limit: 512) + Memory: 3.8M (peak: 4.1M) + CPU: 23ms + CGroup: /system.slice/systemd-networkd.service + └─244 /usr/lib/systemd/systemd-networkd + +Nov 15 00:57:14 lfs systemd-networkd[244]: lo: Link UP +Nov 15 00:57:14 lfs systemd-networkd[244]: lo: Gained carrier +Nov 15 00:57:14 lfs systemd[1]: Started Network Management. +Nov 15 00:57:14 lfs systemd-networkd[244]: eth0: Interface name change detected, renamed to enp1s0. +Nov 15 00:57:14 lfs systemd-networkd[244]: enp1s0: Configuring with /etc/systemd/network/10-ethernet-dhcp.network. +Nov 15 00:57:14 lfs systemd-networkd[244]: enp1s0: Link UP +Nov 15 00:57:14 lfs systemd-networkd[244]: enp1s0: Gained carrier +Nov 15 00:57:16 lfs systemd-networkd[244]: enp1s0: Gained IPv6LL +Nov 15 00:57:17 lfs systemd-networkd[244]: enp1s0: DHCPv4 address 192.168.122.54/24, gateway 192.168.122.1 acquired from 192.168.122.1 +Nov 15 00:57:17 lfs systemd-networkd[244]: Could not set hostname: Access denied + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/18-resolv-conf.txt b/screenshots/09-networking-and-system-audit/18-resolv-conf.txt new file mode 100644 index 0000000..0fd016c --- /dev/null +++ b/screenshots/09-networking-and-system-audit/18-resolv-conf.txt @@ -0,0 +1,27 @@ +resolv.conf symlink: +../run/systemd/resolve/stub-resolv.conf + +resolv.conf contents: +# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8). +# Do not edit. +# +# This file might be symlinked as /etc/resolv.conf. If you're looking at +# /etc/resolv.conf and seeing this text, you have followed the symlink. +# +# This is a dynamic resolv.conf file for connecting local clients to the +# internal DNS stub resolver of systemd-resolved. This file lists all +# configured search domains. +# +# Run "resolvectl status" to see details about the uplink DNS servers +# currently in use. +# +# Third party programs should typically not access this file directly, but only +# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a +# different way, replace this symlink by a static file or a different symlink. +# +# See man:systemd-resolved.service(8) for details about the supported modes of +# operation for /etc/resolv.conf. + +nameserver 127.0.0.53 +options edns0 trust-ad +search . diff --git a/screenshots/09-networking-and-system-audit/19-resolved-conf.txt b/screenshots/09-networking-and-system-audit/19-resolved-conf.txt new file mode 100644 index 0000000..6853b08 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/19-resolved-conf.txt @@ -0,0 +1,48 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file (or a copy of it placed in +# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in +# the /etc/systemd/resolved.conf.d/ directory. The latter is generally +# recommended. Defaults can be restored by simply deleting the main +# configuration file and all drop-ins located in /etc/. +# +# Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config. +# +# See resolved.conf(5) for details. + +[Resolve] +# Some examples of DNS servers which may be used for DNS= and FallbackDNS=: +# Cloudflare: 1.1.1.1#one.one.one.one 1.0.0.1#one.one.one.one 2606:4700:4700::1111#one.one.one.one 2606:4700:4700::1001#one.one.one.one +# Google: 8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google +# Quad9: 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net +# +# Using DNS= configures global DNS servers and does not suppress link-specific +# configuration. Parallel requests will be sent to per-link DNS servers +# configured automatically by systemd-networkd.service(8), NetworkManager(8), or +# similar management services, or configured manually via resolvectl(1). See +# resolved.conf(5) and systemd-resolved(8) for more details. +#DNS= +#FallbackDNS=1.1.1.1#one.one.one.one 8.8.8.8#dns.google 9.9.9.9#dns.quad9.net 1.0.0.1#one.one.one.one 8.8.4.4#dns.google 149.112.112.112#dns.quad9.net 2606:4700:4700::1111#one.one.one.one 2001:4860:4860::8888#dns.google 2620:fe::fe#dns.quad9.net 2606:4700:4700::1001#one.one.one.one 2001:4860:4860::8844#dns.google 2620:fe::9#dns.quad9.net +#Domains= +#DNSSEC=no +#DNSOverTLS=no +#MulticastDNS=yes +#LLMNR=yes +#Cache=yes +#CacheFromLocalhost=no +#DNSCacheSize=4096 +#MulticastDNSCacheSize=4096 +#LLMNRCacheSize=4096 +#DNSStubListener=yes +#DNSStubListenerExtra= +#ReadEtcHosts=yes +#ReadStaticRecords=yes +#ResolveUnicastSingleLabel=no +#StaleRetentionSec=0 +#RefuseRecordTypes= diff --git a/screenshots/09-networking-and-system-audit/20-network-config-file-list.txt b/screenshots/09-networking-and-system-audit/20-network-config-file-list.txt new file mode 100644 index 0000000..67371d0 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/20-network-config-file-list.txt @@ -0,0 +1 @@ +/etc/systemd/network/10-ethernet-dhcp.network diff --git a/screenshots/09-networking-and-system-audit/21-enabled-services.txt b/screenshots/09-networking-and-system-audit/21-enabled-services.txt new file mode 100644 index 0000000..33ca6f2 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/21-enabled-services.txt @@ -0,0 +1,39 @@ +Command: systemctl list-unit-files --state=enabled --no-pager + +UNIT FILE STATE PRESET +getty@.service enabled enabled +systemd-confext.service enabled enabled +systemd-network-generator.service enabled enabled +systemd-networkd-wait-online.service enabled enabled +systemd-networkd.service enabled enabled +systemd-oomd.service enabled enabled +systemd-pstore.service enabled enabled +systemd-resolved.service enabled enabled +systemd-sysext.service enabled enabled +systemd-timesyncd.service enabled enabled +systemd-udev-load-credentials.service enabled enabled +systemd-userdb-load-credentials.service enabled enabled +systemd-factory-reset.socket enabled enabled +systemd-journald-audit.socket enabled enabled +systemd-mountfsd.socket enabled enabled +systemd-networkd-resolve-hook.socket enabled enabled +systemd-networkd-varlink-metrics.socket enabled enabled +systemd-networkd-varlink.socket enabled enabled +systemd-networkd.socket enabled enabled +systemd-nsresourced.socket enabled enabled +systemd-oomd.socket enabled enabled +systemd-report-basic.socket enabled enabled +systemd-report-cgroup.socket enabled enabled +systemd-resolved-monitor.socket enabled enabled +systemd-resolved-varlink.socket enabled enabled +systemd-storage-block.socket enabled enabled +systemd-storage-fs.socket enabled enabled +systemd-sysext.socket enabled enabled +systemd-userdbd.socket enabled enabled +machines.target enabled enabled +reboot.target enabled enabled +remote-fs.target enabled enabled + +32 unit files listed. + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/22-systemd-security.txt b/screenshots/09-networking-and-system-audit/22-systemd-security.txt new file mode 100644 index 0000000..d7c44ef --- /dev/null +++ b/screenshots/09-networking-and-system-audit/22-systemd-security.txt @@ -0,0 +1,24 @@ +Command: systemd-analyze security --no-pager + +UNIT EXPOSURE PREDICATE HAPPY +dbus.service 9.1 UNSAFE :-{ +emergency.service 9.4 UNSAFE :-{ +getty@tty1.service 9.5 UNSAFE :-{ +rescue.service 9.4 UNSAFE :-{ +systemd-ask-password-console.service 9.4 UNSAFE :-{ +systemd-ask-password-wall.service 9.5 UNSAFE :-{ +systemd-hostnamed.service 4.1 OK :-) +systemd-journald.service 7.2 MEDIUM :-| +systemd-logind.service 5.2 MEDIUM :-| +systemd-machined.service 7.7 EXPOSED :-( +systemd-mountfsd.service 7.6 EXPOSED :-( +systemd-networkd.service 4.9 OK :-) +systemd-nsresourced.service 6.2 MEDIUM :-| +systemd-oomd.service 4.2 OK :-) +systemd-resolved.service 4.3 OK :-) +systemd-rfkill.service 9.2 UNSAFE :-{ +systemd-timesyncd.service 4.0 OK :-) +systemd-udevd.service 8.7 EXPOSED :-( +systemd-userdbd.service 4.4 OK :-) + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/23-nftables-rules.txt b/screenshots/09-networking-and-system-audit/23-nftables-rules.txt new file mode 100644 index 0000000..0995eca --- /dev/null +++ b/screenshots/09-networking-and-system-audit/23-nftables-rules.txt @@ -0,0 +1,3 @@ +Command: nft list ruleset + +Command unavailable: nft diff --git a/screenshots/09-networking-and-system-audit/24-iptables-rules.txt b/screenshots/09-networking-and-system-audit/24-iptables-rules.txt new file mode 100644 index 0000000..1ab177e --- /dev/null +++ b/screenshots/09-networking-and-system-audit/24-iptables-rules.txt @@ -0,0 +1,3 @@ +Command: iptables-save + +Command unavailable: iptables-save diff --git a/screenshots/09-networking-and-system-audit/25-ipv4-forwarding.txt b/screenshots/09-networking-and-system-audit/25-ipv4-forwarding.txt new file mode 100644 index 0000000..517d4fc --- /dev/null +++ b/screenshots/09-networking-and-system-audit/25-ipv4-forwarding.txt @@ -0,0 +1,5 @@ +Command: sysctl net.ipv4.ip_forward + +net.ipv4.ip_forward = 0 + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/26-ipv6-forwarding.txt b/screenshots/09-networking-and-system-audit/26-ipv6-forwarding.txt new file mode 100644 index 0000000..97c560a --- /dev/null +++ b/screenshots/09-networking-and-system-audit/26-ipv6-forwarding.txt @@ -0,0 +1,5 @@ +Command: sysctl net.ipv6.conf.all.forwarding + +net.ipv6.conf.all.forwarding = 0 + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/27-kernel-network-hardening.txt b/screenshots/09-networking-and-system-audit/27-kernel-network-hardening.txt new file mode 100644 index 0000000..8561e19 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/27-kernel-network-hardening.txt @@ -0,0 +1,9 @@ +Command: sysctl net.ipv4.conf.all.rp_filter net.ipv4.conf.all.accept_redirects net.ipv4.conf.all.send_redirects net.ipv4.conf.all.accept_source_route net.ipv6.conf.all.accept_redirects + +net.ipv4.conf.all.rp_filter = 0 +net.ipv4.conf.all.accept_redirects = 1 +net.ipv4.conf.all.send_redirects = 1 +net.ipv4.conf.all.accept_source_route = 0 +net.ipv6.conf.all.accept_redirects = 1 + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/29-shell-umask.txt b/screenshots/09-networking-and-system-audit/29-shell-umask.txt new file mode 100644 index 0000000..0d1f7c0 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/29-shell-umask.txt @@ -0,0 +1,5 @@ +Command: bash -c umask + +0022 + +Exit status: 0 diff --git a/screenshots/09-networking-and-system-audit/30-system-users-shells.txt b/screenshots/09-networking-and-system-audit/30-system-users-shells.txt new file mode 100644 index 0000000..81e2e45 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/30-system-users-shells.txt @@ -0,0 +1,5 @@ +Command: bash -c awk -F: '$7 !~ /(false|nologin)$/ {print $1 ":" $7}' /etc/passwd + +root:/bin/bash + +Exit status: 0 diff --git a/screenshots/README.md b/screenshots/README.md index 7aba130..8c9d711 100644 --- a/screenshots/README.md +++ b/screenshots/README.md @@ -1,19 +1,20 @@ # Screenshots & Build Evidence -This directory contains visual and technical evidence for **Linux From Scratch 13.1-systemd**. Its historical name is retained for link stability, but the contents include screenshots, text captures, configuration snapshots, scripts and an archive. +This directory contains visual and technical evidence for **Linux From Scratch 13.1-systemd**. Its historical name is retained for link stability; contents include screenshots, text captures, configuration snapshots, scripts and archives. ## Evidence map | Directory | Description | |---|---| -| `01-build-environment/` | Fedora host/build VM, virtualization platform and allocated resources | -| `02-storage-and-filesystem/` | Dedicated LFS disk, partition, filesystem and mount configuration | -| `03-toolchain/` | Captured Binutils, GCC and glibc information and a compiler smoke test | -| `04-base-system/` | Selected base-system component versions and presence-check limitations | -| `05-system-configuration/` | Hostname, locale, timezone, mounts, systemd and shell settings | -| `06-kernel-and-bootloader/` | Kernel configuration, modules, boot files and GRUB | -| `07-testing-and-validation/` | Existing test-log inventory and validation archive | -| `08-final-system/` | GRUB menu, first boot and final system state | +| `01-build-environment/` | Fedora host/build VM and virtualization | +| `02-storage-and-filesystem/` | LFS disk, partition, filesystem and mount | +| `03-toolchain/` | Binutils, GCC and glibc evidence | +| `04-base-system/` | Base-system component evidence | +| `05-system-configuration/` | Hostname, locale, timezone and systemd | +| `06-kernel-and-bootloader/` | Kernel, modules, boot files and GRUB | +| `07-testing-and-validation/` | Test-log inventory and validation archive | +| `08-final-system/` | GRUB, first boot and final system state | +| `09-networking-and-system-audit/` | 30 networking/security command captures and audit README | ## Build reference @@ -26,6 +27,4 @@ Official book: https://www.linuxfromscratch.org/lfs/view/13.1-systemd/ ## Evidence interpretation -Captured output describes what was reported at collection time. A command-presence check is not a package test result, and a compiler smoke test is not a full toolchain test suite. The compiler capture reporting `x86_64-pc-linux-gnu` is kept distinct from the LFS target triplet. See [the testing methodology](../docs/testing-and-validation.md). - -The test archive is retained as collected; its contents should be inspected before drawing package-wide conclusions. +Captured output describes what was reported at collection time. A command-presence check is not a package test result, and a compiler smoke test is not a full toolchain test suite. See [testing methodology](../docs/testing-and-validation.md) and the [network/security audit](../docs/networking-and-security-audit.md). diff --git a/scripts/collect-evidence/README.md b/scripts/collect-evidence/README.md index f3df075..146cf4d 100644 --- a/scripts/collect-evidence/README.md +++ b/scripts/collect-evidence/README.md @@ -8,11 +8,25 @@ These scripts collect selected information from the system where they are execut | `collect-kernel-bootloader-evidence.sh` | Captures kernel, modules, boot files and GRUB information | | `collect-testing-validation-evidence.sh` | Inventories existing package test logs and extracts recognizable counters | | `collect-final-system-evidence.sh` | Captures final system, kernel, systemd and filesystem state | +| `collect-network-security-evidence.sh` | Read-only collection of 30 networking/security command outputs with correct exit-status capture | +| `anonymize-audit-evidence.py` | Writes anonymized copies of text evidence without modifying originals | -## Execution +## Network/security evidence -The scripts default to output directories under `/root/`. Run them with appropriate privileges inside the LFS system, or provide an alternate output directory as the first argument where supported. +Run the collector with Bash and an optional output directory: -Review each script before execution. Captured reports may contain machine-specific details such as disk names, mount points, hostnames and hardware information. +```bash +bash scripts/collect-evidence/collect-network-security-evidence.sh /path/to/raw-evidence +``` -These are collectors, not installers. They do not modify the bootloader or kernel configuration. The testing collector does not rerun package test suites. +The collector writes raw output only. It does not change system configuration. Raw captures may contain machine-specific identifiers; create a separate anonymized copy before publishing: + +```bash +python3 scripts/collect-evidence/anonymize-audit-evidence.py /path/to/raw-evidence /path/to/anonymized-evidence +``` + +Review every anonymized file manually. Do not overwrite the originals. + +## General execution + +Review each script before execution. Captured reports may contain host-specific details such as disk names, mount points, hostnames and hardware information. These scripts are collectors, not installers. From b3fe8022ff95a62bf6f169cb9046dcfe24a093ae Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:25:04 +0330 Subject: [PATCH 08/30] Add complete login definitions audit capture --- .../28-login-definitions.txt | 511 ++++++++++++++++++ 1 file changed, 511 insertions(+) create mode 100644 screenshots/09-networking-and-system-audit/28-login-definitions.txt diff --git a/screenshots/09-networking-and-system-audit/28-login-definitions.txt b/screenshots/09-networking-and-system-audit/28-login-definitions.txt new file mode 100644 index 0000000..2e040c4 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/28-login-definitions.txt @@ -0,0 +1,511 @@ +Command: cat /etc/login.defs + +# +# /etc/login.defs - Configuration control definitions for the shadow package. +# +# $Id$ +# + +# +# Delay in seconds before being allowed another attempt after a login failure +# Note: when PAM is used, some modules may enforce a minimum delay (e.g. +# pam_unix(8) enforces a 2s delay) +# +FAIL_DELAY 3 + +# +# Enable logging and display of /var/log/faillog login(1) failure info. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login(1) failures are recorded. +# +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable logging and display of /var/log/lastlog login(1) time info. +# +LASTLOG_ENAB yes + +# +# Limit the highest user ID number for which the lastlog entries should +# be updated. +# +# No LASTLOG_UID_MAX means that there is no user ID limit for writing +# lastlog entries. +# +#LASTLOG_UID_MAX + +# +# Enable checking and display of mailbox status upon login. +# +# Disable if the shell startup files already check for mail +# ("mailx -e" or equivalent). +# +MAIL_CHECK_ENAB yes + +# +# Enable additional checks upon password changes. +# +OBSCURE_CHECKS_ENAB yes + +# +# Enable checking of time restrictions specified in /etc/porttime. +# +PORTTIME_CHECKS_ENAB yes + +# +# Enable setting of ulimit, umask, and niceness from passwd(5) gecos field. +# +QUOTAS_ENAB yes + +# +# Enable "syslog" logging of su(1) activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp(1) and sg(1). +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# from these devices. +# +CONSOLE /etc/securetty +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# If defined, all su(1) activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, ":" delimited list of "message of the day" files to +# be displayed upon login. +# +MOTD_FILE /etc/motd +#MOTD_FILE /etc/motd:/usr/lib/news/news-motd + +# +# If defined, this file will be output before each login(1) prompt. +# +#ISSUE_FILE /etc/issue + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format similar to "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login(1) failures will be logged here in a utmp format. +# last(1), when invoked as lastb(1), will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, name of file whose presence will inhibit non-root +# logins. The content of this file should be a message indicating +# why logins are inhibited. +# +NOLOGINS_FILE /etc/nologin + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then ps(1) will display the +# command as "-su". If not defined, then ps(1) will display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# *REQUIRED* +# Directory where mailboxes reside, _or_ name of file, relative to +# the home directory. If you do define both, MAIL_DIR takes precedence. +# +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# If defined, either a TZ environment parameter spec or the +# fully-rooted pathname of a file containing such a spec. +# +#ENV_TZ TZ=CST6CDT +#ENV_TZ /etc/tzname + +# +# If defined, an HZ environment parameter spec. +# +# for Linux/x86 +ENV_HZ HZ=100 +# For Linux/Alpha... +#ENV_HZ HZ=1024 + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/sbin:/usr/bin +ENV_PATH PATH=/usr/bin + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a write(1) program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP as the number of such group +# and TTYPERM as 0620. Otherwise leave TTYGROUP commented out and +# set TTYPERM to either 622 or 600. +# +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# ULIMIT Default "ulimit" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# The ULIMIT is only used if the system supports it. +# (now it works with setrlimit too; ulimit is in 512-byte units) +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +#ULIMIT 2097152 + +# Default initial "umask" value used by login(1) on non-PAM enabled systems. +# Default "umask" value for pam_umask(8) on PAM enabled systems. +# UMASK is also used by useradd(8) and newusers(8) to set the mode for new +# home directories if HOME_MODE is not set. +# 022 is the default value, but 027, or even 077, could be considered +# for increased privacy. There is no One True Answer here: each sysadmin +# must make up their mind. +UMASK 022 + +# HOME_MODE is used by useradd(8) and newusers(8) to set the mode for new +# home directories. +# If HOME_MODE is not set, the value of UMASK is used to create the mode. +#HOME_MODE 0700 + +# +# If "yes", the user must be listed as a member of the first gid 0 group +# in /etc/group (called "root" on most Linux systems) to be able to "su" +# to uid 0 accounts. If the group doesn't exist or is empty, no one +# will be able to "su" to uid 0. +# +SU_WHEEL_ONLY no + +# +# Min/max values for automatic uid selection in useradd(8) +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +SYS_UID_MIN 101 +SYS_UID_MAX 999 +# Extra per user uids +SUB_UID_MIN 100000 +SUB_UID_MAX 600100000 +SUB_UID_COUNT 65536 +# +# If set to yes, subordinate user ID entries in /etc/subuid are stored +# using the numeric user ID rather than the username. +#SUB_UID_STORE_BY_UID no + +# +# Enable deterministic subordinate UID allocation based on the user's UID. +# When set to "yes", subordinate UID ranges are calculated using a +# deterministic formula instead of searching for the next free range: +# +# WARNING: Do not mix deterministic and linear (default) allocation +# on the same system or across systems sharing /etc/subuid. Mixing +# methods will cause subordinate ID range conflicts and overlaps. +# +# Default: no +# +#SUB_UID_DETERMINISTIC no + +# +# Allow deterministic subordinate UID calculation to wrap around using +# modulo arithmetic when a UID would overflow the configured subordinate +# ID space. Only effective when SUB_UID_DETERMINISTIC is "yes". +# +# When disabled (default), any arithmetic overflow is a hard error, +# ensuring non-overlapping monotonic allocation. +# +# WARNING: SECURITY RISK - MAY CAUSE RANGE OVERLAPS AND PRIVILEGE ESCALATION! +# +# When enabled (WRAP MODE), the subordinate UID space is treated as a ring +# buffer. Uses modulo arithmetic to handle overflow. May cause range +# overlaps between users. +# +# Default: no +# +#UNSAFE_SUB_UID_DETERMINISTIC_WRAP no + +# +# Min/max values for automatic gid selection in groupadd(8) +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +SYS_GID_MIN 101 +SYS_GID_MAX 999 +# Extra per user group ids +SUB_GID_MIN 100000 +SUB_GID_MAX 600100000 +SUB_GID_COUNT 65536 +# +# If set to yes, subordinate group ID entries in /etc/subgid are stored +# using the numeric user ID rather than the username. +#SUB_GID_STORE_BY_UID no + +# +# Enable deterministic subordinate GID allocation based on the user's UID. +# When set to "yes", subordinate GID ranges are calculated using a +# deterministic formula instead of searching for the next free range: +# +# WARNING: Do not mix deterministic and linear (default) allocation +# on the same system or across systems sharing /etc/subgid. Mixing +# methods will cause subordinate ID range conflicts and overlaps. +# +# Default: no +# +#SUB_GID_DETERMINISTIC no + +# +# Allow deterministic subordinate GID calculation to wrap around using +# modulo arithmetic when a UID would overflow the configured subordinate +# ID space. Only effective when SUB_GID_DETERMINISTIC is "yes". +# +# When disabled (default), any arithmetic overflow is a hard error, +# ensuring non-overlapping monotonic allocation. +# +# WARNING: SECURITY RISK - MAY CAUSE RANGE OVERLAPS AND PRIVILEGE ESCALATION! +# +# When enabled (WRAP MODE), the subordinate GID space is treated as a ring +# buffer. Uses modulo arithmetic to handle overflow. May cause range +# overlaps between users. +# +# Default: no +# +#UNSAFE_SUB_GID_DETERMINISTIC_WRAP no + +# +# Max number of login(1) retries if password is bad +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login(1) +# +LOGIN_TIMEOUT 60 + +# +# Maximum number of attempts to change password if rejected (too easy) +# +PASS_CHANGE_TRIES 5 + +# +# Password strength controls: +# +# Warn about weak passwords (but still allow them) if you are root. +PASS_ALWAYS_WARN yes +# Minimum acceptable password length. +PASS_MIN_LEN 5 + +# +# Require password before chfn(1)/chsh(1) can make any changes. +# +CHFN_AUTH yes + +# +# Which fields may be changed by regular users using chfn(1) - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Password prompt (%s will be replaced by user name). +# +# XXX - it doesn't work correctly yet, for now leave it commented out +# to use the default which is just "Password: ". +#LOGIN_STRING "%s's Password: " + +# +# Only works if compiled with ENCRYPTMETHOD_SELECT defined: +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to BCRYPT, BCRYPT-based algorithm will be used for encrypting password +# If set to YESCRYPT, YESCRYPT-based algorithm will be used for encrypting password +# +# Note: if you use PAM, it is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD YESCRYPT + +# +# Only works if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute-force the password. +# However, more CPU resources will be needed to authenticate users if +# this value is increased. +# +# If not specified, the libc will choose the default number of rounds (5000), +# which is orders of magnitude too low for modern hardware. +# The values must be within the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +#SHA_CRYPT_MIN_ROUNDS 5000 +#SHA_CRYPT_MAX_ROUNDS 5000 + +# +# Only works if ENCRYPT_METHOD is set to BCRYPT. +# +# Define the number of BCRYPT rounds. +# With a lot of rounds, it is more difficult to brute-force the password. +# However, more CPU resources will be needed to authenticate users if +# this value is increased. +# +# If not specified, 13 rounds will be attempted. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +#BCRYPT_MIN_ROUNDS 13 +#BCRYPT_MAX_ROUNDS 13 + +# +# Only works if ENCRYPT_METHOD is set to YESCRYPT. +# +# Define the YESCRYPT cost factor. +# With a higher cost factor, it is more difficult to brute-force the password. +# However, more CPU time and more memory will be needed to authenticate users +# if this value is increased. +# +# If not specified, a cost factor of 5 will be used. +# The value must be within the 1-11 range. +# +#YESCRYPT_COST_FACTOR 5 + +# +# List of groups to add to the user's supplementary group set +# when logging in from the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in from the console. +# How to do it is left as an exercise for the reader... +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Should login be allowed if we can't cd to the home directory? +# Default is no. +# +DEFAULT_HOME yes + +# +# The pwck(8) utility emits a warning for any system account with a home +# directory that does not exist. Some system accounts intentionally do not +# have a home directory. Such accounts may have this string as their home +# directory in /etc/passwd to avoid a spurious warning. +# +NONEXISTENT /nonexistent + +# +# If this file exists and is readable, login environment will be +# read from it. Every line should be in the form name=value. +# +ENVIRON_FILE /etc/environment + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# This also enables userdel(8) to remove user groups if no members exist. +# +USERGROUPS_ENAB yes + +# +# If set to a non-zero number, the shadow utilities will make sure that +# groups never have more than this number of users on one line. +# This permits to support split groups (groups split into multiple lines, +# with the same group ID, to avoid limitation of the line length in the +# group file). +# +# 0 is the default value and disables this feature. +# +#MAX_MEMBERS_PER_GROUP 0 + +# +# If useradd(8) should create home directories for users by default (non +# system users only). +# This option is overridden with the -M or -m flags on the useradd(8) +# command-line. +# +#CREATE_HOME yes + +# +# Force use shadow, even if shadow passwd & shadow group files are +# missing. +# +#FORCE_SHADOW yes + +# +# Allow newuidmap and newgidmap when running under an alternative +# primary group. +# +#GRANT_AUX_GROUP_SUBIDS yes + +# +# Prevents an empty password field to be interpreted as "no authentication +# required". +# Set to "yes" to prevent for all accounts +# Set to "superuser" to prevent for UID 0 / root (default) +# Set to "no" to not prevent for any account (dangerous, historical default) +PREVENT_NO_AUTH superuser + +# +# Select the HMAC cryptography algorithm. +# Used in pam_timestamp module to calculate the keyed-hash message +# authentication code. +# +# Note: it is recommended to check hmac(3) to see the possible algorithms +# that are available in your system. +# +#HMAC_CRYPTO_ALGO SHA512 + +Exit status: 0 From d64c84dd7aabe9a27e2b3dfa0df35ae912c37c47 Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:25:14 +0330 Subject: [PATCH 09/30] Preserve original login definitions wording --- .../09-networking-and-system-audit/28-login-definitions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screenshots/09-networking-and-system-audit/28-login-definitions.txt b/screenshots/09-networking-and-system-audit/28-login-definitions.txt index 2e040c4..43df566 100644 --- a/screenshots/09-networking-and-system-audit/28-login-definitions.txt +++ b/screenshots/09-networking-and-system-audit/28-login-definitions.txt @@ -185,7 +185,7 @@ TTYPERM 0600 # ULIMIT Default "ulimit" value. # # The ERASECHAR and KILLCHAR are used only on System V machines. -# The ULIMIT is only used if the system supports it. +# The ULIMIT is used only if the system supports it. # (now it works with setrlimit too; ulimit is in 512-byte units) # # Prefix these values with "0" to get octal, "0x" to get hexadecimal. From cb3a49086f23b770c412506f5d934530441fa1e9 Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:25:15 +0330 Subject: [PATCH 10/30] Preserve Phase 3 collection metadata --- .../collection-metadata.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 screenshots/09-networking-and-system-audit/collection-metadata.txt diff --git a/screenshots/09-networking-and-system-audit/collection-metadata.txt b/screenshots/09-networking-and-system-audit/collection-metadata.txt new file mode 100644 index 0000000..e1a5460 --- /dev/null +++ b/screenshots/09-networking-and-system-audit/collection-metadata.txt @@ -0,0 +1,10 @@ +LFS Phase 3 Security and Network Audit + +Collected: 2026-11-15T00:57:55+03:30 +Hostname: lfs +Kernel: 7.1.8 + +This is a read-only configuration audit. +No firewall, resolver, account, or kernel settings were changed. + +Review output before publishing. From f23803cf188f5600c340e9bcbd8cfa8281d98d51 Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:25:28 +0330 Subject: [PATCH 11/30] Preserve project README and add audit stage --- README.md | 68 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index b8e4c7e..f4882fa 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,19 @@ systemd

-A hands-on build of a complete Linux system from source, following the **Linux From Scratch 13.1-systemd** book. +

+ Booted and documented + Fedora 43 + KVM and QEMU +

+ +A hands-on build of a complete Linux system from source, following the **Linux From Scratch 13.1-systemd** book. The project covers the build environment, toolchain, base user space, system configuration, Linux kernel, GRUB and first boot. ## Project status -**System built and booted.** The repository documents the build environment, toolchain, base system, system configuration, kernel, GRUB, first boot, test-log review, and a read-only networking/security baseline audit. +**System built and booted.** The repository contains evidence of the final system boot, running kernel, systemd state, filesystem layout and GRUB configuration. -This status does **not** mean every package test suite passed. Test results are documented separately and interpreted from their original logs. +This status describes the existence of a bootable system; it does **not** mean every package test suite passed. Test results are documented separately and must be interpreted from their original logs. ## Build environment @@ -28,40 +34,58 @@ This status does **not** mean every package test suite passed. Test results are | Filesystem | ext4 | | Init system | systemd | +See [the build reference](references/BUILD-REFERENCE.md) and [build environment evidence](screenshots/01-build-environment/README.md). + ## Build stages and evidence | Stage | Contents | |---|---| -| [01 — Build environment](screenshots/01-build-environment/README.md) | Host and build VM | -| [02 — Storage and filesystem](screenshots/02-storage-and-filesystem/README.md) | LFS disk, partition and ext4 | -| [03 — Toolchain](screenshots/03-toolchain/README.md) | Binutils, GCC and glibc evidence | -| [04 — Base system](screenshots/04-base-system/README.md) | Base-system component evidence | -| [05 — System configuration](screenshots/05-system-configuration/README.md) | Hostname, locale, timezone and systemd | -| [06 — Kernel and bootloader](screenshots/06-kernel-and-bootloader/README.md) | Kernel, modules and GRUB | -| [07 — Testing and validation](screenshots/07-testing-and-validation/README.md) | Test-log inventory and limitations | -| [08 — Final system](screenshots/08-final-system/README.md) | First boot and final system state | -| [09 — Networking and system audit](screenshots/09-networking-and-system-audit/README.md) | 30 raw text captures, anonymized identifiers and audit report | - -The `screenshots/` directory retains its historical name but also contains text captures and scripts. +| [01 — Build environment](screenshots/01-build-environment/README.md) | Fedora environment, KVM/QEMU VM and allocated resources | +| [02 — Storage and filesystem](screenshots/02-storage-and-filesystem/README.md) | Dedicated LFS disk, partition, ext4 and mount point | +| [03 — Toolchain](screenshots/03-toolchain/README.md) | Captured Binutils/GCC/glibc information and compiler smoke test | +| [04 — Base system](screenshots/04-base-system/README.md) | Selected component versions and presence-check methodology | +| [05 — System configuration](screenshots/05-system-configuration/README.md) | Hostname, locale, timezone, mounts, systemd and shell | +| [06 — Kernel and bootloader](screenshots/06-kernel-and-bootloader/README.md) | Kernel configuration, modules, boot files and GRUB | +| [07 — Testing and validation](screenshots/07-testing-and-validation/README.md) | Existing test-log inventory and validation limitations | +| [08 — Final system](screenshots/08-final-system/README.md) | GRUB menu, first boot and final system state | +| [09 — Networking and system audit](screenshots/09-networking-and-system-audit/README.md) | 30 anonymized network/security command captures and audit report | + +The `screenshots/` directory retains its historical name, but includes text captures, scripts and archives as well as images. ## Technical documentation - [Build process](docs/build-process.md) -- [Boot process](docs/boot-process.md) -- [ELF and dynamic linking](docs/elf-and-dynamic-linking.md) -- [Testing and validation](docs/testing-and-validation.md) +- [Boot process: firmware, GRUB, kernel and systemd](docs/boot-process.md) +- [ELF binaries and dynamic linking](docs/elf-and-dynamic-linking.md) +- [Testing and validation methodology](docs/testing-and-validation.md) - [Networking and security baseline audit](docs/networking-and-security-audit.md) - [Troubleshooting](troubleshooting/README.md) -- [Build reference](references/BUILD-REFERENCE.md) +- [Project sources](references/sources.md) + +## Technical focus + +- Cross-compilation and toolchain construction +- GNU Binutils, GCC and glibc +- ELF executables, shared libraries and dynamic linking +- Filesystem hierarchy and system configuration +- Linux kernel configuration and modules +- GRUB bootloader and system initialization with systemd +- Test-log interpretation and troubleshooting +- Networking, name resolution, service state and security-baseline evidence ## Evidence policy - Captured output records what a command reported at collection time. - A command-presence check is not proof that a package test suite passed. -- Test failures, skips and incomplete records are not relabeled as successful results. -- The network/security audit is read-only and does not claim penetration testing, firewall verification, or production readiness. -- The LFS book itself is not included; see the official [LFS 13.1-systemd book](https://www.linuxfromscratch.org/lfs/view/13.1-systemd/). +- A compiler's native target is not automatically the LFS target triplet. +- Test failures, skips and incomplete records must not be relabeled as successful results. +- The networking/security audit is read-only; it is not a penetration test or security certification. +- The LFS book itself is not included; use the official [LFS 13.1-systemd book](https://www.linuxfromscratch.org/lfs/view/13.1-systemd/). ## License -Original repository materials are licensed under [GPL-3.0-only](LICENSE). See [NOTICE](NOTICE) for third-party licensing notes. +Original repository materials are licensed under [GPL-3.0-only](LICENSE). Project copyright and third-party licensing notes are recorded in [NOTICE](NOTICE). The LFS book and upstream software remain subject to their own copyright and license terms; see [the build reference](references/BUILD-REFERENCE.md). + +--- + +

Build · Inspect · Test · Understand

From b24a942248dc1df09400d54a491f6f71b796662f Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:25:34 +0330 Subject: [PATCH 12/30] Add networking audit evidence to index --- screenshots/README.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/screenshots/README.md b/screenshots/README.md index 8c9d711..e0b811f 100644 --- a/screenshots/README.md +++ b/screenshots/README.md @@ -1,20 +1,20 @@ # Screenshots & Build Evidence -This directory contains visual and technical evidence for **Linux From Scratch 13.1-systemd**. Its historical name is retained for link stability; contents include screenshots, text captures, configuration snapshots, scripts and archives. +This directory contains visual and technical evidence for **Linux From Scratch 13.1-systemd**. Its historical name is retained for link stability, but the contents include screenshots, text captures, configuration snapshots, scripts and an archive. ## Evidence map | Directory | Description | |---|---| -| `01-build-environment/` | Fedora host/build VM and virtualization | -| `02-storage-and-filesystem/` | LFS disk, partition, filesystem and mount | -| `03-toolchain/` | Binutils, GCC and glibc evidence | -| `04-base-system/` | Base-system component evidence | -| `05-system-configuration/` | Hostname, locale, timezone and systemd | -| `06-kernel-and-bootloader/` | Kernel, modules, boot files and GRUB | -| `07-testing-and-validation/` | Test-log inventory and validation archive | -| `08-final-system/` | GRUB, first boot and final system state | -| `09-networking-and-system-audit/` | 30 networking/security command captures and audit README | +| `01-build-environment/` | Fedora host/build VM, virtualization platform and allocated resources | +| `02-storage-and-filesystem/` | Dedicated LFS disk, partition, filesystem and mount configuration | +| `03-toolchain/` | Captured Binutils, GCC and glibc information and a compiler smoke test | +| `04-base-system/` | Selected base-system component versions and presence-check limitations | +| `05-system-configuration/` | Hostname, locale, timezone, mounts, systemd and shell settings | +| `06-kernel-and-bootloader/` | Kernel configuration, modules, boot files and GRUB | +| `07-testing-and-validation/` | Existing test-log inventory and validation archive | +| `08-final-system/` | GRUB menu, first boot and final system state | +| `09-networking-and-system-audit/` | 30 individual network/security command captures, anonymized identifiers and audit documentation | ## Build reference @@ -27,4 +27,8 @@ Official book: https://www.linuxfromscratch.org/lfs/view/13.1-systemd/ ## Evidence interpretation -Captured output describes what was reported at collection time. A command-presence check is not a package test result, and a compiler smoke test is not a full toolchain test suite. See [testing methodology](../docs/testing-and-validation.md) and the [network/security audit](../docs/networking-and-security-audit.md). +Captured output describes what was reported at collection time. A command-presence check is not a package test result, and a compiler smoke test is not a full toolchain test suite. The compiler capture reporting `x86_64-pc-linux-gnu` is kept distinct from the LFS target triplet. See [the testing methodology](../docs/testing-and-validation.md). + +The test archive is retained as collected; its contents should be inspected before drawing package-wide conclusions. + +The networking/security evidence is a read-only baseline snapshot, not a penetration test or a firewall verification. See the [networking and security audit](../docs/networking-and-security-audit.md) for scope and limitations. From f5ff9bf3d0fdb85d1639a0ba44e2674d4c74765b Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:25:39 +0330 Subject: [PATCH 13/30] Index networking security audit documentation --- docs/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/README.md b/docs/README.md index 5acb23c..528f78b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,12 +2,12 @@ Project-authored explanations that complement the captured evidence. These documents do not replace the official LFS instructions. -- [Build process](build-process.md) -- [Boot process](boot-process.md) -- [ELF and dynamic linking](elf-and-dynamic-linking.md) -- [Testing and validation](testing-and-validation.md) -- [Test archive audit](test-archive-audit.md) -- [Networking and security baseline audit](networking-and-security-audit.md) +- [Build process](build-process.md) — phases of the LFS build and evidence map. +- [Boot process](boot-process.md) — firmware, GRUB, Linux kernel and systemd. +- [ELF and dynamic linking](elf-and-dynamic-linking.md) — executable formats, shared libraries and inspection commands. +- [Testing and validation](testing-and-validation.md) — interpreting logs and separating presence checks from test results. +- [Test archive audit](test-archive-audit.md) — findings and limitations from the archived LFS test summaries. +- [Networking and security baseline audit](networking-and-security-audit.md) — read-only review of network configuration, resolver state, services, accounts, firewall visibility and selected kernel parameters. ## Documentation rules From f1281dbc945b1c100106df92e060f57ce19d9358 Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:26:07 +0330 Subject: [PATCH 14/30] Add collection metadata and SHA256 evidence manifest From f6080e756bfcc21ee6d2b43cac798548705fa5ff Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:26:14 +0330 Subject: [PATCH 15/30] Add collection metadata and SHA256 evidence manifest --- .../collect-network-security-evidence.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/collect-evidence/collect-network-security-evidence.sh b/scripts/collect-evidence/collect-network-security-evidence.sh index ab0f2dd..9be4f10 100644 --- a/scripts/collect-evidence/collect-network-security-evidence.sh +++ b/scripts/collect-evidence/collect-network-security-evidence.sh @@ -56,5 +56,22 @@ capture 28-login-definitions.txt cat /etc/login.defs capture 29-shell-umask.txt bash -c umask capture 30-system-users-shells.txt awk -F: '$7 !~ /(false|nologin)$/ {print $1 ":" $7}' /etc/passwd +{ + printf 'LFS Networking and Security Evidence Collection\n\n' + printf 'Collected: ' + date --iso-8601=seconds + printf 'Hostname: ' + hostname + printf 'Kernel: ' + uname -r + printf '\nRead-only collection; no system configuration was changed.\n' +} > "$OUTPUT_DIR/collection-metadata.txt" + +if command -v sha256sum >/dev/null 2>&1; then + (cd -- "$OUTPUT_DIR" && sha256sum -- *.txt > SHA256SUMS) +else + printf 'sha256sum unavailable; checksums not generated.\n' > "$OUTPUT_DIR/SHA256SUMS" +fi + printf 'Raw evidence written to: %s\n' "$OUTPUT_DIR" printf 'Review and anonymize the output before publishing.\n' From 65f6dad9a09d7d04d639ff995ac31cf4d531d075 Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:26:20 +0330 Subject: [PATCH 16/30] Document evidence checksum manifest --- scripts/collect-evidence/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/collect-evidence/README.md b/scripts/collect-evidence/README.md index 146cf4d..087e60b 100644 --- a/scripts/collect-evidence/README.md +++ b/scripts/collect-evidence/README.md @@ -19,7 +19,7 @@ Run the collector with Bash and an optional output directory: bash scripts/collect-evidence/collect-network-security-evidence.sh /path/to/raw-evidence ``` -The collector writes raw output only. It does not change system configuration. Raw captures may contain machine-specific identifiers; create a separate anonymized copy before publishing: +The collector writes raw output, collection metadata, and a SHA256 checksum manifest. It does not change system configuration. Raw captures may contain machine-specific identifiers; create a separate anonymized copy before publishing: ```bash python3 scripts/collect-evidence/anonymize-audit-evidence.py /path/to/raw-evidence /path/to/anonymized-evidence From 8a7bf55c8e75c8045ac712b99326ac074e84ff98 Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:50:50 +0330 Subject: [PATCH 17/30] Fix IPv6 anonymization and output path validation --- .../collect-evidence/anonymize-audit-evidence.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/collect-evidence/anonymize-audit-evidence.py b/scripts/collect-evidence/anonymize-audit-evidence.py index be98cd6..0f3451a 100644 --- a/scripts/collect-evidence/anonymize-audit-evidence.py +++ b/scripts/collect-evidence/anonymize-audit-evidence.py @@ -8,15 +8,19 @@ from pathlib import Path MAC_RE = re.compile(r"(?i)\b(?:[0-9a-f]{2}:){5}[0-9a-f]{2}\b") -IPV6_LL_RE = re.compile(r"(?i)\bfe80::[0-9a-f:]+(?:/\d{1,3})?\b") +IPV6_LL_RE = re.compile(r"(?i)(?P
\bfe80::[0-9a-f:]+)(?P/\d{1,3})?\b") UUID_FIELD_RE = re.compile( r"(?im)(?P\b(?:Machine\s+ID|Boot\s+ID|Product\s+UUID|Hardware\s+UUID|Invocation(?:\s+ID)?)\s*:\s*)" r"(?P[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{32})" ) + def anonymize(text: str) -> str: text = MAC_RE.sub("", text) - text = IPV6_LL_RE.sub("fe80::[ANONYMIZED_INTERFACE_ID]/64", text) + text = IPV6_LL_RE.sub( + lambda match: "fe80::[ANONYMIZED_INTERFACE_ID]" + (match.group("prefix") or ""), + text, + ) def replace_uuid(match: re.Match[str]) -> str: label = match.group("prefix").lower() @@ -34,6 +38,7 @@ def replace_uuid(match: re.Match[str]) -> str: text = re.sub(r"(?im)(\bInvocation:\s*)[0-9a-f]{32}\b", r"\1", text) return text + def main() -> int: parser = argparse.ArgumentParser() parser.add_argument("source", type=Path, help="Directory containing original .txt evidence") @@ -44,8 +49,8 @@ def main() -> int: destination = args.destination.resolve() if not source.is_dir(): parser.error(f"source directory does not exist: {source}") - if source == destination or source in destination.parents: - parser.error("destination must be separate from, not inside, the source directory") + if source == destination or source in destination.parents or destination in source.parents: + parser.error("source and destination directories must not overlap") files = sorted(source.glob("*.txt")) if not files: @@ -62,5 +67,6 @@ def main() -> int: print("Review every output manually before publication.") return 0 + if __name__ == "__main__": raise SystemExit(main()) From e399afc6bac269c1274a02fc3bc604dd28330ba5 Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:51:21 +0330 Subject: [PATCH 18/30] Add anonymizer regression tests --- .../test_anonymize_audit_evidence.py | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 scripts/collect-evidence/test_anonymize_audit_evidence.py diff --git a/scripts/collect-evidence/test_anonymize_audit_evidence.py b/scripts/collect-evidence/test_anonymize_audit_evidence.py new file mode 100644 index 0000000..52d3a1e --- /dev/null +++ b/scripts/collect-evidence/test_anonymize_audit_evidence.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python3 +"""Unit tests for anonymize-audit-evidence.py.""" + +from __future__ import annotations + +import importlib.util +import subprocess +import sys +import tempfile +import unittest +from pathlib import Path + +SCRIPT = Path(__file__).with_name("anonymize-audit-evidence.py") +SPEC = importlib.util.spec_from_file_location("anonymize_audit_evidence", SCRIPT) +assert SPEC is not None and SPEC.loader is not None +MODULE = importlib.util.module_from_spec(SPEC) +SPEC.loader.exec_module(MODULE) + + +class AnonymizeTests(unittest.TestCase): + def test_replaces_mac_and_preserves_other_values(self) -> None: + source = "MAC=52:54:00:73:b0:78 IP=192.168.122.54" + result = MODULE.anonymize(source) + self.assertEqual(result, "MAC= IP=192.168.122.54") + + def test_link_local_prefix_is_preserved_when_present(self) -> None: + self.assertEqual( + MODULE.anonymize("fe80::5054:ff:fe73:b078/64"), + "fe80::[ANONYMIZED_INTERFACE_ID]/64", + ) + + def test_link_local_without_prefix_does_not_gain_one(self) -> None: + self.assertEqual( + MODULE.anonymize("fe80::5054:ff:fe73:b078"), + "fe80::[ANONYMIZED_INTERFACE_ID]", + ) + + def test_uuid_fields_are_replaced(self) -> None: + source = ( + "Machine ID: 0123456789abcdef0123456789abcdef\n" + "Boot ID: 01234567-89ab-cdef-0123-456789abcdef\n" + "Product UUID: 01234567-89ab-cdef-0123-456789abcdef\n" + "Invocation: 0123456789abcdef0123456789abcdef" + ) + result = MODULE.anonymize(source) + self.assertIn("Machine ID: ", result) + self.assertIn("Boot ID: ", result) + self.assertIn("Product UUID: ", result) + self.assertIn("Invocation: ", result) + + def test_cli_writes_separate_copy_and_preserves_original(self) -> None: + with tempfile.TemporaryDirectory() as temporary: + root = Path(temporary) + source = root / "source" + destination = root / "destination" + source.mkdir() + original = source / "capture.txt" + original.write_text("52:54:00:73:b0:78\n", encoding="utf-8") + + result = subprocess.run( + [sys.executable, str(SCRIPT), str(source), str(destination)], + check=False, + capture_output=True, + text=True, + ) + self.assertEqual(result.returncode, 0, result.stderr) + self.assertEqual(original.read_text(encoding="utf-8"), "52:54:00:73:b0:78\n") + self.assertEqual( + (destination / "capture.txt").read_text(encoding="utf-8"), + "\n", + ) + + def test_cli_rejects_overlapping_directories(self) -> None: + with tempfile.TemporaryDirectory() as temporary: + root = Path(temporary) + source = root / "source" + source.mkdir() + nested = source / "nested" + result = subprocess.run( + [sys.executable, str(SCRIPT), str(source), str(nested)], + check=False, + capture_output=True, + text=True, + ) + self.assertNotEqual(result.returncode, 0) + self.assertIn("must not overlap", result.stderr) + + +if __name__ == "__main__": + unittest.main() From df4f45f67b32c29dae8fff8322fe508f8a89a40a Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:51:23 +0330 Subject: [PATCH 19/30] Run Python anonymizer regression tests in CI --- .github/workflows/shell-syntax.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/shell-syntax.yml b/.github/workflows/shell-syntax.yml index 2c8636e..d9cdafc 100644 --- a/.github/workflows/shell-syntax.yml +++ b/.github/workflows/shell-syntax.yml @@ -21,6 +21,24 @@ jobs: run: | set -Eeuo pipefail while IFS= read -r -d '' script; do - printf 'Checking %s\n' "$script" + printf 'Checking %s\\n' "$script" bash -n "$script" done < <(find scripts -type f -name '*.sh' -print0) + + python-validation: + name: Python syntax and anonymizer tests + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Validate Python syntax + run: python -m py_compile scripts/collect-evidence/anonymize-audit-evidence.py + + - name: Test anonymizer + run: python -m unittest discover -s scripts/collect-evidence -p 'test_*.py' -v From 54326b169044410317908102dd479b1b56798a45 Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:51:40 +0330 Subject: [PATCH 20/30] Fix shell validation log formatting From f0fff6745ebda3a6108998033d695ddc8dfb9933 Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:52:57 +0330 Subject: [PATCH 21/30] Test anonymizer destination path overlap protection --- .../test_anonymize_audit_evidence.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/collect-evidence/test_anonymize_audit_evidence.py b/scripts/collect-evidence/test_anonymize_audit_evidence.py index 52d3a1e..955fdd9 100644 --- a/scripts/collect-evidence/test_anonymize_audit_evidence.py +++ b/scripts/collect-evidence/test_anonymize_audit_evidence.py @@ -85,6 +85,21 @@ def test_cli_rejects_overlapping_directories(self) -> None: self.assertNotEqual(result.returncode, 0) self.assertIn("must not overlap", result.stderr) + def test_cli_rejects_destination_that_contains_source(self) -> None: + with tempfile.TemporaryDirectory() as temporary: + root = Path(temporary) + source = root / "parent" / "source" + source.mkdir(parents=True) + destination = source.parent + result = subprocess.run( + [sys.executable, str(SCRIPT), str(source), str(destination)], + check=False, + capture_output=True, + text=True, + ) + self.assertNotEqual(result.returncode, 0) + self.assertIn("must not overlap", result.stderr) + if __name__ == "__main__": unittest.main() From fd4981488e7fd89d73ce665213a3a43b70f11c73 Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:58:51 +0330 Subject: [PATCH 22/30] Avoid writing an invalid checksum manifest when sha256sum is unavailable --- .../collect-evidence/collect-network-security-evidence.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/collect-evidence/collect-network-security-evidence.sh b/scripts/collect-evidence/collect-network-security-evidence.sh index 9be4f10..e9c4bc9 100644 --- a/scripts/collect-evidence/collect-network-security-evidence.sh +++ b/scripts/collect-evidence/collect-network-security-evidence.sh @@ -68,9 +68,12 @@ capture 30-system-users-shells.txt awk -F: '$7 !~ /(false|nologin)$/ {print $1 " } > "$OUTPUT_DIR/collection-metadata.txt" if command -v sha256sum >/dev/null 2>&1; then - (cd -- "$OUTPUT_DIR" && sha256sum -- *.txt > SHA256SUMS) + if ! (cd -- "$OUTPUT_DIR" && sha256sum -- *.txt > SHA256SUMS); then + rm -f -- "$OUTPUT_DIR/SHA256SUMS" + printf 'Warning: checksum generation failed.\n' >&2 + fi else - printf 'sha256sum unavailable; checksums not generated.\n' > "$OUTPUT_DIR/SHA256SUMS" + printf 'Warning: sha256sum unavailable; no checksum manifest generated.\n' >&2 fi printf 'Raw evidence written to: %s\n' "$OUTPUT_DIR" From 3c087afb7e7c4afcc2f35cdfe94340c108ff9ff3 Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:58:54 +0330 Subject: [PATCH 23/30] Clarify optional checksum manifest behavior --- scripts/collect-evidence/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/collect-evidence/README.md b/scripts/collect-evidence/README.md index 087e60b..a714a3e 100644 --- a/scripts/collect-evidence/README.md +++ b/scripts/collect-evidence/README.md @@ -19,7 +19,7 @@ Run the collector with Bash and an optional output directory: bash scripts/collect-evidence/collect-network-security-evidence.sh /path/to/raw-evidence ``` -The collector writes raw output, collection metadata, and a SHA256 checksum manifest. It does not change system configuration. Raw captures may contain machine-specific identifiers; create a separate anonymized copy before publishing: +The collector writes raw output and collection metadata. When `sha256sum` is available, it also writes a SHA-256 checksum manifest; otherwise it prints a warning and does not create a misleading manifest. It does not change system configuration. Raw captures may contain machine-specific identifiers; create a separate anonymized copy before publishing: ```bash python3 scripts/collect-evidence/anonymize-audit-evidence.py /path/to/raw-evidence /path/to/anonymized-evidence From d09a7438db477aa12792890de5ba28009c9ca11d Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:59:03 +0330 Subject: [PATCH 24/30] Add collector smoke test to audit tooling CI --- .github/workflows/shell-syntax.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/shell-syntax.yml b/.github/workflows/shell-syntax.yml index d9cdafc..53cef34 100644 --- a/.github/workflows/shell-syntax.yml +++ b/.github/workflows/shell-syntax.yml @@ -1,4 +1,4 @@ -name: Validate shell scripts +name: Validate audit tooling on: push: @@ -21,10 +21,23 @@ jobs: run: | set -Eeuo pipefail while IFS= read -r -d '' script; do - printf 'Checking %s\\n' "$script" + printf 'Checking %s\n' "$script" bash -n "$script" done < <(find scripts -type f -name '*.sh' -print0) + - name: Smoke-test network evidence collector + shell: bash + run: | + set -Eeuo pipefail + temporary_directory="$(mktemp -d)" + trap 'rm -rf -- "$temporary_directory"' EXIT + output_directory="$temporary_directory/evidence" + bash scripts/collect-evidence/collect-network-security-evidence.sh "$output_directory" + text_file_count="$(find "$output_directory" -maxdepth 1 -type f -name '*.txt' | wc -l)" + test "$text_file_count" -eq 31 + test -f "$output_directory/SHA256SUMS" + (cd "$output_directory" && sha256sum --check SHA256SUMS) + python-validation: name: Python syntax and anonymizer tests runs-on: ubuntu-latest From adc7c8029886e7bee130c087a04b7c7fc8870b67 Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:59:24 +0330 Subject: [PATCH 25/30] Preserve standard loopback MAC in anonymized evidence --- scripts/collect-evidence/anonymize-audit-evidence.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/collect-evidence/anonymize-audit-evidence.py b/scripts/collect-evidence/anonymize-audit-evidence.py index 0f3451a..a270112 100644 --- a/scripts/collect-evidence/anonymize-audit-evidence.py +++ b/scripts/collect-evidence/anonymize-audit-evidence.py @@ -16,7 +16,12 @@ def anonymize(text: str) -> str: - text = MAC_RE.sub("", text) + text = MAC_RE.sub( + lambda match: match.group(0) + if match.group(0) == "00:00:00:00:00:00" + else "", + text, + ) text = IPV6_LL_RE.sub( lambda match: "fe80::[ANONYMIZED_INTERFACE_ID]" + (match.group("prefix") or ""), text, From 6d896c66ac744a0394b6349e7715c50e643ac82e Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:59:27 +0330 Subject: [PATCH 26/30] Test preservation of standard loopback MAC --- scripts/collect-evidence/test_anonymize_audit_evidence.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/collect-evidence/test_anonymize_audit_evidence.py b/scripts/collect-evidence/test_anonymize_audit_evidence.py index 955fdd9..e81d71f 100644 --- a/scripts/collect-evidence/test_anonymize_audit_evidence.py +++ b/scripts/collect-evidence/test_anonymize_audit_evidence.py @@ -23,6 +23,12 @@ def test_replaces_mac_and_preserves_other_values(self) -> None: result = MODULE.anonymize(source) self.assertEqual(result, "MAC= IP=192.168.122.54") + def test_zero_loopback_mac_is_preserved(self) -> None: + self.assertEqual( + MODULE.anonymize("lo 00:00:00:00:00:00"), + "lo 00:00:00:00:00:00", + ) + def test_link_local_prefix_is_preserved_when_present(self) -> None: self.assertEqual( MODULE.anonymize("fe80::5054:ff:fe73:b078/64"), From b4c59f9adf0d98ee14e60d49394709a9faf75911 Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 17:59:29 +0330 Subject: [PATCH 27/30] Clarify loopback MAC anonymization policy --- screenshots/09-networking-and-system-audit/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screenshots/09-networking-and-system-audit/README.md b/screenshots/09-networking-and-system-audit/README.md index 638a9b5..d1da9aa 100644 --- a/screenshots/09-networking-and-system-audit/README.md +++ b/screenshots/09-networking-and-system-audit/README.md @@ -44,7 +44,7 @@ This directory contains 30 individual text captures from the Phase 2 and Phase 3 The published captures retain technical lines, command output, errors, versions, configuration values, and service names. Identifying values are replaced consistently: -- MAC addresses: `` +- Hardware MAC addresses: `` (the standard all-zero loopback value is retained) - MAC-derived IPv6 link-local interface identifier: `fe80::[ANONYMIZED_INTERFACE_ID]/64` - Machine ID: `` - Boot ID: `` From 8040d9d54d979c5b5334ca4c2bf5ebbd75f98a49 Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 18:00:12 +0330 Subject: [PATCH 28/30] Clarify networking and security audit stage --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f4882fa..f1e9020 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ See [the build reference](references/BUILD-REFERENCE.md) and [build environment | [06 — Kernel and bootloader](screenshots/06-kernel-and-bootloader/README.md) | Kernel configuration, modules, boot files and GRUB | | [07 — Testing and validation](screenshots/07-testing-and-validation/README.md) | Existing test-log inventory and validation limitations | | [08 — Final system](screenshots/08-final-system/README.md) | GRUB menu, first boot and final system state | -| [09 — Networking and system audit](screenshots/09-networking-and-system-audit/README.md) | 30 anonymized network/security command captures and audit report | +| [09 — Networking and security baseline audit](screenshots/09-networking-and-system-audit/README.md) | 30 anonymized network/security command captures and audit report | The `screenshots/` directory retains its historical name, but includes text captures, scripts and archives as well as images. From 26c4b5367a8d5d0f3e976403cf9f4bdc4daa96a5 Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 18:00:14 +0330 Subject: [PATCH 29/30] Clarify network and security evidence index --- screenshots/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screenshots/README.md b/screenshots/README.md index e0b811f..a8c781c 100644 --- a/screenshots/README.md +++ b/screenshots/README.md @@ -14,7 +14,7 @@ This directory contains visual and technical evidence for **Linux From Scratch 1 | `06-kernel-and-bootloader/` | Kernel configuration, modules, boot files and GRUB | | `07-testing-and-validation/` | Existing test-log inventory and validation archive | | `08-final-system/` | GRUB menu, first boot and final system state | -| `09-networking-and-system-audit/` | 30 individual network/security command captures, anonymized identifiers and audit documentation | +| `09-networking-and-system-audit/` | 30 individual networking/security command captures, anonymized identifiers and audit documentation | ## Build reference From 36b9b9c8f0b5e3d0f15c7fa8ea03d555c517ed3d Mon Sep 17 00:00:00 2001 From: alirezamasoomi Date: Tue, 17 Nov 2026 18:00:16 +0330 Subject: [PATCH 30/30] Link audit report directly to evidence and collector --- docs/networking-and-security-audit.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/networking-and-security-audit.md b/docs/networking-and-security-audit.md index 098d66c..5147ace 100644 --- a/docs/networking-and-security-audit.md +++ b/docs/networking-and-security-audit.md @@ -212,6 +212,6 @@ The evidence supports specific statements about the captured interfaces, resolve ## 15. Evidence and reproducibility -The accompanying `screenshots/09-networking-and-system-audit/` directory contains the 30 individual Phase 2 and Phase 3 text captures. Identifying MAC/UUID values and the MAC-derived IPv6 link-local interface identifier are replaced with explicit placeholders; technical configuration values and command output are retained. +The accompanying [evidence directory](../screenshots/09-networking-and-system-audit/README.md) contains the 30 individual Phase 2 and Phase 3 text captures. Identifying MAC/UUID values and the MAC-derived IPv6 link-local interface identifier are replaced with explicit placeholders; technical configuration values and command output are retained. -The read-only collector is available at `scripts/collect-evidence/collect-network-security-evidence.sh`. It writes fresh raw output to a separate directory. Review and anonymize that output before publishing; do not overwrite the existing evidence. +The [read-only collector](../scripts/collect-evidence/collect-network-security-evidence.sh) is available in the repository. It writes fresh raw output to a separate directory. Review and anonymize that output before publishing; do not overwrite the existing evidence.