-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Dynamic Categories Retrieval #33252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic Categories Retrieval #33252
Conversation
bb0f866 to
c94655f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Built and Install
General settings:
TARGET: server
V:
DEBUG:
INSTALLDIR: /var/ossec
DATABASE:
ONEWAY: no
CLEANFULL: no
RESOURCES_URL: https://packages.wazuh.com/deps/99-29585
EXTERNAL_SRC_ONLY:
HTTP_REQUEST_BRANCH:cd50797cfe03c27f3759bdc243fecca6f7535d35
User settings:
WAZUH_GROUP: wazuh
WAZUH_USER: wazuh
USE settings:
USE_INOTIFY: no
USE_BIG_ENDIAN: no
USE_SELINUX: no
USE_AUDIT: yes
DISABLE_SYSC: no
IMAGE_TRUST_CHECKS: 1
CA_NAME: DigiCert Assured ID Root CA
Mysql settings:
includes:
libs:
Pgsql settings:
includes:
libs:
Defines:
-DOSSECHIDS -DUSER="wazuh" -DGROUPGLOBAL="wazuh" -DLinux -DINOTIFY_ENABLED -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DIMAGE_TRUST_CHECKS=1 -DCA_NAME='DigiCert Assured ID Root CA' -DENABLE_SYSC -DENABLE_AUDIT
Compiler:
CFLAGS -pthread -Iexternal/pacman/lib/libalpm/ -Iexternal/libarchive/libarchive -Wl,--start-group -Iexternal/audit-userspace/lib -g -DNDEBUG -O2 -DOSSECHIDS -DUSER="wazuh" -DGROUPGLOBAL="wazuh" -DLinux -DINOTIFY_ENABLED -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DIMAGE_TRUST_CHECKS=1 -DCA_NAME='DigiCert Assured ID Root CA' -DENABLE_SYSC -DENABLE_AUDIT -pipe -Wall -Wextra -std=gnu99 -I./ -I./headers/ -Iexternal/openssl/include -Iexternal/cJSON/ -Iexternal/libyaml/include -Iexternal/curl/include -Iexternal/msgpack/include -Iexternal/bzip2/ -Ishared_modules/common -Ishared_modules/dbsync/include -Ishared_modules/sync_protocol/include -Iwazuh_modules/syscollector/include -Iwazuh_modules/sca/include -Iwazuh_modules/agent_info/include -Idata_provider/include -Iexternal/libpcre2/include -Iexternal/rpm//builddir/output/include -Isyscheckd/include -Ishared_modules/router/include -Ishared_modules/content_manager/include -Ishared_modules/file_helper/file_io/include -Ishared_modules/file_helper/filesystem/include -Iwazuh_modules/vulnerability_scanner/include -I./shared_modules/
LDFLAGS '-Wl,-rpath,/../lib' -pthread -lrt -ldl -O2 -Lshared_modules/dbsync/build/lib -Lshared_modules/sync_protocol/build/lib -Lshared_modules/file_helper/build/lib -Lwazuh_modules/syscollector/build/lib -Lwazuh_modules/sca/build/lib -Lwazuh_modules/agent_info/build/lib -Ldata_provider/build/lib -Lsyscheckd/build/lib
LIBS -lrt -ldl -lm
CC gcc
MAKE make
make[1]: Leaving directory '/workspaces/wazuh-5.x/wazuh/src'
Done building server
Started wazuh-modulesd...
Started wazuh-clusterd...
Completed.
- Configuration finished properly.
- To start Wazuh:
/var/ossec/bin/wazuh-control start
- To stop Wazuh:
/var/ossec/bin/wazuh-control stop
- The configuration can be viewed or modified at /var/ossec/etc/ossec.conf
Thanks for using Wazuh.
Please don't hesitate to contact us if you need help or find
any bugs.
Use our public Mailing List at:
https://groups.google.com/forum/#!forum/wazuh
More information can be found at:
- http://www.wazuh.com
--- Press ENTER to finish (maybe more information below). ---
- Update completed.In Install:
mkdir -p external/categories
curl -f -s -o external/categories/logtypes.json https://raw.githubusercontent.com/wazuh/wazuh-indexer-security-analytics/refs/heads/enhancement/33247-dynamic-categories-retrieval/src/main/resources/OSMapping/logtypes.json
curl -f -s -o external/categories/logtypes.json https://raw.githubusercontent.com/wazuh/wazuh-indexer-security-analytics/refs/heads/5.0.0/src/main/resources/OSMapping/logtypes.json
curl -f -s -o external/categories/logtypes.json https://raw.githubusercontent.com/wazuh/wazuh-indexer-security-analytics/refs/heads/main/src/main/resources/OSMapping/logtypes.jsonVerify dir and file:
(venv) ╭─root@03b15c688053 /workspaces/wazuh-5.x/wazuh ‹enhancement/33247-dynamic-categories-retrieval›
╰─# find . -type d -name "categories"
./src/external/categories
(venv) ╭─root@03b15c688053 /workspaces/wazuh-5.x/wazuh ‹enhancement/33247-dynamic-categories-retrieval›
╰─# cd src/external/categories
(venv) ╭─root@03b15c688053 /workspaces/wazuh-5.x/wazuh/src/external/categories ‹enhancement/33247-dynamic-categories-retrieval›
╰─# ls -l
total 8
-rw-r--r-- 1 root root 4307 Nov 26 12:53 logtypes.json
(venv) ╭─root@03b15c688053 /workspaces/wazuh-5.x/wazuh/src/external/categories ‹enhancement/33247-dynamic-categories-retrieval›
╰─# cat logtypes.json
{
"others_application": {
"name": "others_application",
"description": "Application logs",
....
}
NahuFigueroa97
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
(venv) ╭─root@ca37659e68c4 /workspaces/devContainer
╰─# apt install ./wazuh-manager_5.0.0-0_amd64_75788c6.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'wazuh-manager' instead of './wazuh-manager_5.0.0-0_amd64_75788c6.deb'
Suggested packages:
expect
The following NEW packages will be installed:
wazuh-manager
0 upgraded, 1 newly installed, 0 to remove and 105 not upgraded.
Need to get 0 B/460 MB of archives.
After this operation, 1,037 MB of additional disk space will be used.
Get:1 /workspaces/devContainer/wazuh-manager_5.0.0-0_amd64_75788c6.deb wazuh-manager amd64 5.0.0-0 [460 MB]
Selecting previously unselected package wazuh-manager.
(Reading database ... 64972 files and directories currently installed.)
Preparing to unpack .../wazuh-manager_5.0.0-0_amd64_75788c6.deb ...
Unpacking wazuh-manager (5.0.0-0) ...
Setting up wazuh-manager (5.0.0-0) ...
(venv) ╭─root@ca37659e68c4 /workspaces/devContainer
╰─# ls -la /var/ossec/etc/categories.json
-rw-r--r-- 1 root root 132 Nov 25 12:55 /var/ossec/etc/categories.json
(venv) ╭─root@ca37659e68c4 /workspaces/devContainer
╰─# cat /var/ossec/etc/categories.json
[
"Access Management",
"Applications",
"Cloud Services",
"Network Activity",
"Other",
"Security",
"System Activity"
]
(venv) ╭─root@ca37659e68c4 /workspaces/devContainer
╰─# service start
(venv) ╭─root@ca37659e68c4 /workspaces/devContainer
╰─# service wazuh-manager start 130 ↵
2025/11/26 13:22:00 wazuh-modulesd:router: INFO: Loaded router module.
2025/11/26 13:22:00 wazuh-modulesd:content_manager: INFO: Loaded content_manager module.
2025/11/26 13:22:00 wazuh-modulesd:inventory-sync: INFO: Loaded Inventory sync module.
Starting Wazuh v5.0.0...
Started wazuh-apid...
Started wazuh-authd...
Started wazuh-db...
Started wazuh-execd...
Started wazuh-analysisd...
Started wazuh-syscheckd...
Started wazuh-remoted...
Started wazuh-logcollector...
Started wazuh-monitord...
2025/11/26 13:22:44 wazuh-modulesd:router: INFO: Loaded router module.
2025/11/26 13:22:44 wazuh-modulesd:content_manager: INFO: Loaded content_manager module.
2025/11/26 13:22:44 wazuh-modulesd:inventory-sync: INFO: Loaded Inventory sync module.
Started wazuh-modulesd...
Started wazuh-clusterd...
Completed.
(venv) ╭─root@ca37659e68c4 /workspaces/devContainer
╰─# service wazuh-manager status
wazuh-clusterd is running...
wazuh-modulesd is running...
wazuh-monitord is running...
wazuh-logcollector is running...
wazuh-remoted is running...
wazuh-syscheckd is running...
wazuh-analysisd is running...
wazuh-execd is running...
wazuh-db is running...
wazuh-authd is running...
wazuh-apid is running...
|
Checks failing due to changes in indexer: |
LGTM!Built and InstallGeneral settings:
TARGET: server
V:
DEBUG:
INSTALLDIR: /var/ossec
DATABASE:
ONEWAY: no
CLEANFULL: no
RESOURCES_URL: https://packages.wazuh.com/deps/99-29585
EXTERNAL_SRC_ONLY:
HTTP_REQUEST_BRANCH:cd50797cfe03c27f3759bdc243fecca6f7535d35
User settings:
WAZUH_GROUP: wazuh
WAZUH_USER: wazuh
USE settings:
USE_INOTIFY: no
USE_BIG_ENDIAN: no
USE_SELINUX: no
USE_AUDIT: yes
DISABLE_SYSC: no
IMAGE_TRUST_CHECKS: 1
CA_NAME: DigiCert Assured ID Root CA
Mysql settings:
includes:
libs:
Pgsql settings:
includes:
libs:
Defines:
-DOSSECHIDS -DUSER="wazuh" -DGROUPGLOBAL="wazuh" -DLinux -DINOTIFY_ENABLED -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DIMAGE_TRUST_CHECKS=1 -DCA_NAME='DigiCert Assured ID Root CA' -DENABLE_SYSC -DENABLE_AUDIT
Compiler:
CFLAGS -pthread -Iexternal/pacman/lib/libalpm/ -Iexternal/libarchive/libarchive -Wl,--start-group -Iexternal/audit-userspace/lib -g -DNDEBUG -O2 -DOSSECHIDS -DUSER="wazuh" -DGROUPGLOBAL="wazuh" -DLinux -DINOTIFY_ENABLED -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DIMAGE_TRUST_CHECKS=1 -DCA_NAME='DigiCert Assured ID Root CA' -DENABLE_SYSC -DENABLE_AUDIT -pipe -Wall -Wextra -std=gnu99 -I./ -I./headers/ -Iexternal/openssl/include -Iexternal/cJSON/ -Iexternal/libyaml/include -Iexternal/curl/include -Iexternal/msgpack/include -Iexternal/bzip2/ -Ishared_modules/common -Ishared_modules/dbsync/include -Ishared_modules/sync_protocol/include -Iwazuh_modules/syscollector/include -Iwazuh_modules/sca/include -Iwazuh_modules/agent_info/include -Idata_provider/include -Iexternal/libpcre2/include -Iexternal/rpm//builddir/output/include -Isyscheckd/include -Ishared_modules/router/include -Ishared_modules/content_manager/include -Ishared_modules/file_helper/file_io/include -Ishared_modules/file_helper/filesystem/include -Iwazuh_modules/vulnerability_scanner/include -I./shared_modules/
LDFLAGS '-Wl,-rpath,/../lib' -pthread -lrt -ldl -O2 -Lshared_modules/dbsync/build/lib -Lshared_modules/sync_protocol/build/lib -Lshared_modules/file_helper/build/lib -Lwazuh_modules/syscollector/build/lib -Lwazuh_modules/sca/build/lib -Lwazuh_modules/agent_info/build/lib -Ldata_provider/build/lib -Lsyscheckd/build/lib
LIBS -lrt -ldl -lm
CC gcc
MAKE make
make[1]: Leaving directory '/workspaces/wazuh_5/wazuh/src'
Done building server
- Configuration finished properly.
- To start Wazuh:
/var/ossec/bin/wazuh-control start
- To stop Wazuh:
/var/ossec/bin/wazuh-control stop
- The configuration can be viewed or modified at /var/ossec/etc/ossec.conf
Thanks for using Wazuh.
Please don't hesitate to contact us if you need help or find
any bugs.
Use our public Mailing List at:
https://groups.google.com/forum/#!forum/wazuh
More information can be found at:
- http://www.wazuh.com
--- Press ENTER to finish (maybe more information below). ---
- In order to connect agent and server, you need to add each agent to the server.
More information at:
https://documentation.wazuh.com/
service run ╭─root@49fb68cf5654 /workspaces/wazuh_5/wazuh ‹enhancement/33247-dynamic-categories-retrieval›
╰─# service wazuh-manager start 1 ↵
2025/11/26 16:01:53 wazuh-modulesd:router: INFO: Loaded router module.
2025/11/26 16:01:53 wazuh-modulesd:content_manager: INFO: Loaded content_manager module.
2025/11/26 16:01:53 wazuh-modulesd:inventory-sync: INFO: Loaded Inventory sync module.
Starting Wazuh v5.0.0...
Started wazuh-apid...
Started wazuh-authd...
Started wazuh-db...
Started wazuh-execd...
Started wazuh-analysisd...
Started wazuh-syscheckd...
Started wazuh-remoted...
Started wazuh-logcollector...
Started wazuh-monitord...
2025/11/26 16:02:12 wazuh-modulesd:router: INFO: Loaded router module.
2025/11/26 16:02:12 wazuh-modulesd:content_manager: INFO: Loaded content_manager module.
2025/11/26 16:02:12 wazuh-modulesd:inventory-sync: INFO: Loaded Inventory sync module.
Started wazuh-modulesd...
Started wazuh-clusterd...
Completed.
╭─root@49fb68cf5654 /workspaces/wazuh_5/wazuh ‹enhancement/33247-dynamic-categories-retrieval›
╰─# service wazuh-manager status
wazuh-clusterd is running...
wazuh-modulesd is running...
wazuh-monitord is running...
wazuh-logcollector is running...
wazuh-remoted is running...
wazuh-syscheckd is running...
wazuh-analysisd is running...
wazuh-execd is running...
wazuh-db is running...
wazuh-authd is running...
wazuh-apid is running...file: ╭─root@49fb68cf5654 /workspaces/wazuh_5/wazuh ‹enhancement/33247-dynamic-categories-retrieval›
╰─# ls -la /var/ossec/etc/categories.json
-rw-r--r-- 1 root root 132 Nov 26 15:41 /var/ossec/etc/categories.json
╭─root@49fb68cf5654 /workspaces/wazuh_5/wazuh ‹enhancement/33247-dynamic-categories-retrieval›
╰─# cat /var/ossec/etc/categories.json
[
"Access Management",
"Applications",
"Cloud Services",
"Network Activity",
"Other",
"Security",
"System Activity"
] |
c94655f to
dfa43ec
Compare
d54b955
dfa43ec to
d54b955
Compare
d54b955 to
67a1eb0
Compare
Description
Closes #33247
Proposed Changes
Results and Evidence
categories.json
{ "others_application": { "name": "others_application", "description": "Application logs", "category": "Other", "source": "Sigma", "tags": { "correlation_id": 0 } }, "others_apt": { "name": "others_apt", "description": "Apt logs", "category": "Other", "source": "Sigma", "tags": { "correlation_id": 1 } }, "others_cloud": { "name": "others_cloud", "description": "Cloud logs", "category": "Other", "source": "Sigma", "tags": { "correlation_id": 2 } }, "others_compliance": { "name": "others_compliance", "description": "Compliance logs", "category": "Other", "source": "Sigma", "tags": { "correlation_id": 4 } }, "linux": { "name": "linux", "description": "Sys logs", "category": "System Activity", "source": "Sigma", "tags": { "correlation_id": 5 } }, "others_macos": { "name": "others_macos", "description": "MacOS logs", "category": "System Activity", "source": "Sigma", "tags": { "correlation_id": 6 } }, "network": { "name": "network", "description": "Network logs", "category": "Network Activity", "source": "Sigma", "tags": { "correlation_id": 7 } }, "others_proxy": { "name": "others_proxy", "description": "Proxy logs", "category": "Other", "source": "Sigma", "tags": { "correlation_id": 8 } }, "others_web": { "name": "others_web", "description": "Web logs", "category": "Other", "source": "Sigma", "tags": { "correlation_id": 9 } }, "windows": { "name": "windows", "description": "Windows logs", "category": "System Activity", "source": "Sigma", "tags": { "correlation_id": 10 } }, "ad_ldap": { "name": "ad_ldap", "description": "Ad/ldap logs", "category": "Access Management", "source": "Sigma", "tags": { "correlation_id": 11 } }, "apache_access": { "name": "apache_access", "description": "Apache Access logs", "category": "Access Management", "source": "Sigma", "tags": { "correlation_id": 12 } }, "cloudtrail": { "name": "cloudtrail", "description": "Cloudtrail Raw or OCSF based logs", "category": "Cloud Services", "source": "Sigma", "tags": { "correlation_id": 14 } }, "dns": { "name": "dns", "description": "DNS Raw or Route53 OCSF based logs", "category": "Network Activity", "source": "Sigma", "tags": { "correlation_id": 15 } }, "github": { "name": "github", "description": "Github logs", "category": "Applications", "source": "Sigma", "tags": { "correlation_id": 16 } }, "m365": { "name": "m365", "description": "M365 logs", "category": "Applications", "source": "Sigma", "tags": { "correlation_id": 17 } }, "gworkspace": { "name": "gworkspace", "description": "GWorkspace logs", "category": "Applications", "source": "Sigma", "tags": { "correlation_id": 18 } }, "okta": { "name": "okta", "description": "Okta logs", "category": "Access Management", "source": "Sigma", "tags": { "correlation_id": 19 } }, "azure": { "name": "azure", "description": "Azure logs", "category": "Cloud Services", "source": "Sigma", "tags": { "correlation_id": 20 } }, "s3": { "name": "s3", "description": "S3 logs", "category": "Cloud Services", "source": "Sigma", "tags": { "correlation_id": 21 } }, "test_windows": { "name": "test_windows", "description": "Test Windows Log Type for integ tests. Please do not use.", "category": "Other", "source": "Sigma", "tags": { "correlation_id": 22 } }, "vpcflow": { "name": "vpcflow", "description": "VPC Flow Raw or OCSF based logs", "category": "Network Activity", "source": "Sigma", "tags": { "correlation_id": 23 } }, "waf": { "name": "waf", "description": "Web Application Firewall based logs", "category": "Security", "source": "Sigma", "tags": { "correlation_id": 24 } } }Manual tests with their corresponding evidence
Memory tests for Linux
Memory tests for Windows
Memory tests for macOS
Decoder/Rule tests (Wazuh v4.x)
runtests.pyexecuted without errorsEngine (Wazuh v5.x and above)
Wazuh server API/Framework
Artifacts Affected
Configuration Changes
Tests Introduced
Review Checklist