2025-08-19 18:07:27 +05:30
id : ldap-server
2025-06-16 09:31:36 -07:00
info :
name : Ensure LDAP 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 slapd package provides the OpenLDAP server, which manages directory and identity services. If not explicitly required, having this service installed unnecessarily increases the system’ s attack surface.
2025-06-16 09:31:36 -07:00
remediation : |
2025-08-19 16:26:09 +05:30
- Run : sudo apt-get remove slapd -y
- This removes the LDAP server package to reduce the system’ s attack surface.
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 slapd &>/dev/null; then
2025-08-19 16:26:09 +05:30
echo "[ldap-server-check:Policy-Fail] [slapd is installed] [CIS_FAIL]"
2025-06-16 09:31:36 -07:00
else
2025-08-19 16:26:09 +05:30
echo "[ldap-server-check:Policy-Pass] [slapd 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: 490a004630440220122e74bbeb14a7f14348cdb93d4bc91898942ebeaa6a6d6fcbc1fcf8e7bb2967022024b8a1ceedb0355d5ce74a15265b821b76289248f485859e9118b9e32a46c215:922c64590222798bb761d5b6d8e72950