id: configure-session-timeout

info:
  name: PfSense Configure Sessions Timeout Not Set - Detect
  author: pussycat0x
  severity: info
  description: |
    Configure sessions timeout is recommended to be enabled. An indefinite or even long session timeout window can increase the risk of an attacker abusing abandoned sessions and potentially being able to obtain sensitive information, modify data, and/or execute unauthorized operations.
  reference:
    - https://docs.netgate.com/pfsense/en/latest/config/advanced-admin.html
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cvss-score: 0
    cwe-id: CWE-200
  metadata:
    verified: true
  tags: firewall,config,audit,pfsense,file

file:
  - extensions:
      - xml

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "<session_timeout>"
          - "<session_timeout>0</session_timeout>"
        condition: or
        negative: true

      - type: word
        words:
          - "<pfsense>"
          - "<webgui>"
          - "<system>"
        condition: and

# Enhanced by md on 2023/05/04
# digest: 4a0a0047304502210081158dc749319ed209806e13514572edaa197fe08ef3f6968671b9adbb95b07902200832e19db8023af266ab125234ad3c4b14b3a90f269fe9a955340a3ae702a118:922c64590222798bb761d5b6d8e72950