mirror of
https://github.com/projectdiscovery/nuclei-templates.git
synced 2026-02-08 03:33:18 +08:00
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
id: ldap-server
|
||
|
||
info:
|
||
name: Ensure LDAP Server Service is Not Installed
|
||
author: Th3l0newolf
|
||
severity: info
|
||
description: |
|
||
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.
|
||
remediation: |
|
||
- Run: sudo apt-get remove slapd -y
|
||
- This removes the LDAP server package to reduce the system’s attack surface.
|
||
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 slapd &>/dev/null; then
|
||
echo "[ldap-server-check:Policy-Fail] [slapd is installed] [CIS_FAIL]"
|
||
else
|
||
echo "[ldap-server-check:Policy-Pass] [slapd is not installed] [CIS_PASS]"
|
||
fi
|
||
|
||
matchers:
|
||
- type: word
|
||
name: policy-pass
|
||
words:
|
||
- "Policy-Pass"
|
||
|
||
- type: word
|
||
name: policy-fail
|
||
words:
|
||
- "Policy-Fail" |