sean.cavanaugh
01/09/2024, 4:55 PM/Users/*/.zsh_history
) being tracked by the es_process_file_events
table?sharvil
01/09/2024, 6:02 PMsharvil
01/09/2024, 6:02 PMsean.cavanaugh
01/09/2024, 6:04 PM# Fleet configurations
--config_plugin=tls
--config_tls_endpoint=/api/v1/osquery/config
--config_tls_refresh=60
--distributed_interval=10
--distributed_plugin=tls
--distributed_tls_max_attempts=3
--distributed_tls_read_endpoint=/api/v1/osquery/distributed/read
--distributed_tls_write_endpoint=/api/v1/osquery/distributed/write
--events_expiry=1
--disable_distributed=false
--enroll_tls_endpoint=/api/v1/osquery/enroll
--tls_hostname=<server fqdn>
--tls_server_certs=/var/osquery/amazon.crt
--enroll_secret_path=/var/osquery/kolide_secret
# Logs results to Fleet server
--logger_plugin=tls
--logger_tls_endpoint=/api/v1/osquery/log
--logger_tls_period=10
# When True, each row from a snapshot event is logged individually
--logger_snapshot_event_type=true
# Sets host identifier to hostname
--host_identifier=hostname
# Disables sensitive tables
--disable_tables=shell_history
# Sets query pack delimiter to "/"
--pack_delimiter=/
# Watchdog configs
--watchdog_memory_limit=500
--watchdog_utilization_limit=130
# Eventing configurations
--disable_events=false
--disable_endpointsecurity=false
--disable_endpointsecurity_fim=false
--es_fim_enable_open_events=true
--enable_keyboard_events=true
--enable_mouse_events=true
# Displays matching rule strings from yara scan results
--enable_yara_string=true
sean.cavanaugh
01/09/2024, 6:04 PMoverrides:
platforms:
darwin:
file_paths:
aws:
- /Users/*/.aws/*
ssh:
- /Users/*/.ssh/*
kubernetes:
- /Users/*/.kube/config
azure:
- /Users/*/.azure/*.json
chrome:
- /Users/*/Library/Application\ Support/Google/Chrome/*/Bookmarks
- /Users/*/Library/Application\ Support/Google/Chrome/*/Cookies
- /Users/*/Library/Application\ Support/Google/Chrome/*/History
- /Users/*/Library/Application\ Support/Google/Chrome/*/Login\ Data
edge:
- /Users/*/Library/Application\ Support/Microsoft/Edge/*/Bookmarks
- /Users/*/Library/Application\ Support/Microsoft/Edge/*/Cookies
- /Users/*/Library/Application\ Support/Microsoft/Edge/*/History
- /Users/*/Library/Application\ Support/Microsoft/Edge/*/Login\ Data
island:
- /Users/*/Library/Application\ Support/Island/*/Bookmarks
- /Users/*/Library/Application\ Support/Island/*/Cookies
- /Users/*/Library/Application\ Support/Island/*/History
- /Users/*/Library/Application\ Support/Island/*/Login\ Data
gcloud:
- /Users/*/.config/gcloud/*.db
- /Users/*/.config/gcloud/*.json
- /Users/*/.config/gcloud/legacy_credentials/*
- /Users/*/.config/gcloud/cache/*
- /Users/*/.config/gcloud/configurations/*
teleport_certs:
- /Users/%/.tsh/keys/%/cas/%.pem
shell_history:
- /Users/%/%_history
sean.cavanaugh
01/09/2024, 6:05 PMsean.cavanaugh
01/09/2024, 6:05 PMsean.cavanaugh
01/09/2024, 6:06 PM➜ ~ echo "shit" >> ~/.aws/.shit
➜ ~ cat ~/.aws/credentials
[default]
aws_access_key_id = <key_id>
aws_secret_access_key = <secret>
➜ ~ cat ~/.aws/.shit
shit
sean.cavanaugh
01/09/2024, 6:06 PM.shit
filesean.cavanaugh
01/09/2024, 6:07 PMsharvil
01/09/2024, 6:07 PMsean.cavanaugh
01/09/2024, 6:07 PM{ [-]
action: added
calendarTime: Tue Jan 9 17:53:21 2024 UTC
columns: { [-]
dest_filename:
event_type: open
filename: /Users/scavanaugh/.aws/credentials
global_seq_num: 134337
parent: 99895
path: /bin/cat
pid: 90364
seq_num: 21666
time: 1704822796
version: 7
}
counter: 749
epoch: 0
hostIdentifier: <hostname>
name: pack/macpack/es_file_events
numerics: false
unixTime: 1704822801
}
sharvil
01/09/2024, 6:08 PMsean.cavanaugh
01/09/2024, 6:08 PMsharvil
01/09/2024, 6:10 PM- /Users/*/.aws/credentials
Maybe try /Users/scavanaugh/.shit
in the config?sean.cavanaugh
01/09/2024, 6:12 PMsean.cavanaugh
01/09/2024, 6:24 PM{ [-]
action: added
calendarTime: Tue Jan 9 18:23:27 2024 UTC
columns: { [-]
dest_filename:
event_type: open
filename: /Users/scavanaugh/.shit
global_seq_num: 69
parent: 99895
path: /bin/cat
pid: 97373
seq_num: 4
time: 1704824605
version: 7
}
counter: 1042
epoch: 0
hostIdentifier: <hostname>
name: pack/macpack/es_file_events
numerics: false
unixTime: 1704824607
}
sean.cavanaugh
01/09/2024, 6:24 PMsean.cavanaugh
01/09/2024, 6:24 PMsharvil
01/09/2024, 6:26 PMsean.cavanaugh
01/09/2024, 6:26 PM*
workedsharvil
01/09/2024, 6:26 PMI0109 23:55:11.791663 -4677376 endpointsecurity_fim.cpp:184] Monitoring path: /Users/sharvil/.aws/cli/
I0109 23:55:11.791697 -4677376 endpointsecurity_fim.cpp:184] Monitoring path: /Users/sharvil/.aws/config
I0109 23:55:11.791707 -4677376 endpointsecurity_fim.cpp:184] Monitoring path: /Users/sharvil/.aws/sso/
I0109 23:55:11.791714 -4677376 endpointsecurity_fim.cpp:184] Monitoring path: /Users/sharvil/.ssh/config
I0109 23:55:11.791723 -4677376 endpointsecurity_fim.cpp:184] Monitoring path: /Users/sharvil/.ssh/id_ed25519
I0109 23:55:11.791731 -4677376 endpointsecurity_fim.cpp:184] Monitoring path: /Users/sharvil/.ssh/id_ed25519.pub
I0109 23:55:11.791739 -4677376 endpointsecurity_fim.cpp:184] Monitoring path: /Users/sharvil/.ssh/known_hosts
I0109 23:55:11.791746 -4677376 endpointsecurity_fim.cpp:184] Monitoring path: /Users/sharvil/.ssh/known_hosts.old
I0109 23:55:11.791754 -4677376 endpointsecurity_fim.cpp:184] Monitoring path: /Users/sharvil/.ssh/.foo
I0109 23:55:11.791761 -4677376 endpointsecurity_fim.cpp:184] Monitoring path: /Library/Keychains/System.keychain
I0109 23:55:11.791769 -4677376 endpointsecurity_fim.cpp:184] Monitoring path: /Library/Keychains/apsd.keychain
sharvil
01/09/2024, 6:27 PMsean.cavanaugh
01/09/2024, 6:28 PM*
and %
for wildcards under the hood?sharvil
01/09/2024, 6:28 PMsharvil
01/09/2024, 6:29 PM%
is SQL specific, but I think most folks are more used to *
, so we just support both (and it’s the same code path under the hood)sharvil
01/09/2024, 6:32 PMsean.cavanaugh
01/09/2024, 6:32 PMsean.cavanaugh
01/09/2024, 6:32 PMsean.cavanaugh
01/09/2024, 6:35 PMsean.cavanaugh
01/09/2024, 6:58 PMStefano Bonicatti
01/09/2024, 7:16 PMglob()
to get the entries. *
doesn't match hidden files, .*
does (or .%
).Stefano Bonicatti
01/09/2024, 7:20 PM.
and ..
directoriessean.cavanaugh
01/09/2024, 7:44 PMsean.cavanaugh
01/09/2024, 7:47 PM/Users/*/.foo
wouldn't work while /Users/scavanaugh/.foo
would work.Stefano Bonicatti
01/09/2024, 7:52 PMsean.cavanaugh
01/09/2024, 8:06 PM/Users/*/.zsh_history
and wasn't seeing validation events. Maybe the globbing isn't the culprit here?Stefano Bonicatti
01/09/2024, 8:25 PM*
or %
doesn't really mean all files into the folder.
This last issue (or your actual issue) seems different. It could still be related to something weird happening when parsing the path and the globs, but this one needs a closer look.sean.cavanaugh
01/09/2024, 8:35 PM