mirror of
https://github.com/projectdiscovery/nuclei-templates.git
synced 2026-02-14 06:33:24 +08:00
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
id: syslog-rsyslog-permission
|
|
|
|
info:
|
|
name: /etc/syslog and /etc/rsyslog.conf Permission Check
|
|
author: songyaeji
|
|
severity: high
|
|
description: |
|
|
The /etc/syslog.conf or /etc/rsyslog.conf file was not owned by root or had insecure permissions,allowing attackers to manipulate logging settings to evade detection.
|
|
reference:
|
|
- https://isms.kisa.or.kr
|
|
tags: linux,kisa,audit,compliance
|
|
|
|
self-contained: true
|
|
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
stat -c "%U %G %a" /etc/rsyslog.conf 2>/dev/null || echo "not-found"
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
stat -c "%U %G %a" /etc/syslog.conf 2>/dev/null || echo "not-found"
|
|
|
|
matchers:
|
|
- type: regex
|
|
name: rsyslog
|
|
part: code_1_response
|
|
regex:
|
|
- '^root\s+root\s+(600|644)$'
|
|
|
|
- type: regex
|
|
name: syslog
|
|
part: code_2_response
|
|
regex:
|
|
- '^root\s+root\s+(600|644)$'
|
|
# digest: 4a0a00473045022024f2adf38030f0e32b88b5200ba2038e21bac175802ebcd514181a6e1d15a6c1022100ac0462966d11b0695f984f896752d536a3b71ba145edbe67fb350a9043141c15:922c64590222798bb761d5b6d8e72950 |