Skip to content
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

Improve GeoIP and composite rule support for AWS events #91

Merged
merged 1 commit into from May 14, 2018
Merged

Improve GeoIP and composite rule support for AWS events #91

merged 1 commit into from May 14, 2018

Conversation

branchnetconsulting
Copy link
Contributor

This copies the 'aws.sourceIPAddress' and 'aws.userIdentity.userName' fields to the standard static fields 'srcip' and 'user', so that 'srcip' can be used in Wazuh GeoIP lookups and <same_user /> and <same_source_ip /> can be used in composite rules.

This copies the 'aws.sourceIPAddress' and 'aws.userIdentity.userName' fields to the standard static fields 'srcip' and 'user', so that 'srcip' can be used in Wazuh GeoIP lookups and <same_user /> and <same_source_ip /> can be used in composite rules.
@jesuslinares
Copy link
Contributor

Hi @branchnetconsulting,

We think that the best way to standardize the fields is using Logstash.

We already included the aws.sourceIPAddress in Logstash by default: https://github.com/wazuh/wazuh/blob/master/extensions/logstash/01-wazuh-remote.conf#L18.

Feel free to send a PR for Logstash configuation instead of this script.

Thanks!

@branchnetconsulting
Copy link
Contributor Author

Hi @jesuslinares ,

While good for other reasons, leaving the standardization of these CloudTrail field names to be done by Logstash does not solve the problem of ossec-analysisd being unable to use <same_source_ip /> and <same_user /> on CloudTrail events. Perhaps the better way to solve that problem is to make ossec-analysisd support dynamic field names in composite rule <same_...> constructs instead of limiting that feature to 6 static field names. For example something like this:
<same_field name="aws.sourceIPAddress" />

Kevin

@jesuslinares
Copy link
Contributor

You are right. We need to upgrade the <same*>_ feature to allow dynamic fields.

Let me review your changes.

Thanks.

@jesuslinares jesuslinares reopened this Mar 21, 2018
@branchnetconsulting
Copy link
Contributor Author

Thanks Jesus,

While you are at it, it would probably make sense to add dynamic field support for the <different*>_ feature as well, since it is so closely related to <same*>_.

Kevin

@jesuslinares jesuslinares changed the base branch from master to 3.2 May 14, 2018 12:27
@jesuslinares jesuslinares merged commit 1a36d2d into wazuh:3.2 May 14, 2018
@jesuslinares
Copy link
Contributor

It is merged. I opened an issue with the feature request.

Thanks.

@branchnetconsulting branchnetconsulting deleted the patch-2 branch May 14, 2018 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants