Skip to content

docs+ui: disambiguate the two attack-surface controls - #31

Merged
neohiro merged 1 commit into
mainfrom
docs/disambiguate-asr
Oct 10, 2026
Merged

neohiro merged 1 commit into
mainfrom
docs/disambiguate-asr

Conversation

@neohiro

@neohiro neohiro commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Answering the question of whether OptimizeLinuxASR.sh and the built-in attack_surface step should be merged: they should not be merged, because they do not actually overlap. They were only labelled as if they did.

What each one actually does

OptimizeLinuxASR.sh (195 lines) attack_surface step
Mechanism systemctl stop/disable/mask per daemon writes config files
Touches services yes (~30 daemons) no
Touches config files none /etc/modprobe.d, sshd_config, login.defs, limits.conf
Interaction interactive, per-category idempotent, backup + rollback-logged

OptimizeLinuxASR.sh removes running software (rpcbind, samba, ftp, telnet, snapd...). The step hardens the kernel and config surface. Neither substitutes for the other.

Merging them would mean one script that both mass-disables daemons and rewrites sshd/login config. Those are different risk models with different rollback paths, and the config half would lose the per-file backup and rollback-log treatment it currently gets.

What this PR does instead

  • Renames the two UI surfaces to ASR: disable unneeded services and ASR: kernel + config hardening, so they stop reading as duplicates.
  • Fixes a stale preview string: the services step was described as "network/disk tweaks", which it does not do.
  • Main menu option 9 now points at --step attack_surface for kernel/config hardening, making both paths discoverable from one screen.
  • README gets a table documenting the split, plus a recorded ordering interaction: the squashfs carve-out keys off a snap runtime being present, so disabling snapd via ASR first means a later attack_surface run blacklists squashfs — which breaks live media and squashfs images.

Validation: bash -n clean; all 9 attack_surface / harden_sysctl invariants re-verified after the edits.

OptimizeLinuxASR.sh and the built-in attack_surface step were both presented
as 'Attack Surface Reduction', which reads as duplicated functionality. They
are not: the script stops/masks daemons and writes no config; the step writes
kernel/config hardening and stops no service.

- Renamed UI surfaces to 'ASR: disable unneeded services' and
  'ASR: kernel + config hardening', and the stale 'network/disk tweaks'
  preview now says what the script actually does.
- Main menu option 9 now points at the built-in step for kernel/config
  hardening, so the two paths are discoverable from one screen.
- README documents the split in a table and records the squashfs/snap
  ordering interaction: disabling snapd first means a later attack_surface
  run blacklists squashfs, which breaks live media and squashfs images.
@neohiro
neohiro merged commit 8c598b4 into main Oct 10, 2026
8 checks passed
@neohiro
neohiro deleted the docs/disambiguate-asr branch October 10, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant