2023-11-02 02:11:35 +00:00
|
|
|
//go:build linux
|
|
|
|
|
|
|
|
|
|
package table
|
|
|
|
|
|
|
|
|
|
import (
|
2025-11-04 19:53:10 +00:00
|
|
|
"context"
|
|
|
|
|
|
2026-02-10 16:57:13 +00:00
|
|
|
"github.com/fleetdm/fleet/v4/orbit/pkg/table/containerd"
|
2023-11-02 02:11:35 +00:00
|
|
|
"github.com/fleetdm/fleet/v4/orbit/pkg/table/crowdstrike/falcon_kernel_check"
|
|
|
|
|
"github.com/fleetdm/fleet/v4/orbit/pkg/table/crowdstrike/falconctl"
|
|
|
|
|
"github.com/fleetdm/fleet/v4/orbit/pkg/table/cryptsetup"
|
2025-05-22 20:15:26 +00:00
|
|
|
"github.com/fleetdm/fleet/v4/orbit/pkg/table/cryptsetup_luks_salt"
|
2024-12-04 17:10:09 +00:00
|
|
|
"github.com/fleetdm/fleet/v4/orbit/pkg/table/dataflattentable"
|
2025-04-01 21:54:22 +00:00
|
|
|
"github.com/fleetdm/fleet/v4/orbit/pkg/table/dconf_read"
|
2025-09-19 14:26:23 +00:00
|
|
|
"github.com/fleetdm/fleet/v4/orbit/pkg/table/fleetd_pacman_packages"
|
2025-11-04 19:53:10 +00:00
|
|
|
"github.com/macadmins/osquery-extension/tables/crowdstrike_falcon"
|
2023-11-02 02:11:35 +00:00
|
|
|
"github.com/osquery/osquery-go"
|
2025-04-01 21:54:22 +00:00
|
|
|
"github.com/osquery/osquery-go/plugin/table"
|
|
|
|
|
"github.com/rs/zerolog/log"
|
2023-11-02 02:11:35 +00:00
|
|
|
)
|
|
|
|
|
|
2025-11-04 19:53:10 +00:00
|
|
|
func PlatformTables(opts PluginOpts) ([]osquery.OsqueryPlugin, error) {
|
2023-11-02 02:11:35 +00:00
|
|
|
return []osquery.OsqueryPlugin{
|
2024-06-27 17:26:20 +00:00
|
|
|
cryptsetup.TablePlugin(log.Logger), // table name is "cryptsetup_status"
|
|
|
|
|
falconctl.NewFalconctlOptionTable(log.Logger), // table name is "falconctl_option"
|
|
|
|
|
falcon_kernel_check.TablePlugin(log.Logger), // table name is "falcon_kernel_check"
|
2024-12-04 17:10:09 +00:00
|
|
|
dataflattentable.TablePluginExec(log.Logger, "nftables", dataflattentable.JsonType, []string{"nft", "-jat", "list", "ruleset"}, dataflattentable.WithBinDirs("/usr/bin", "/usr/sbin")), // -j (json) -a (show object handles) -t (terse, omit set contents)
|
2025-04-01 21:54:22 +00:00
|
|
|
table.NewPlugin("dconf_read", dconf_read.Columns(), dconf_read.Generate),
|
2026-02-10 16:57:13 +00:00
|
|
|
table.NewPlugin("containerd_containers", containerd.ContainersColumns(), containerd.GenerateContainers),
|
|
|
|
|
table.NewPlugin("containerd_mounts", containerd.MountsColumns(), containerd.GenerateMounts),
|
2025-09-19 14:26:23 +00:00
|
|
|
table.NewPlugin(fleetd_pacman_packages.TableName, fleetd_pacman_packages.Columns(), fleetd_pacman_packages.Generate),
|
2025-11-04 19:53:10 +00:00
|
|
|
table.NewPlugin("crowdstrike_falcon", crowdstrike_falcon.CrowdstrikeFalconColumns(),
|
|
|
|
|
func(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
|
|
|
|
|
return crowdstrike_falcon.CrowdstrikeFalconGenerate(ctx, queryContext, opts.Socket)
|
|
|
|
|
},
|
|
|
|
|
),
|
2025-05-22 20:15:26 +00:00
|
|
|
|
|
|
|
|
dataflattentable.TablePluginExec(
|
|
|
|
|
log.Logger,
|
|
|
|
|
"lsblk",
|
|
|
|
|
dataflattentable.JsonType,
|
|
|
|
|
[]string{"lsblk", "-n", "-O", "--json"}, // -n (no header) -O (all vars) --json (output in json)
|
|
|
|
|
dataflattentable.WithBinDirs("/usr/bin", "/usr/sbin"),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
table.NewPlugin(
|
|
|
|
|
cryptsetup_luks_salt.TblName,
|
|
|
|
|
cryptsetup_luks_salt.Columns(),
|
|
|
|
|
cryptsetup_luks_salt.Generate,
|
|
|
|
|
),
|
2024-06-14 20:56:58 +00:00
|
|
|
}, nil
|
2023-11-02 02:11:35 +00:00
|
|
|
}
|