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-28 23:41:32 +05:30
tags : cis,local,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"
2025-08-29 10:06:03 +00:00
# digest: 490a0046304402207ee6e7e7e9c66d8b9fbe1f829c03f27090298ed7f861d88bc570582c65810e1b022037d531ff744abf9677b2d15b3de6cfd80dc77b99613de661fe80dd7b6d91edc6:922c64590222798bb761d5b6d8e72950