-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Auditd Manager] Add Session Data option (#11500)
* Add Session Data Option to manifest * Updating docs * Adding integration policy tests * updating changelog PR number
- Loading branch information
Showing
16 changed files
with
364 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
42 changes: 42 additions & 0 deletions
42
packages/auditd_manager/data_stream/auditd/_dev/test/policy/test-default.expected
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
inputs: | ||
- data_stream: | ||
namespace: ep | ||
meta: | ||
package: | ||
name: auditd_manager | ||
name: test-default-auditd_manager | ||
streams: | ||
- backlog_limit: 8192 | ||
backpressure_strategy: auto | ||
condition: ${host.platform} == 'linux' | ||
data_stream: | ||
dataset: auditd_manager.auditd | ||
type: logs | ||
failure_mode: silent | ||
immutable: false | ||
include_raw_message: true | ||
include_warnings: false | ||
rate_limit: 0 | ||
resolve_ids: true | ||
socket_type: "" | ||
tags: | ||
- auditd_manager-auditd | ||
type: audit/auditd | ||
type: audit/auditd | ||
use_output: default | ||
namespaces: [] | ||
output_permissions: | ||
default: | ||
_elastic_agent_checks: | ||
cluster: | ||
- monitor | ||
_elastic_agent_monitoring: | ||
indices: [] | ||
uuid-for-permissions-on-related-indices: | ||
indices: | ||
- names: | ||
- logs-auditd_manager.auditd-ep | ||
privileges: | ||
- auto_configure | ||
- create_doc | ||
secret_references: [] |
2 changes: 2 additions & 0 deletions
2
packages/auditd_manager/data_stream/auditd/_dev/test/policy/test-default.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
data_stream: | ||
vars: |
57 changes: 57 additions & 0 deletions
57
...ream/auditd/_dev/test/policy/test-session-viewer-with-audit-rules-and-processors.expected
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
inputs: | ||
- data_stream: | ||
namespace: ep | ||
meta: | ||
package: | ||
name: auditd_manager | ||
name: test-session-viewer-with-audit-rules-and-processors-auditd_manager | ||
streams: | ||
- audit_rules: |- | ||
# Session data audit rules | ||
-a always,exit -F arch=b64 -S execve,execveat -k exec | ||
-a always,exit -F arch=b64 -S exit_group | ||
-a always,exit -F arch=b64 -S setsid | ||
# Unauthorized access attempts to files (unsuccessful). | ||
-a always,exit -F arch=b32 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -F key=access | ||
-a always,exit -F arch=b32 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -F key=access | ||
-a always,exit -F arch=b64 -S open,truncate,ftruncate,creat,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -F key=access | ||
-a always,exit -F arch=b64 -S open,truncate,ftruncate,creat,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -F key=access | ||
backlog_limit: 8192 | ||
backpressure_strategy: auto | ||
condition: ${host.platform} == 'linux' | ||
data_stream: | ||
dataset: auditd_manager.auditd | ||
type: logs | ||
failure_mode: silent | ||
immutable: false | ||
include_raw_message: true | ||
include_warnings: false | ||
processors: | ||
- test_metadata: | ||
mode: full | ||
- add_session_metadata: | ||
backend: auto | ||
rate_limit: 0 | ||
resolve_ids: true | ||
socket_type: "" | ||
tags: | ||
- auditd_manager-auditd | ||
type: audit/auditd | ||
type: audit/auditd | ||
use_output: default | ||
namespaces: [] | ||
output_permissions: | ||
default: | ||
_elastic_agent_checks: | ||
cluster: | ||
- monitor | ||
_elastic_agent_monitoring: | ||
indices: [] | ||
uuid-for-permissions-on-related-indices: | ||
indices: | ||
- names: | ||
- logs-auditd_manager.auditd-ep | ||
privileges: | ||
- auto_configure | ||
- create_doc | ||
secret_references: [] |
6 changes: 6 additions & 0 deletions
6
...ta_stream/auditd/_dev/test/policy/test-session-viewer-with-audit-rules-and-processors.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
data_stream: | ||
vars: | ||
session_data: true | ||
session_data_processors: " - add_session_metadata:\n backend: \"auto\"" | ||
processors: " - test_metadata:\n mode: \"full\"" | ||
audit_rules: "# Unauthorized access attempts to files (unsuccessful).\n-a always,exit -F arch=b32 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -F key=access\n-a always,exit -F arch=b32 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -F key=access\n-a always,exit -F arch=b64 -S open,truncate,ftruncate,creat,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -F key=access\n-a always,exit -F arch=b64 -S open,truncate,ftruncate,creat,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -F key=access" |
55 changes: 55 additions & 0 deletions
55
...manager/data_stream/auditd/_dev/test/policy/test-session-viewer-with-audit-rules.expected
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
inputs: | ||
- data_stream: | ||
namespace: ep | ||
meta: | ||
package: | ||
name: auditd_manager | ||
name: test-session-viewer-with-audit-rules-auditd_manager | ||
streams: | ||
- audit_rules: |- | ||
# Session data audit rules | ||
-a always,exit -F arch=b64 -S execve,execveat -k exec | ||
-a always,exit -F arch=b64 -S exit_group | ||
-a always,exit -F arch=b64 -S setsid | ||
# Unauthorized access attempts to files (unsuccessful). | ||
-a always,exit -F arch=b32 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -F key=access | ||
-a always,exit -F arch=b32 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -F key=access | ||
-a always,exit -F arch=b64 -S open,truncate,ftruncate,creat,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -F key=access | ||
-a always,exit -F arch=b64 -S open,truncate,ftruncate,creat,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -F key=access | ||
backlog_limit: 8192 | ||
backpressure_strategy: auto | ||
condition: ${host.platform} == 'linux' | ||
data_stream: | ||
dataset: auditd_manager.auditd | ||
type: logs | ||
failure_mode: silent | ||
immutable: false | ||
include_raw_message: true | ||
include_warnings: false | ||
processors: | ||
- add_session_metadata: | ||
backend: auto | ||
rate_limit: 0 | ||
resolve_ids: true | ||
socket_type: "" | ||
tags: | ||
- auditd_manager-auditd | ||
type: audit/auditd | ||
type: audit/auditd | ||
use_output: default | ||
namespaces: [] | ||
output_permissions: | ||
default: | ||
_elastic_agent_checks: | ||
cluster: | ||
- monitor | ||
_elastic_agent_monitoring: | ||
indices: [] | ||
uuid-for-permissions-on-related-indices: | ||
indices: | ||
- names: | ||
- logs-auditd_manager.auditd-ep | ||
privileges: | ||
- auto_configure | ||
- create_doc | ||
secret_references: [] |
5 changes: 5 additions & 0 deletions
5
...ditd_manager/data_stream/auditd/_dev/test/policy/test-session-viewer-with-audit-rules.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
data_stream: | ||
vars: | ||
session_data: true | ||
session_data_processors: " - add_session_metadata:\n backend: \"auto\"" | ||
audit_rules: "# Unauthorized access attempts to files (unsuccessful).\n-a always,exit -F arch=b32 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -F key=access\n-a always,exit -F arch=b32 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -F key=access\n-a always,exit -F arch=b64 -S open,truncate,ftruncate,creat,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -F key=access\n-a always,exit -F arch=b64 -S open,truncate,ftruncate,creat,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -F key=access" |
52 changes: 52 additions & 0 deletions
52
..._manager/data_stream/auditd/_dev/test/policy/test-session-viewer-with-processors.expected
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
inputs: | ||
- data_stream: | ||
namespace: ep | ||
meta: | ||
package: | ||
name: auditd_manager | ||
name: test-session-viewer-with-processors-auditd_manager | ||
streams: | ||
- audit_rules: | | ||
# Session data audit rules | ||
-a always,exit -F arch=b64 -S execve,execveat -k exec | ||
-a always,exit -F arch=b64 -S exit_group | ||
-a always,exit -F arch=b64 -S setsid | ||
backlog_limit: 8192 | ||
backpressure_strategy: auto | ||
condition: ${host.platform} == 'linux' | ||
data_stream: | ||
dataset: auditd_manager.auditd | ||
type: logs | ||
failure_mode: silent | ||
immutable: false | ||
include_raw_message: true | ||
include_warnings: false | ||
processors: | ||
- test_metadata: | ||
mode: full | ||
- add_session_metadata: | ||
backend: auto | ||
rate_limit: 0 | ||
resolve_ids: true | ||
socket_type: "" | ||
tags: | ||
- auditd_manager-auditd | ||
type: audit/auditd | ||
type: audit/auditd | ||
use_output: default | ||
namespaces: [] | ||
output_permissions: | ||
default: | ||
_elastic_agent_checks: | ||
cluster: | ||
- monitor | ||
_elastic_agent_monitoring: | ||
indices: [] | ||
uuid-for-permissions-on-related-indices: | ||
indices: | ||
- names: | ||
- logs-auditd_manager.auditd-ep | ||
privileges: | ||
- auto_configure | ||
- create_doc | ||
secret_references: [] |
5 changes: 5 additions & 0 deletions
5
...uditd_manager/data_stream/auditd/_dev/test/policy/test-session-viewer-with-processors.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
data_stream: | ||
vars: | ||
session_data: true | ||
session_data_processors: " - add_session_metadata:\n backend: \"auto\"" | ||
processors: " - test_metadata:\n mode: \"full\"" |
50 changes: 50 additions & 0 deletions
50
packages/auditd_manager/data_stream/auditd/_dev/test/policy/test-session-viewer.expected
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
inputs: | ||
- data_stream: | ||
namespace: ep | ||
meta: | ||
package: | ||
name: auditd_manager | ||
name: test-session-viewer-auditd_manager | ||
streams: | ||
- audit_rules: | | ||
# Session data audit rules | ||
-a always,exit -F arch=b64 -S execve,execveat -k exec | ||
-a always,exit -F arch=b64 -S exit_group | ||
-a always,exit -F arch=b64 -S setsid | ||
backlog_limit: 8192 | ||
backpressure_strategy: auto | ||
condition: ${host.platform} == 'linux' | ||
data_stream: | ||
dataset: auditd_manager.auditd | ||
type: logs | ||
failure_mode: silent | ||
immutable: false | ||
include_raw_message: true | ||
include_warnings: false | ||
processors: | ||
- add_session_metadata: | ||
backend: auto | ||
rate_limit: 0 | ||
resolve_ids: true | ||
socket_type: "" | ||
tags: | ||
- auditd_manager-auditd | ||
type: audit/auditd | ||
type: audit/auditd | ||
use_output: default | ||
namespaces: [] | ||
output_permissions: | ||
default: | ||
_elastic_agent_checks: | ||
cluster: | ||
- monitor | ||
_elastic_agent_monitoring: | ||
indices: [] | ||
uuid-for-permissions-on-related-indices: | ||
indices: | ||
- names: | ||
- logs-auditd_manager.auditd-ep | ||
privileges: | ||
- auto_configure | ||
- create_doc | ||
secret_references: [] |
4 changes: 4 additions & 0 deletions
4
packages/auditd_manager/data_stream/auditd/_dev/test/policy/test-session-viewer.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
data_stream: | ||
vars: | ||
session_data: true | ||
session_data_processors: " - add_session_metadata:\n backend: \"auto\"" |
This file contains 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
Oops, something went wrong.