Security Configuration Assessment

The wazuh-states-sca index stores the results of the Security Configuration Assessment (SCA) checks on each endpoint, with the policy each check belongs to.

The following example shows a document from the wazuh-states-sca index. It records the result of a CIS benchmark check on the Ubuntu endpoint:

{
  "_index" : "wazuh-states-sca",
  "_id" : "wazuh_003_4ac934f2a35158bf04255a96435edf246798aedf",
  "_score" : 1.0,
  "_source" : {
    "checksum" : {
      "hash" : {
        "sha1" : "fed019ea7dfb3d744a4ac23cef96c3f88dc6ff92"
      }
    },
    "wazuh" : {
      "cluster" : {
        "name" : "wazuh"
      },
      "agent" : {
        "host" : {
          "hostname" : "ubuntu-QEMU-Virtual-Machine",
          "os" : {
            "name" : "Ubuntu",
            "type" : "linux",
            "version" : "24.04.4 LTS (Noble Numbat)",
            "platform" : "ubuntu"
          },
          "architecture" : "aarch64"
        },
        "name" : "Ubuntu",
        "groups" : [
          "default"
        ],
        "id" : "003",
        "version" : "v5.0.0"
      }
    },
    "check" : {
      "result" : "Passed",
      "remediation" : "Run the following script to unload and disable the cramfs module: - IF - the cramfs kernel module is available in ANY installed kernel: - Create a file ending in .conf with install cramfs /bin/false in the /etc/modprobe.d/ directory - Create a file ending in .conf with blacklist cramfs in the /etc/modprobe.d/ directory - Run modprobe -r cramfs 2>/dev/null; rmmod cramfs 2>/dev/null to remove cramfs from the kernel - IF - the cramfs kernel module is not available on the system, or pre-compiled into the kernel, no remediation is necessary #!/usr/bin/env bash.",
      "condition" : "any",
      "compliance" : {
        "iso_27001" : [
          "A.5.37",
          "A.8.32",
          "A.8.25"
        ],
        "hipaa" : [
          "164.308.a.1",
          "164.308.a.8"
        ],
        "pci_dss" : [
          "1.2.5",
          "2.2.4",
          "6.4.1"
        ],
        "tsc" : [
          "CC6.3",
          "CC6.6",
          "CC8.1",
          "CC5.1",
          "CC5.2",
          "CC5.3"
        ],
        "nis2" : [
          "21.2.e",
          "21.2.a"
        ],
        "nist_800_171" : [
          "3.4.7",
          "3.4.8",
          "3.13.6"
        ],
        "fedramp" : [
          "CM-2",
          "CM-3",
          "CM-6",
          "CM-7"
        ],
        "nist_800_53" : [
          "CM-2",
          "CM-3",
          "CM-6",
          "CM-7"
        ],
        "cmmc" : [
          "CM.L2-3.4.7",
          "CM.L2-3.4.8",
          "SC.L2-3.13.6"
        ],
        "gdpr" : [
          "IV_32.1.a",
          "IV_32.1.b",
          "IV_32.1.c",
          "IV_32.1.d",
          "IV_32.2",
          "IV_32.3",
          "IV_32.4"
        ]
      },
      "name" : "Ensure mounting of cramfs filesystems is disabled.",
      "description" : "The cramfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems. A cramfs image can be used without having to first decompress the image.",
      "mitre" : {
        "technique" : {
          "name" : [
            "Masquerading",
            "Hide Artifacts"
          ],
          "id" : [
            "T1036",
            "T1564"
          ]
        },
        "tactic" : {
          "name" : [
            "Stealth"
          ],
          "id" : [
            "TA0005"
          ]
        }
      },
      "rules" : [
        "c:modprobe -n -v cramfs -> r:install /bin/false|install /bin/true|Module cramfs not found",
        "not c:lsmod -> r:cramfs",
        "d:/etc/modprobe.d/ -> r:.*\\.conf -> r:^blacklist\\s+cramfs"
      ],
      "id" : "35500",
      "rationale" : "Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it."
    },
    "state" : {
      "document_version" : 298,
      "modified_at" : "2026-10-29T08:02:08.403Z"
    },
    "policy" : {
      "file" : "cis_ubuntu24-04.yml",
      "references" : [
        "https://www.cisecurity.org/cis-benchmarks/"
      ],
      "name" : "CIS Ubuntu Linux 24.04 LTS Benchmark v1.0.0.",
      "description" : "This document provides prescriptive guidance for establishing a secure configuration posture for Ubuntu Linux 24.04 LTS based on CIS benchmark for Ubuntu Linux 24.04 LTS.",
      "id" : "cis_ubuntu24-04"
    }
  }
}

