Files
nuclei-templates/code/linux/audit/nfs-daemon-service.yaml
2025-08-23 11:50:45 +00:00

39 lines
1.3 KiB
YAML

id: nfs-daemon-service
info:
name: NFS Service Daemon Should Be Disabled
author: songyaeji
severity: high
description: |
Assessed the status of the NFS service daemon. A running NFS service may expose the system to unauthorized access, modification, or deletion of files; it is recommended to disable the daemon when not explicitly required.
reference:
- https://isms.kisa.or.kr
tags: linux,audit,kisa,compliance
self-contained: true
code:
- engine:
- sh
- bash
source: |
if command -v systemctl >/dev/null 2>&1; then
if systemctl is-active --quiet nfs-server; then
echo "[VULNERABLE] NFS service is active (systemd nfs-server is running)"
else
echo "[SAFE] NFS service is not running"
fi
else
if ps -ef | grep -v grep | grep -q nfsd; then
echo "[VULNERABLE] NFS service is active (nfsd is running)"
else
echo "[SAFE] NFS service is not running"
fi
fi
matchers:
- type: word
part: response
words:
- "[VULNERABLE]"
# digest: 4a0a0047304502205412a9e50bd313fd5be5523feaa4af300bd19fa30e20e321daa8281991b70a690221008a1c4df44b72d2eddced36c66fde0a8968e66899322805ca6ea074aacf81d860:922c64590222798bb761d5b6d8e72950