Files
nuclei-templates/code/linux/audit/dns-server.yaml

42 lines
1.3 KiB
YAML
Raw Normal View History

2025-08-19 18:07:27 +05:30
id: dns-server
2025-06-16 09:31:36 -07:00
info:
name: Ensure DNS Server Service is Not Installed
author: Th3l0newolf
2025-08-19 16:26:09 +05:30
severity: info
2025-06-16 09:31:36 -07:00
description: |
2025-08-19 16:26:09 +05:30
The bind9 package provides a DNS server for name resolution services.Running a DNS server on systems not designated for that purpose may expose them to unnecessary risks.
2025-06-16 09:31:36 -07:00
remediation: |
2025-08-19 16:26:09 +05:30
- Ensure the `bind9` package is not installed unless explicitly required.
- To remove the package, run: sudo apt-get remove bind9 -y
2025-06-16 09:31:36 -07:00
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
2025-08-19 16:26:09 +05:30
tags: cis,cisecurity,audit,linux,ubuntu
2025-06-16 09:31:36 -07:00
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
if dpkg-query -s bind9 &>/dev/null; then
2025-08-19 16:26:09 +05:30
echo "[dns-server-check:Policy-Fail] [bind9 is installed] [CIS_FAIL]"
2025-06-16 09:31:36 -07:00
else
2025-08-19 16:26:09 +05:30
echo "[dns-server-check:Policy-Pass] [bind9 is not installed] [CIS_PASS]"
2025-06-16 09:31:36 -07:00
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
2025-08-21 12:45:03 +00:00
- "Policy-Fail"
# digest: 4a0a0047304502206d48495de045d051c8438d6fbc89c857d9c8a4461fa0444c1d83fabdc7ee308e022100c1790b180db59ed93aa54ebb4bd1c3eafbdd782d8bd40ecf6bc21c4c62f3c0ce:922c64590222798bb761d5b6d8e72950