id: avahi-daemon info: name: Ensure Avahi Daemon Service is Not Installed author: Th3l0newolf severity: info description: | The avahi-daemon package provides mDNS/DNS-SD service discovery on local networks.In secure environments, it should only be installed when explicitly required, as it may expose unnecessary services. remediation: | - Ensure the `avahi-daemon` package is not installed unless explicitly required. - To remove the package, run: sudo apt-get remove avahi-daemon -y reference: - https://www.cisecurity.org/benchmark/ubuntu_linux metadata: verified: true tags: cis,cisecurity,audit,linux,ubuntu self-contained: true code: - engine: - bash args: - "-c" - | if dpkg-query -s avahi-daemon &>/dev/null; then echo "[avahi-daemon-check:Policy-Fail] [avahi-daemon is installed] [CIS_FAIL]" else echo "[avahi-daemon-check:Policy-Pass] [avahi-daemon is not installed] [CIS_PASS]" fi matchers: - type: word name: policy-pass words: - "Policy-Pass" - type: word name: policy-fail words: - "Policy-Fail" # digest: 4a0a0047304502200aaa0b66af7933e8098d745a5d6abc8ed2e5a74478834da4f0378af30d55a4d8022100e47e49c55376010c0b756d61131b3406c3a78760bed4818fb87ab45ca65bea5e:922c64590222798bb761d5b6d8e72950