Debian GNU/Linux · Accounts & authentication

Replace default secrets right after installation

When it fails: Secrets set by the installer, an image or a vendor are still in use. Default passwords, keys and certificates are known to anyone who has the same image or documentation.

CB-DEB-AUTH-025highactivemanualprofile server-hardenedprofile desktop-hardened

Description

After installation or cloning from an image, every secret that is the same on other systems must be replaced: passwords set by the installer or a template, SSH host keys copied with the image, default application passwords, and self-signed certificates shipped by packages.

Rationale

Systems built from the same image share their secrets. An attacker who extracts one of them, or reads the vendor documentation, can reuse it everywhere the image was deployed.

Impact

Regenerating SSH host keys changes their fingerprints: clients must accept the new ones.

Audit

  1. Compare the SSH host key fingerprints (ssh-keygen -lf /etc/ssh/ssh_host_*_key.pub) with other systems built from the same image. They must differ.
  2. Check that the passwords of the accounts created by the installer or the image were changed.
  3. List the applications with default credentials (databases, web consoles) and confirm they were changed.

Remediation

  1. Regenerate SSH host keys: rm /etc/ssh/ssh_host_* then dpkg-reconfigure openssh-server.
  2. Set new passwords for the accounts created by the image, or lock them.
  3. Change application default passwords and replace snakeoil certificates (make-ssl-cert generate-default-snakeoil --force-overwrite, or real certificates).

References

Mappings

How this control relates to the other framework's: equivalent, stricter, looser, partial or related.

Threats mitigated

People and lifecycle

Authors
Introduced inv0.1.0
Created, updated2026-10-18, 2026-10-18
Translationsfr