aldente
09/15/2023, 2:40 PMaldente
09/15/2023, 2:40 PMGeorge Karr
09/15/2023, 7:09 PMaldente
09/15/2023, 7:24 PM---
apiVersion: v1
kind: pack
spec:
name: osx
targets:
labels:
- macOS
queries:
- description: report active processes without a corresponding binary on disk
interval: 3600
name: process-without-binary-on-disk
query: process-without-binary-on-disk
---
apiVersion: v1
kind: query
spec:
description: report active processes without a corresponding binary on disk
name: process-without-binary-on-disk
query: >
SELECT
*
FROM processes
WHERE on_disk = 0;
going to try converting them!aldente
09/18/2023, 7:36 PMupgrade-packs and there may be a bug. the platform is missing (somewhat understandable) and the intervals are all set to 0 e.g.
---
apiVersion: v1
kind: query
spec:
automations_enabled: false
description: |-
report active processes without a corresponding binary on disk
(converted from pack "osx", query "process-without-binary-on-disk")
interval: 0
logging: ""
min_osquery_version: ""
name: osx - process-without-binary-on-disk - Sep 18 15:12:30.835
observer_can_run: false
platform: ""
query: |-
SELECT
*
FROM processes WHERE on_disk = 0;
team: ""
---mbuono
09/18/2023, 7:55 PMFor any "Packs" targeting labels or individual hosts, a global query was written without scheduling features enabled.
So i guess if all our packs are set to run on a certain label (eg "Linux Hosts"), the upgrade-packs command will take those queries and make global versions of them, and then i just have to manually go in and enable interval (since for me, platform is already set, and i assume that interval == 0 means a global query will not be scheduled)?aldente
09/18/2023, 8:03 PMaldente
09/18/2023, 8:03 PM