analysisd: Fix Missing fields in rules description evaluation#7073
Merged
analysisd: Fix Missing fields in rules description evaluation#7073
Conversation
jnasselle
requested changes
Jan 4, 2021
Member
jnasselle
left a comment
There was a problem hiding this comment.
Hi @juliancnn !
This changes still doesn't fix the use of static fields like program_name, hostname and location. Could you please add them in order to have full support?
Regards,
Nico
3492abe to
abf29ee
Compare
Member
Author
Hi @jnasselle, You're right, Regards, |
Member
Author
New test rule: <rule id="100010" level="0">
<program_name>example</program_name>
<description>User logged from $(srcip):$(srcport) to $(dstip):$(dstport)[$(dstgeoip)] - program_name: '$(program_name)' hostname '$(hostname)'</description>
</rule>
PR outputDec 25 20:45:02 MyHost example[12345]: User 'admin' logged from '8.8.8.8:55000' to '200.16.19.1:22'
**Phase 1: Completed pre-decoding.
full event: 'Dec 25 20:45:02 MyHost example[12345]: User 'admin' logged from '8.8.8.8:55000' to '200.16.19.1:22''
timestamp: 'Dec 25 20:45:02'
hostname: 'MyHost'
program_name: 'example'
**Phase 2: Completed decoding.
name: 'example'
dstip: '200.16.19.1'
dstport: '22'
dstuser: 'admin'
srcip: '8.8.8.8'
srcport: '55000'
**Phase 3: Completed filtering (rules).
id: '100010'
level: '0'
description: 'User logged from 8.8.8.8:55000 to 200.16.19.1:22[] - program_name: 'example' hostname 'MyHost''
groups: '['local', 'syslog', 'sshd']'
firedtimes: '1'
mail: 'False'
|
Lopuiz
approved these changes
Jan 8, 2021
JcabreraC
approved these changes
Jan 8, 2021
This was referenced Feb 10, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi team!,
This PR fix the
descriptionoutput in rules evaluation.Description
When variables are used in the
descriptionoption, thedstgeoipanddstportvariables are never filled. This does not affect the evaluation of the rule but the output of the alert.Wazuh-Logtest Output
simple example for test
decoders
rules
test log
Dec 25 20:45:02 MyHost example[12345]: User 'admin' logged from '8.8.8.8:55000' to '200.16.19.1:22'Current output
missing
dstgeoipanddstportin description (Phase 3)PR output
Tests
runtest.py -c -gWindowsMAC OS XMemory tests for Linux
CoverityDr. MemoryAddressSanitizerMemory tests for WindowsMemory tests for macOSRetrocompatibility with older Wazuh versions
Working on cluster environments
Configuration on demand reports new parametersThe data flow works as expected (agent-manager-api-app)