2023-01-19 20:44:03 +00:00
<!-- DO NOT EDIT. This document is automatically generated. -->
2023-07-27 22:40:01 +00:00
# Understanding host vitals
2023-01-19 20:44:03 +00:00
2023-05-26 21:47:19 +00:00
Following is a summary of the detail queries hardcoded in Fleet used to populate the device details:
2023-01-19 20:44:03 +00:00
## battery
- Platforms: darwin
- Query:
```sql
SELECT serial_number, cycle_count, health FROM battery;
```
2023-06-14 12:15:05 +00:00
## chromeos_profile_user_info
- Platforms: chrome
- Query:
```sql
SELECT email FROM users
```
2023-01-19 20:44:03 +00:00
## disk_encryption_darwin
- Platforms: darwin
- Query:
```sql
2023-04-26 14:37:03 +00:00
SELECT 1 FROM disk_encryption WHERE user_uuid IS NOT "" AND filevault_status = 'on' LIMIT 1
2023-01-19 20:44:03 +00:00
```
## disk_encryption_linux
2023-04-26 14:37:03 +00:00
- Platforms: linux, ubuntu, debian, rhel, centos, sles, kali, gentoo, amzn, pop, arch, linuxmint, void, nixos, endeavouros, manjaro, opensuse-leap, opensuse-tumbleweed
2023-01-19 20:44:03 +00:00
- Query:
```sql
SELECT de.encrypted, m.path FROM disk_encryption de JOIN mounts m ON m.device_alias = de.name;
```
## disk_encryption_windows
- Platforms: windows
- Query:
```sql
SELECT 1 FROM bitlocker_info WHERE drive_letter = 'C:' AND protection_status = 1;
```
## disk_space_unix
2023-04-26 14:37:03 +00:00
- Platforms: linux, ubuntu, debian, rhel, centos, sles, kali, gentoo, amzn, pop, arch, linuxmint, void, nixos, endeavouros, manjaro, opensuse-leap, opensuse-tumbleweed, darwin
2023-01-19 20:44:03 +00:00
- Query:
```sql
SELECT (blocks_available * 100 / blocks) AS percent_disk_space_available,
2024-02-05 12:50:05 +00:00
round((blocks_available * blocks_size * 10e-10),2) AS gigs_disk_space_available,
round((blocks * blocks_size * 10e-10),2) AS gigs_total_disk_space
2023-01-19 20:44:03 +00:00
FROM mounts WHERE path = '/' LIMIT 1;
```
## disk_space_windows
- Platforms: windows
- Query:
```sql
SELECT ROUND((sum(free_space) * 100 * 10e-10) / (sum(size) * 10e-10)) AS percent_disk_space_available,
2024-02-05 12:50:05 +00:00
ROUND(sum(free_space) * 10e-10) AS gigs_disk_space_available,
ROUND(sum(size) * 10e-10) AS gigs_total_disk_space
2023-01-19 20:44:03 +00:00
FROM logical_drives WHERE file_system = 'NTFS' LIMIT 1;
```
## google_chrome_profiles
- Platforms: all
- Discovery query:
```sql
SELECT 1 FROM osquery_registry WHERE active = true AND registry = 'table' AND name = 'google_chrome_profiles';
```
- Query:
```sql
SELECT email FROM google_chrome_profiles WHERE NOT ephemeral AND email < > ''
```
## kubequery_info
- Platforms: all
- Discovery query:
```sql
SELECT 1 FROM osquery_registry WHERE active = true AND registry = 'table' AND name = 'kubernetes_info';
```
- Query:
```sql
SELECT * from kubernetes_info
```
## mdm
- Platforms: darwin
- Discovery query:
```sql
SELECT 1 FROM osquery_registry WHERE active = true AND registry = 'table' AND name = 'mdm';
```
- Query:
```sql
select enrolled, server_url, installed_from_dep, payload_identifier from mdm;
```
2023-07-26 22:35:55 +00:00
## mdm_config_profiles_darwin
- Platforms: darwin
- Discovery query:
```sql
SELECT 1 FROM osquery_registry WHERE active = true AND registry = 'table' AND name = 'macos_profiles';
```
- Query:
```sql
SELECT display_name, identifier, install_date FROM macos_profiles where type = "Configuration";
```
## mdm_disk_encryption_key_file_darwin
- Platforms: darwin
- Discovery query:
```sql
SELECT 1 FROM osquery_registry WHERE active = true AND registry = 'table' AND name = 'filevault_prk';
```
- Query:
```sql
WITH
de AS (SELECT IFNULL((SELECT 1 FROM disk_encryption WHERE user_uuid IS NOT "" AND filevault_status = 'on' LIMIT 1), 0) as encrypted),
fv AS (SELECT base64_encrypted as filevault_key FROM filevault_prk)
SELECT encrypted, filevault_key FROM de LEFT JOIN fv;
```
## mdm_disk_encryption_key_file_lines_darwin
- Platforms: darwin
- Discovery query:
```sql
SELECT 1 WHERE EXISTS (SELECT 1 FROM osquery_registry WHERE active = true AND registry = 'table' AND name = 'file_lines') AND NOT EXISTS (SELECT 1 FROM osquery_registry WHERE active = true AND registry = 'table' AND name = 'filevault_prk');
```
- Query:
```sql
2024-02-05 12:50:05 +00:00
WITH
2023-07-26 22:35:55 +00:00
de AS (SELECT IFNULL((SELECT 1 FROM disk_encryption WHERE user_uuid IS NOT "" AND filevault_status = 'on' LIMIT 1), 0) as encrypted),
fl AS (SELECT line FROM file_lines WHERE path = '/var/db/FileVaultPRK.dat')
SELECT encrypted, hex(line) as hex_line FROM de LEFT JOIN fl;
```
2023-01-19 20:44:03 +00:00
## mdm_windows
- Platforms: windows
- Query:
```sql
2024-02-05 12:50:05 +00:00
WITH registry_keys AS (
SELECT *
FROM registry
WHERE path LIKE 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Enrollments\%%'
),
enrollment_info AS (
SELECT
MAX(CASE WHEN name = 'UPN' THEN data END) AS upn,
MAX(CASE WHEN name = 'IsFederated' THEN data END) AS is_federated,
MAX(CASE WHEN name = 'DiscoveryServiceFullURL' THEN data END) AS discovery_service_url,
MAX(CASE WHEN name = 'ProviderID' THEN data END) AS provider_id
FROM registry_keys
GROUP BY key
),
installation_info AS (
SELECT data AS installation_type
FROM registry
WHERE path = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallationType'
LIMIT 1
)
SELECT
e.is_federated,
e.discovery_service_url,
e.provider_id,
i.installation_type
FROM installation_info i
LEFT JOIN enrollment_info e ON e.upn IS NOT NULL
LIMIT 1;
2023-01-19 20:44:03 +00:00
```
## munki_info
- Platforms: darwin
- Discovery query:
```sql
SELECT 1 FROM osquery_registry WHERE active = true AND registry = 'table' AND name = 'munki_info';
```
- Query:
```sql
select version, errors, warnings from munki_info;
```
2023-03-08 13:31:53 +00:00
## network_interface_chrome
- Platforms: chrome
- Query:
```sql
2023-05-26 21:47:19 +00:00
SELECT ipv4 AS address, mac FROM network_interfaces LIMIT 1
2023-03-08 13:31:53 +00:00
```
2023-01-19 20:44:03 +00:00
## network_interface_unix
2023-04-26 14:37:03 +00:00
- Platforms: linux, ubuntu, debian, rhel, centos, sles, kali, gentoo, amzn, pop, arch, linuxmint, void, nixos, endeavouros, manjaro, opensuse-leap, opensuse-tumbleweed, darwin
2023-01-19 20:44:03 +00:00
- Query:
```sql
2023-02-16 20:16:40 +00:00
SELECT
2023-01-19 20:44:03 +00:00
ia.address,
id.mac
2023-02-16 20:16:40 +00:00
FROM
2023-01-19 20:44:03 +00:00
interface_addresses ia
2023-02-16 20:16:40 +00:00
JOIN interface_details id ON id.interface = ia.interface
-- On Unix ia.interface is the name of the interface,
-- whereas on Windows ia.interface is the IP of the interface.
JOIN routes r ON r.interface = ia.interface
WHERE
-- Destination 0.0.0.0/0 is the default route on route tables.
r.destination = '0.0.0.0' AND r.netmask = 0
-- Type of route is "gateway" for Unix, "remote" for Windows.
AND r.type = 'gateway'
-- We are only interested on private IPs (some devices have their Public IP as Primary IP too).
AND (
-- Private IPv4 addresses.
inet_aton(ia.address) IS NOT NULL AND (
split(ia.address, '.', 0) = '10'
OR (split(ia.address, '.', 0) = '172' AND (CAST(split(ia.address, '.', 1) AS INTEGER) & 0xf0) = 16)
OR (split(ia.address, '.', 0) = '192' AND split(ia.address, '.', 1) = '168')
)
-- Private IPv6 addresses start with 'fc' or 'fd'.
OR (inet_aton(ia.address) IS NULL AND regex_match(lower(ia.address), '^f[cd][0-9a-f][0-9a-f]:[0-9a-f:]+', 0) IS NOT NULL)
)
ORDER BY
r.metric ASC,
-- Prefer IPv4 addresses over IPv6 addresses if their route have the same metric.
inet_aton(ia.address) IS NOT NULL DESC
LIMIT 1;
2023-01-19 20:44:03 +00:00
```
## network_interface_windows
- Platforms: windows
- Query:
```sql
2023-02-16 20:16:40 +00:00
SELECT
2023-01-19 20:44:03 +00:00
ia.address,
id.mac
2023-02-16 20:16:40 +00:00
FROM
2023-01-19 20:44:03 +00:00
interface_addresses ia
2023-02-16 20:16:40 +00:00
JOIN interface_details id ON id.interface = ia.interface
-- On Unix ia.interface is the name of the interface,
-- whereas on Windows ia.interface is the IP of the interface.
JOIN routes r ON r.interface = ia.address
WHERE
-- Destination 0.0.0.0/0 is the default route on route tables.
r.destination = '0.0.0.0' AND r.netmask = 0
-- Type of route is "gateway" for Unix, "remote" for Windows.
AND r.type = 'remote'
-- We are only interested on private IPs (some devices have their Public IP as Primary IP too).
AND (
-- Private IPv4 addresses.
inet_aton(ia.address) IS NOT NULL AND (
split(ia.address, '.', 0) = '10'
OR (split(ia.address, '.', 0) = '172' AND (CAST(split(ia.address, '.', 1) AS INTEGER) & 0xf0) = 16)
OR (split(ia.address, '.', 0) = '192' AND split(ia.address, '.', 1) = '168')
)
-- Private IPv6 addresses start with 'fc' or 'fd'.
OR (inet_aton(ia.address) IS NULL AND regex_match(lower(ia.address), '^f[cd][0-9a-f][0-9a-f]:[0-9a-f:]+', 0) IS NOT NULL)
)
ORDER BY
r.metric ASC,
-- Prefer IPv4 addresses over IPv6 addresses if their route have the same metric.
inet_aton(ia.address) IS NOT NULL DESC
LIMIT 1;
2023-01-19 20:44:03 +00:00
```
## orbit_info
- Platforms: all
- Discovery query:
```sql
SELECT 1 FROM osquery_registry WHERE active = true AND registry = 'table' AND name = 'orbit_info';
```
- Query:
```sql
SELECT version FROM orbit_info
```
2023-06-14 12:15:05 +00:00
## os_chrome
- Platforms: chrome
- Query:
```sql
SELECT
os.name,
os.major,
os.minor,
os.patch,
os.build,
os.arch,
os.platform,
os.version AS version,
os.version AS kernel_version
FROM
os_version os
```
2023-01-19 20:44:03 +00:00
## os_unix_like
2023-04-26 14:37:03 +00:00
- Platforms: linux, ubuntu, debian, rhel, centos, sles, kali, gentoo, amzn, pop, arch, linuxmint, void, nixos, endeavouros, manjaro, opensuse-leap, opensuse-tumbleweed, darwin
2023-01-19 20:44:03 +00:00
- Query:
```sql
SELECT
os.name,
os.major,
os.minor,
os.patch,
2024-02-05 12:50:05 +00:00
os.extra,
2023-01-19 20:44:03 +00:00
os.build,
os.arch,
os.platform,
os.version AS version,
k.version AS kernel_version
FROM
os_version os,
kernel_info k
```
## os_version
- Platforms: all
- Query:
```sql
SELECT * FROM os_version LIMIT 1
```
## os_version_windows
- Platforms: windows
- Query:
```sql
2024-02-05 12:50:05 +00:00
SELECT os.name, r.data as display_version, k.version
FROM
registry r,
os_version os,
kernel_info k
WHERE r.path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\DisplayVersion'
2023-01-19 20:44:03 +00:00
```
## os_windows
- Platforms: windows
- Query:
```sql
SELECT
os.name,
os.platform,
os.arch,
k.version as kernel_version,
2024-02-05 12:50:05 +00:00
os.version,
r.data as display_version
2023-01-19 20:44:03 +00:00
FROM
os_version os,
2024-02-05 12:50:05 +00:00
kernel_info k,
registry r
WHERE
r.path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\DisplayVersion'
2023-01-19 20:44:03 +00:00
```
## osquery_flags
- Platforms: all
- Query:
```sql
select name, value from osquery_flags where name in ("distributed_interval", "config_tls_refresh", "config_refresh", "logger_tls_period")
```
## osquery_info
- Platforms: all
- Query:
```sql
select * from osquery_info limit 1
```
## scheduled_query_stats
- Platforms: all
- Query:
```sql
SELECT *,
(SELECT value from osquery_flags where name = 'pack_delimiter') AS delimiter
FROM osquery_schedule
```
2023-04-26 14:37:03 +00:00
## software_chrome
- Platforms: chrome
- Query:
```sql
SELECT
name AS name,
version AS version,
2024-02-05 12:50:05 +00:00
identifier AS extension_id,
browser_type AS browser,
2023-04-26 14:37:03 +00:00
'Browser plugin (Chrome)' AS type,
'chrome_extensions' AS source,
2023-05-26 21:47:19 +00:00
'' AS vendor,
2023-10-27 17:04:07 +00:00
'' AS installed_path
2023-04-26 14:37:03 +00:00
FROM chrome_extensions
```
2023-01-19 20:44:03 +00:00
## software_linux
2023-04-26 14:37:03 +00:00
- Platforms: linux, ubuntu, debian, rhel, centos, sles, kali, gentoo, amzn, pop, arch, linuxmint, void, nixos, endeavouros, manjaro, opensuse-leap, opensuse-tumbleweed
2023-01-19 20:44:03 +00:00
- Query:
```sql
WITH cached_users AS (WITH cached_groups AS (select * from groups)
SELECT uid, username, type, groupname, shell
FROM users LEFT JOIN cached_groups USING (gid)
WHERE type < > 'special' AND shell NOT LIKE '%/false' AND shell NOT LIKE '%/nologin' AND shell NOT LIKE '%/shutdown' AND shell NOT LIKE '%/halt' AND username NOT LIKE '%$' AND username NOT LIKE '\_%' ESCAPE '\' AND NOT (username = 'sync' AND shell ='/bin/sync' AND directory < > ''))
SELECT
name AS name,
version AS version,
'Package (deb)' AS type,
2024-02-05 12:50:05 +00:00
'' AS extension_id,
'' AS browser,
2023-01-19 20:44:03 +00:00
'deb_packages' AS source,
'' AS release,
'' AS vendor,
2023-05-26 21:47:19 +00:00
'' AS arch,
'' AS installed_path
2023-01-19 20:44:03 +00:00
FROM deb_packages
WHERE status = 'install ok installed'
UNION
SELECT
package AS name,
version AS version,
'Package (Portage)' AS type,
2024-02-05 12:50:05 +00:00
'' AS extension_id,
'' AS browser,
2023-01-19 20:44:03 +00:00
'portage_packages' AS source,
'' AS release,
'' AS vendor,
2023-05-26 21:47:19 +00:00
'' AS arch,
'' AS installed_path
2023-01-19 20:44:03 +00:00
FROM portage_packages
UNION
SELECT
name AS name,
version AS version,
'Package (RPM)' AS type,
2024-02-05 12:50:05 +00:00
'' AS extension_id,
'' AS browser,
2023-01-19 20:44:03 +00:00
'rpm_packages' AS source,
release AS release,
vendor AS vendor,
2023-05-26 21:47:19 +00:00
arch AS arch,
'' AS installed_path
2023-01-19 20:44:03 +00:00
FROM rpm_packages
UNION
SELECT
name AS name,
version AS version,
'Package (NPM)' AS type,
2024-02-05 12:50:05 +00:00
'' AS extension_id,
'' AS browser,
2023-01-19 20:44:03 +00:00
'npm_packages' AS source,
'' AS release,
'' AS vendor,
2023-05-26 21:47:19 +00:00
'' AS arch,
path AS installed_path
2023-01-19 20:44:03 +00:00
FROM npm_packages
UNION
SELECT
name AS name,
version AS version,
'Browser plugin (Chrome)' AS type,
2024-02-05 12:50:05 +00:00
identifier AS extension_id,
browser_type AS browser,
2023-01-19 20:44:03 +00:00
'chrome_extensions' AS source,
'' AS release,
'' AS vendor,
2023-05-26 21:47:19 +00:00
'' AS arch,
path AS installed_path
2023-01-19 20:44:03 +00:00
FROM cached_users CROSS JOIN chrome_extensions USING (uid)
UNION
SELECT
name AS name,
version AS version,
'Browser plugin (Firefox)' AS type,
2024-02-05 12:50:05 +00:00
identifier AS extension_id,
'firefox' AS browser,
2023-01-19 20:44:03 +00:00
'firefox_addons' AS source,
'' AS release,
'' AS vendor,
2023-05-26 21:47:19 +00:00
'' AS arch,
path AS installed_path
2023-01-19 20:44:03 +00:00
FROM cached_users CROSS JOIN firefox_addons USING (uid)
UNION
SELECT
name AS name,
version AS version,
'Package (Python)' AS type,
2024-02-05 12:50:05 +00:00
'' AS extension_id,
'' AS browser,
2023-01-19 20:44:03 +00:00
'python_packages' AS source,
'' AS release,
'' AS vendor,
2023-05-26 21:47:19 +00:00
'' AS arch,
path AS installed_path
2023-01-19 20:44:03 +00:00
FROM python_packages;
```
## software_macos
- Platforms: darwin
- Query:
```sql
WITH cached_users AS (WITH cached_groups AS (select * from groups)
SELECT uid, username, type, groupname, shell
FROM users LEFT JOIN cached_groups USING (gid)
WHERE type < > 'special' AND shell NOT LIKE '%/false' AND shell NOT LIKE '%/nologin' AND shell NOT LIKE '%/shutdown' AND shell NOT LIKE '%/halt' AND username NOT LIKE '%$' AND username NOT LIKE '\_%' ESCAPE '\' AND NOT (username = 'sync' AND shell ='/bin/sync' AND directory < > ''))
SELECT
name AS name,
2023-04-26 14:37:03 +00:00
COALESCE(NULLIF(bundle_short_version, ''), bundle_version) AS version,
2023-01-19 20:44:03 +00:00
'Application (macOS)' AS type,
bundle_identifier AS bundle_identifier,
2024-02-05 12:50:05 +00:00
'' AS extension_id,
'' AS browser,
2023-01-19 20:44:03 +00:00
'apps' AS source,
2023-05-26 21:47:19 +00:00
last_opened_time AS last_opened_at,
path AS installed_path
2023-01-19 20:44:03 +00:00
FROM apps
UNION
SELECT
name AS name,
version AS version,
'Package (Python)' AS type,
'' AS bundle_identifier,
2024-02-05 12:50:05 +00:00
'' AS extension_id,
'' AS browser,
2023-01-19 20:44:03 +00:00
'python_packages' AS source,
2023-05-26 21:47:19 +00:00
0 AS last_opened_at,
path AS installed_path
2023-01-19 20:44:03 +00:00
FROM python_packages
UNION
SELECT
name AS name,
version AS version,
'Browser plugin (Chrome)' AS type,
'' AS bundle_identifier,
2024-02-05 12:50:05 +00:00
identifier AS extension_id,
browser_type AS browser,
2023-01-19 20:44:03 +00:00
'chrome_extensions' AS source,
2023-05-26 21:47:19 +00:00
0 AS last_opened_at,
path AS installed_path
2023-01-19 20:44:03 +00:00
FROM cached_users CROSS JOIN chrome_extensions USING (uid)
UNION
SELECT
name AS name,
version AS version,
'Browser plugin (Firefox)' AS type,
'' AS bundle_identifier,
2024-02-05 12:50:05 +00:00
identifier AS extension_id,
'firefox' AS browser,
2023-01-19 20:44:03 +00:00
'firefox_addons' AS source,
2023-05-26 21:47:19 +00:00
0 AS last_opened_at,
path AS installed_path
2023-01-19 20:44:03 +00:00
FROM cached_users CROSS JOIN firefox_addons USING (uid)
UNION
SELECT
name As name,
version AS version,
'Browser plugin (Safari)' AS type,
'' AS bundle_identifier,
2024-02-05 12:50:05 +00:00
'' AS extension_id,
'' AS browser,
2023-01-19 20:44:03 +00:00
'safari_extensions' AS source,
2023-05-26 21:47:19 +00:00
0 AS last_opened_at,
path AS installed_path
2023-01-19 20:44:03 +00:00
FROM cached_users CROSS JOIN safari_extensions USING (uid)
UNION
SELECT
name AS name,
version AS version,
'Package (Homebrew)' AS type,
'' AS bundle_identifier,
2024-02-05 12:50:05 +00:00
'' AS extension_id,
'' AS browser,
2023-01-19 20:44:03 +00:00
'homebrew_packages' AS source,
2023-05-26 21:47:19 +00:00
0 AS last_opened_at,
path AS installed_path
2023-01-19 20:44:03 +00:00
FROM homebrew_packages;
```
## software_windows
- Platforms: windows
- Query:
```sql
WITH cached_users AS (WITH cached_groups AS (select * from groups)
SELECT uid, username, type, groupname, shell
FROM users LEFT JOIN cached_groups USING (gid)
WHERE type < > 'special' AND shell NOT LIKE '%/false' AND shell NOT LIKE '%/nologin' AND shell NOT LIKE '%/shutdown' AND shell NOT LIKE '%/halt' AND username NOT LIKE '%$' AND username NOT LIKE '\_%' ESCAPE '\' AND NOT (username = 'sync' AND shell ='/bin/sync' AND directory < > ''))
SELECT
name AS name,
version AS version,
'Program (Windows)' AS type,
2024-02-05 12:50:05 +00:00
'' AS extension_id,
'' AS browser,
2023-01-19 20:44:03 +00:00
'programs' AS source,
2023-05-26 21:47:19 +00:00
publisher AS vendor,
install_location AS installed_path
2023-01-19 20:44:03 +00:00
FROM programs
UNION
SELECT
name AS name,
version AS version,
'Package (Python)' AS type,
2024-02-05 12:50:05 +00:00
'' AS extension_id,
'' AS browser,
2023-01-19 20:44:03 +00:00
'python_packages' AS source,
2023-05-26 21:47:19 +00:00
'' AS vendor,
path AS installed_path
2023-01-19 20:44:03 +00:00
FROM python_packages
UNION
SELECT
name AS name,
version AS version,
'Browser plugin (IE)' AS type,
2024-02-05 12:50:05 +00:00
'' AS extension_id,
'' AS browser,
2023-01-19 20:44:03 +00:00
'ie_extensions' AS source,
2023-05-26 21:47:19 +00:00
'' AS vendor,
path AS installed_path
2023-01-19 20:44:03 +00:00
FROM ie_extensions
UNION
SELECT
name AS name,
version AS version,
'Browser plugin (Chrome)' AS type,
2024-02-05 12:50:05 +00:00
identifier AS extension_id,
browser_type AS browser,
2023-01-19 20:44:03 +00:00
'chrome_extensions' AS source,
2023-05-26 21:47:19 +00:00
'' AS vendor,
path AS installed_path
2023-01-19 20:44:03 +00:00
FROM cached_users CROSS JOIN chrome_extensions USING (uid)
UNION
SELECT
name AS name,
version AS version,
'Browser plugin (Firefox)' AS type,
2024-02-05 12:50:05 +00:00
identifier AS extension_id,
'firefox' AS browser,
2023-01-19 20:44:03 +00:00
'firefox_addons' AS source,
2023-05-26 21:47:19 +00:00
'' AS vendor,
path AS installed_path
2023-01-19 20:44:03 +00:00
FROM cached_users CROSS JOIN firefox_addons USING (uid)
UNION
SELECT
name AS name,
version AS version,
'Package (Chocolatey)' AS type,
2024-02-05 12:50:05 +00:00
'' AS extension_id,
'' AS browser,
2023-01-19 20:44:03 +00:00
'chocolatey_packages' AS source,
2023-05-26 21:47:19 +00:00
'' AS vendor,
path AS installed_path
2023-01-19 20:44:03 +00:00
FROM chocolatey_packages
```
## system_info
- Platforms: all
- Query:
```sql
select * from system_info limit 1
```
## uptime
- Platforms: all
- Query:
```sql
select * from uptime limit 1
```
## users
2023-04-26 14:37:03 +00:00
- Platforms: linux, darwin, windows
2023-01-19 20:44:03 +00:00
- Query:
```sql
WITH cached_groups AS (select * from groups)
SELECT uid, username, type, groupname, shell
FROM users LEFT JOIN cached_groups USING (gid)
WHERE type < > 'special' AND shell NOT LIKE '%/false' AND shell NOT LIKE '%/nologin' AND shell NOT LIKE '%/shutdown' AND shell NOT LIKE '%/halt' AND username NOT LIKE '%$' AND username NOT LIKE '\_%' ESCAPE '\' AND NOT (username = 'sync' AND shell ='/bin/sync' AND directory < > '')
```
2023-04-26 14:37:03 +00:00
## users_chrome
- Platforms: chrome
- Query:
```sql
SELECT uid, username, email FROM users
```
2023-01-19 20:44:03 +00:00
## windows_update_history
- Platforms: windows
- Discovery query:
```sql
SELECT 1 FROM osquery_registry WHERE active = true AND registry = 'table' AND name = 'windows_update_history';
```
- Query:
```sql
SELECT date, title FROM windows_update_history WHERE result_code = 'Succeeded'
```
2023-07-27 22:40:01 +00:00
< meta name = "navSection" value = "Dig deeper" >
2023-05-26 21:47:19 +00:00
< meta name = "pageOrderInSection" value = "1600" >