Example: Detect an SCA check that starts failing, then see where it fails

The Wazuh agent sends an SCA event when the result of a check changes. check.result is in that event and in the wazuh-states-sca index. A rule flags checks that change to Failed, then a query shows where the check fails now.

Create the rule in Ruleset management > Detection > Rules. The rule's logsource.product must match the title of the integration you create it in. The events come from the built-in wazuh-sca integration, so create the rule in a custom integration titled wazuh-sca. Then promote it to the custom space and add it to a custom detector in Ruleset management > Detection > Detectors. In the query, replace <WAZUH_INDEXER_IP_ADDRESS>, <USERNAME>, and <PASSWORD> with your values. The highlighted lines show where check.result is used and where it appears in the output.

1. Rule on SCA events

logsource:
  product: wazuh-sca
level: medium
status: experimental
enabled: true
detection:
  condition: selection
  selection:
    event.dataset: wazuh.sca
    check.result: Failed
metadata:
  title: SCA check started failing
  author: Security Team
  description: Detects an SCA check whose result changed to Failed.

2. Finding (excerpt)

{
  "event": { "dataset": "wazuh.sca", "action": "policy-check-evaluated", "outcome": "failure" },
  "check": {
    "id": "35608",
    "name": "Ensure ip forwarding is disabled.",
    "result": "Failed"
  },
  "wazuh": {
    "agent": { "name": "Ubuntu" },
    "rule": { "title": "SCA check started failing", "level": "medium" }
  }
}

3. Query on the state index

curl -k -u <USERNAME>:<PASSWORD> -X GET "https://<WAZUH_INDEXER_IP_ADDRESS>:9200/wazuh-states-sca/_search?pretty" \
  -H 'Content-Type: application/json' -d '
{
  "query": { "bool": { "filter": [
    { "term": { "check.id": "35608" } },
    { "term": { "check.result": "Failed" } }
  ] } },
  "_source": [ "wazuh.agent.name", "policy.name", "check.id", "check.name", "check.result" ]
}'

4. Result (excerpt)

"hits": [
  {
    "_index": "wazuh-states-sca",
    "_source": {
      "wazuh": { "agent": { "name": "Ubuntu" } },
      "policy": { "name": "CIS Ubuntu Linux 24.04 LTS Benchmark v1.0.0." },
      "check": {
        "id": "35608",
        "name": "Ensure ip forwarding is disabled.",
        "result": "Failed"
      }
    }
  }
]

Note

  • check.result values start with a capital letter, such as Passed and Failed.

Fields

Field

Type

Level

Normalization

Indexed

Example

Description

message

keyword

core

true

Hello World

Log message optimized for viewing in a log viewer.

check.compliance.cmmc

keyword

custom

array

true

["AC.1.001", "AU.L2-3.3.1"]

CMMC requirements.

check.compliance.fedramp

keyword

custom

array

true

["AC-2", "SC-7"]

FedRAMP requirements.

check.compliance.gdpr

keyword

custom

array

true

["Art. 32", "Art. 25"]

GDPR requirements.

check.compliance.hipaa

keyword

custom

array

true

["164.312(a)(1)", "164.308(a)(5)(ii)(C)"]

HIPAA requirements.

check.compliance.iso_27001

keyword

custom

array

true

["A.9.4.1", "A.8.8"]

ISO 27001 requirements.

check.compliance.nis2

keyword

custom

array

true

["Art. 21", "Art. 23"]

NIS2 requirements.

check.compliance.nist_800_171

keyword

custom

array

true

["3.1.1", "3.3.1"]

NIST 800-171 requirements.

check.compliance.nist_800_53

keyword

custom

array

true

["AC-3", "AU-2"]

NIST 800-53 requirements.

check.compliance.pci_dss

keyword

custom

array

true

["2.2.1", "6.3.3"]

PCI DSS requirements.

check.compliance.tsc

keyword

custom

array

true

["CC6.1", "CC7.1"]

TSC requirements.

check.condition

keyword

custom

true

all

Relationship between the rules.

check.description

keyword

custom

true

"The password history setting determines the number of unique new passwords a user must use before an old password can be reused."

Extended description of the check.

check.id

keyword

custom

true

26000

The ID of the SCA policy check.

