CodeBleu
02/12/2024, 5:01 PMGrant Bilstad
02/12/2024, 7:11 PMfleetctl package
only packages .deb, and .rpm for Linux.CodeBleu
02/12/2024, 7:15 PMosquery
to work, is that good enough to have it connect to fleet dm?Grant Bilstad
02/12/2024, 7:24 PMCodeBleu
02/12/2024, 7:50 PMlauncher
is that needed, or can i just get osquery running and be able to get it to work with Fleet? I think I might be close, as I have it running ( I think ) , but not seeing anything in FleetCodeBleu
02/12/2024, 10:14 PMosquery
installed and appears to be working for the most part. The only thing I'm not able to figure out is why it's not trying to communicate to my fleet server on port 8090.
I have verified with nc
, and openssl
that i can connect and the cert works, I've also manually ran osqueryd
with the flags directly after the command and not use the flag file. I don't see any errors, but I also dont see any attempts to talk to my fleet server.
I even see info in my osqueryd.results.log
that have status of "action": "added"
Any help on how I can figure out why there is no communication attempts from osqueryd
would be greatly appreciated.CodeBleu
02/12/2024, 10:16 PMosqueryd --config_plugin=filesystem --config_path=/etc/osquery/osquery.conf --tls_server_certs=fleet_roots.pem --tls_hostname=10.10.10.10:8090 --enroll_secret_path=fleet_secret --verbose --tls_dump
I0212 17:15:18.401388 17574 init.cpp:413] osquery initialized [version=5.11.0]
I0212 17:15:18.401480 17574 extensions.cpp:453] Could not autoload extensions: Cannot open file for reading: /etc/osquery/extensions.load
I0212 17:15:18.401525 17574 dispatcher.cpp:78] Adding new service: WatcherRunner (0x5635ef842ba8) to thread: 140618691180224 (0x5635ef800580) in process 17574
I0212 17:15:18.402818 17575 watcher.cpp:720] osqueryd watcher (17574) executing worker (17577)
I0212 17:15:18.410466 17577 init.cpp:410] osquery worker initialized [watcher=17574]
I0212 17:15:18.410550 17577 dispatcher.cpp:78] Adding new service: WatcherWatcherRunner (0x55fd32897308) to thread: 140188265019072 (0x55fd32894af0) in process 17577
I0212 17:15:18.410584 17577 rocksdb.cpp:90] Opening RocksDB handle: /var/osquery/osquery.db
I0212 17:15:18.523155 17577 dispatcher.cpp:78] Adding new service: ExtensionWatcher (0x55fd329f2a78) to thread: 140187724146368 (0x55fd329ab620) in process 17577
I0212 17:15:18.523241 17577 dispatcher.cpp:78] Adding new service: ExtensionRunnerCore (0x55fd329eb7a8) to thread: 140187732539072 (0x55fd328a6d10) in process 17577
I0212 17:15:18.523291 17577 auto_constructed_tables.cpp:99] Removing stale ATC entries
I0212 17:15:18.523293 17710 interface.cpp:299] Extension manager service starting: /var/osquery/osquery.em
I0212 17:15:18.711285 17577 smbios_tables.cpp:106] Reading SMBIOS from sysfs DMI node
I0212 17:15:18.711665 17577 eventfactory.cpp:156] Event publisher not enabled: BPFEventPublisher: Publisher disabled via configuration
I0212 17:15:18.711827 17577 eventfactory.cpp:156] Event publisher not enabled: auditeventpublisher: Publisher disabled via configuration
I0212 17:15:18.711838 17577 eventfactory.cpp:156] Event publisher not enabled: inotify: Publisher disabled via configuration
I0212 17:15:18.711849 17577 eventfactory.cpp:156] Event publisher not enabled: syslog: Publisher disabled via configuration
I0212 17:15:18.711916 17577 events.cpp:70] Skipping subscriber: apparmor_events: Subscriber disabled via configuration
I0212 17:15:18.711977 17577 events.cpp:70] Skipping subscriber: process_file_events: Subscriber disabled via configuration
I0212 17:15:18.711987 17577 events.cpp:70] Skipping subscriber: seccomp_events: Seccomp subscriber disabled via configuration
I0212 17:15:18.711997 17577 events.cpp:70] Skipping subscriber: selinux_events: Subscriber disabled via configuration
I0212 17:15:18.712007 17577 events.cpp:70] Skipping subscriber: socket_events: Subscriber disabled via configuration
I0212 17:15:18.712410 17577 loader.cpp:45] No experiments selected
I0212 17:15:18.712447 17577 main.cpp:104] Not starting the distributed query service: Distributed query service not enabled.
I0212 17:15:18.712510 17577 dispatcher.cpp:78] Adding new service: SchedulerRunner (0x55fd32af6118) to thread: 140188214662848 (0x55fd32b18c10) in process 17577
I0212 17:15:18.712502 17715 eventfactory.cpp:390] Starting event publisher run loop: udev
John Speno
02/12/2024, 10:57 PM--config_plugin=tls
--logger_plugin=tls
See more at https://osquery.readthedocs.io/en/stable/installation/cli-flags/CodeBleu
02/12/2024, 11:11 PMFailed enrollment request to <https://10.10.10.10:8090> (Cannot parse JSON: Invalid value. Offset: 0) retrying...
Kathy Satterlee
02/13/2024, 12:39 AMenroll_tls_endpoint
set up, so your enroll request is going to the root route rather than the enroll API.Kathy Satterlee
02/13/2024, 12:40 AMKathy Satterlee
02/13/2024, 12:42 AMHosts > Add Hosts > Advanced > Plain osquery
in the Fleet UI for a walkthrough on adding hosts, including downloadable files for your osquery flags, enroll secret, and server certificates.CodeBleu
02/13/2024, 3:17 PMKathy Satterlee
02/13/2024, 3:35 PMlogger_plugin
to tls,filesystem
.
In Fleet, osquery logs are handled based on your configured logging destination.Kathy Satterlee
02/13/2024, 3:37 PMCodeBleu
02/13/2024, 3:37 PMKathy Satterlee
02/13/2024, 3:38 PM# Server
--tls_hostname= # Your server
--tls_server_certs=fleet.pem
# Enrollment
--host_identifier=instance
--enroll_secret_path=secret.txt
--enroll_tls_endpoint=/api/osquery/enroll
# Configuration
--config_plugin=tls
--config_tls_endpoint=/api/v1/osquery/config
--config_refresh=10
# Live query
--disable_distributed=false
--distributed_plugin=tls
--distributed_interval=10
--distributed_tls_max_attempts=3
--distributed_tls_read_endpoint=/api/v1/osquery/distributed/read
--distributed_tls_write_endpoint=/api/v1/osquery/distributed/write
# Logging
--logger_plugin=tls,filesystem
--logger_tls_endpoint=/api/v1/osquery/log
--logger_tls_period=10
# File carving
--disable_carver=false
--carver_start_endpoint=/api/v1/osquery/carve/begin
--carver_continue_endpoint=/api/v1/osquery/carve/block
--carver_block_size=8000000
CodeBleu
02/13/2024, 3:38 PMKathy Satterlee
02/13/2024, 3:38 PMCodeBleu
02/13/2024, 3:39 PMKathy Satterlee
02/13/2024, 3:41 PM--logger_path
?CodeBleu
02/13/2024, 3:41 PM--enroll=secret_path=/etc/osquery/fleet_secret
--tls_hostname=server:8090
--osqueryd_path=/usr/bin/osqueryd
--tls_server_certs=/etc/osquery/fleet_roots.pem
--update_channel=stable
#--config_tls_endpoint=/api/osquery/config
#--enroll_tls_endpoint=/enroll
--logger_plugin=filesystem
Kathy Satterlee
02/13/2024, 3:41 PMlogger
settings?CodeBleu
02/13/2024, 3:41 PM--logger_path
as the default is /var/log/osquery
where they were going before.CodeBleu
02/13/2024, 3:42 PMKathy Satterlee
02/13/2024, 3:44 PMKathy Satterlee
02/13/2024, 3:46 PMCodeBleu
02/13/2024, 3:47 PMfleetctl
. I manually installed osquery
on my Gentoo Linux box and am using the configuration settings that are listed in the "add host" "advanced"
section to setup my osquery
.CodeBleu
02/13/2024, 3:51 PMconfig:
options:
logger_plugin: tls
pack_delimiter: _
logger_tls_period: 10
distributed_plugin: tls
disable_distributed: false
logger_tls_endpoint: /api/v1/osquery/log
distributed_interval: 10
decorations_top_level: true
distributed_tls_max_attempts: 3
distributed_tls_read_endpoint: /api/v1/osquery/distributed/read
distributed_tls_write_endpoint: /api/v1/osquery/distributed/write
enable_windows_events_publisher: true
CodeBleu
02/13/2024, 3:52 PMKathy Satterlee
02/13/2024, 4:15 PMlogger_plugin
there to tls,filesystem
as well will enable both tls and filesystem logging.
Once your logs have been sent to Fleet, where you can find them depends on your setup for osquery logging destination in the Fleet configuration (linked above).CodeBleu
02/13/2024, 4:20 PM[error] 69#69: *17402742 open() "/opt/socore/html/api/osquery/enroll" failed (2: No such file or directory)
For some weird reason, it is appending the /api/osquery/enroll
to /opt/socore/html
The `/api/osquery/enrol`l is what i have in my enroll_tls_endpoint
Kathy Satterlee
02/13/2024, 4:56 PMCodeBleu
02/13/2024, 5:04 PMCodeBleu
02/13/2024, 5:06 PMfleetctl
and compile it? I know there is not packages out there for Gentoo, but was wondering if it might help if I could try compiling the fleetctl
command so I can use the fleetctl
tool and also have the config with launcher
as well...instead of manually installing osquery
?CodeBleu
02/13/2024, 5:22 PM/kolide.agent.Api/RequestEnrollment
now, and I dont get an error at the nginx now, but get this error now.
"POST /kolide.agent.Api/RequestEnrollment HTTP/1.1" 404 19
Kathy Satterlee
02/13/2024, 9:21 PMCodeBleu
02/13/2024, 9:26 PMmake deps
and then make
to create the launcher
bin. I then use that instead of trying to get osqueryd
on its own to work. Once i had launcher
and used the config settings that my server told me to and similar to my other servers are setup, then it worked!
Now I have my Gentoo enrolled, however now I'm trying to figure out why the Software tab is not populated with my software. It shows the OS info, but not any software. I'm also able to run a manual query from the UI and it shows the software from that result, but it's just not putting it in the Software tab of that host.Kathy Satterlee
02/13/2024, 9:33 PMCodeBleu
02/13/2024, 9:34 PMKathy Satterlee
02/13/2024, 9:38 PMdefensivedepth
04/09/2024, 1:24 PM