Mapped every skill to NIST CSF 2.0 subcategory IDs (GV/ID/PR/DE/RS/RC functions)
based on subdomain and content analysis. Restores 11 skills corrupted during
prior rebase, re-enriching with ATLAS, D3FEND, NIST AI RMF, and CSF 2.0 fields.
All 754 skills now carry structured mappings for all 5 security frameworks:
- MITRE ATT&CK (in tags)
- MITRE ATLAS v5.5 (atlas_techniques)
- MITRE D3FEND v1.3 (d3fend_techniques)
- NIST AI RMF 1.0 (nist_ai_rmf)
- NIST CSF 2.0 (nist_csf)
Deploys and configures osquery for real-time endpoint monitoring using SQL-based queries to inspect running processes, open ports, installed software, and system configuration. Use when building visibility into endpoint state, threat hunting across fleet, or implementing compliance monitoring. Activates for requests involving osquery deployment, endpoint visibility, fleet management, or SQL-based endpoint querying.
cybersecurity
endpoint-security
endpoint
osquery
endpoint-monitoring
threat-hunting
fleet-management
T1547
T1049
T1620
T1053.003
T1548.001
T1552
1.0.0
mahipal
Apache-2.0
PR.PS-01
PR.PS-02
DE.CM-01
PR.IR-01
Deploying Osquery for Endpoint Monitoring
When to Use
Use this skill when:
Deploying osquery across Windows, macOS, and Linux endpoints for fleet-wide visibility
Building threat hunting queries using osquery's SQL interface
Monitoring endpoint compliance (installed software, open ports, running services)
Integrating osquery data with SIEM or Kolide/Fleet for centralized management
Do not use for real-time alerting (osquery is periodic/on-demand; use EDR for real-time).
// /etc/osquery/osquery.conf (Linux/macOS) or C:\ProgramData\osquery\osquery.conf
{"options":{"config_plugin":"filesystem","logger_plugin":"filesystem","logger_path":"/var/log/osquery","disable_logging":"false","schedule_splay_percent":"10","events_expiry":"3600","verbose":"false","worker_threads":"2","enable_monitor":"true","disable_events":"false","disable_audit":"false","audit_allow_config":"true","host_identifier":"hostname","enable_syslog":"true"},"schedule":{"process_monitor":{"query":"SELECT pid, name, path, cmdline, uid, parent FROM processes WHERE on_disk = 0;","interval":300,"description":"Detect processes running without on-disk binary (fileless)"},"listening_ports":{"query":"SELECT DISTINCT p.name, p.path, lp.port, lp.protocol, lp.address FROM listening_ports lp JOIN processes p ON lp.pid = p.pid WHERE lp.port != 0;","interval":600,"description":"Monitor listening network ports"},"persistence_check":{"query":"SELECT name, path, source FROM startup_items;","interval":3600,"description":"Monitor persistence mechanisms"},"installed_packages":{"query":"SELECT name, version, source FROM deb_packages;","interval":86400,"description":"Daily software inventory"},"users_and_groups":{"query":"SELECT u.username, u.uid, u.gid, u.shell, u.directory FROM users u WHERE u.uid >= 1000;","interval":3600},"crontab_monitor":{"query":"SELECT * FROM crontab;","interval":3600,"description":"Monitor scheduled tasks"},"suid_binaries":{"query":"SELECT path, username, permissions FROM suid_bin;","interval":86400,"description":"Detect SUID binaries"}},"packs":{"incident-response":"/usr/share/osquery/packs/incident-response.conf","ossec-rootkit":"/usr/share/osquery/packs/ossec-rootkit.conf","vuln-management":"/usr/share/osquery/packs/vuln-management.conf"}}
Step 3: Threat Hunting Queries
-- Detect processes with no on-disk binary (potential fileless malware)
SELECTpid,name,path,cmdlineFROMprocessesWHEREon_disk=0;-- Find listening ports not associated with known services
SELECTlp.port,lp.protocol,p.name,p.pathFROMlistening_portslpJOINprocessespONlp.pid=p.pidWHERElp.portNOTIN(22,80,443,3306,5432);-- Detect unauthorized SSH keys
SELECT*FROMauthorized_keysWHERENOTkeyLIKE'%admin-team%';-- Find recently modified system binaries
SELECTpath,mtime,sizeFROMfileWHEREpathLIKE'/usr/bin/%'ANDmtime>(strftime('%s','now')-86400);-- Detect processes connecting to external IPs
SELECTDISTINCTp.name,p.path,pn.remote_address,pn.remote_portFROMprocess_open_socketspnJOINprocessespONpn.pid=p.pidWHEREpn.remote_addressNOTLIKE'10.%'ANDpn.remote_addressNOTLIKE'172.16.%'ANDpn.remote_addressNOTLIKE'192.168.%'ANDpn.remote_address!='127.0.0.1'ANDpn.remote_address!='0.0.0.0';-- Windows: Detect unsigned running executables
SELECTp.name,p.path,a.resultASsignature_statusFROMprocessespJOINauthenticodeaONp.path=a.pathWHEREa.result!='trusted';
Step 4: Deploy FleetDM for Centralized Management
# FleetDM provides centralized osquery management# Deploy FleetDM server, configure agents to report to it# Agents use TLS enrollment and config from Fleet# Agent configuration for Fleet:# --tls_hostname=fleet.corp.com# --tls_server_certs=/etc/osquery/fleet.pem# --enroll_secret_path=/etc/osquery/enroll_secret
Key Concepts
Term
Definition
Osquery
Open-source endpoint agent that exposes OS state as SQL tables for querying
Schedule
Periodic queries that run at defined intervals and log results
Pack
Collection of related queries grouped for specific use cases (IR, compliance)
FleetDM
Open-source osquery fleet management platform
Differential Results
Osquery logs only changes between query executions, reducing data volume