check.mitre.subtechnique

object

custom

true

MITRE ATT&CK subtechniques.

check.mitre.subtechnique.id

keyword

custom

array

true

["T1059.001", "T1078.001"]

MITRE ATT&CK subtechnique identifiers.

check.mitre.subtechnique.name

keyword

custom

array

true

["Command and Scripting Interpreter: PowerShell", "Valid Accounts: Default Accounts"]

MITRE ATT&CK subtechnique names.

check.mitre.tactic

object

custom

true

MITRE ATT&CK tactics.

check.mitre.tactic.id

keyword

custom

array

true

["TA0002", "TA0005"]

MITRE ATT&CK tactic identifiers.

check.mitre.tactic.name

keyword

custom

array

true

["Execution", "Defense Evasion"]

MITRE ATT&CK tactic names.

check.mitre.technique

object

custom

true

MITRE ATT&CK techniques.

check.mitre.technique.id

keyword

custom

array

true

["T1059", "T1562"]

MITRE ATT&CK technique identifiers.

check.mitre.technique.name

keyword

custom

array

true

["Command and Scripting Interpreter", "Impair Defenses"]

MITRE ATT&CK technique names.

check.name

keyword

custom

true

Ensure 'Enforce password history' is set to '24 or more password(s)'.

The name of the SCA policy check.

check.rationale

keyword

custom

true

"The longer a user uses the same password, the more likely it is that the password will be compromised."

The reason for the check. Why it is important.

check.reason

keyword

custom

true

"The password history setting is not set to 24 or more password(s)."

Reason for the check result.

check.references

keyword

custom

array

true

["https://workbench.cisecurity.org"]

References for the check.

check.remediation

keyword

custom

true

"To establish the recommended configuration, set the following registry value to 24 or more password(s):"

Actions to take to remediate the check.

check.result

keyword

custom

true

failed

Result of the check.

check.rules

keyword

custom

array

true

"[\"c:net.exe accounts -> n:Maximum password age \(days\):\s+(\d+) compare > 0\"," > "\"c:net.exe accounts -> n:Length of password history maintained:\s+(\d+) compare >= 24\"]"

Rules to be evaluated.

checksum.hash.sha1

keyword

custom

true

SHA1 hash used as checksum of the data collected by the agent.

policy.description

keyword

custom

true

"The CIS Microsoft Windows 11 Enterprise Benchmark v1.0.0 is a comprehensive security configuration guide that provides prescriptive guidance for establishing a secure baseline configuration for Microsoft Windows 11 Enterprise."

Extended description of the policy.

policy.file

keyword

custom

true

cis_win11_enterprise.yml

The file name of the SCA policy.

policy.id

keyword

custom

true

cis_win11_enterprise_21H2

The ID of the SCA policy.

policy.name

keyword

custom

true

CIS Microsoft Windows 11 Enterprise Benchmark v1.0.0

The name of the SCA policy.

policy.references

keyword

custom

array

true

["https://www.cisecurity.org/cis-benchmarks/"]

References for the policy.

state.document_version

integer

custom

true

Version of the document.

state.modified_at

date

custom

true

Date/time when the state was last modified.

wazuh.agent.groups

keyword

custom

array

true

["group1", "group2"]

List of groups the agent belongs to.

wazuh.agent.host.architecture

keyword

core

true

x86_64

Operating system architecture.

wazuh.agent.host.hostname

keyword

core

true

Hostname of the host.

wazuh.agent.host.ip

ip

core

array

true

Host ip addresses.

wazuh.agent.host.os.name

keyword

extended

true

Mac OS X

Operating system name, without the version.

wazuh.agent.host.os.platform

keyword

extended

true

darwin

Operating system platform (such centos, ubuntu, windows).

wazuh.agent.host.os.type

keyword

extended

true

macos

Which commercial OS family (one of: linux, macos, unix, windows, ios or android).

wazuh.agent.host.os.version

keyword

extended

true

10.14.1

Operating system version as a raw string.

wazuh.agent.id

keyword

core

true

8a4f500d

Unique identifier of this agent.

wazuh.agent.name

keyword

core

true

foo

Custom name of the agent.

wazuh.agent.version

keyword

core

true

6.0.0-rc2

Version of the agent.

wazuh.cluster.name

keyword

custom

true

Wazuh cluster name.

wazuh.cluster.node

keyword

custom

true

Wazuh cluster node name.

wazuh.schema.version

keyword

custom

true

Wazuh schema version.