Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计提醒

deploying-osquery-for-endpoint-monitoring部署 osquery 进行端点监控

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

247

周安装

10

GitHub Stars

5,886

下载量

78
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:deploying-osquery-for-endpoint-monitoring(部署 osquery 进行端点监控)
来源仓库:https://github.com/mukul975/anthropic-cybersecurity-skills
仓库路径:skills/deploying-osquery-for-endpoint-monitoring
安装命令:
npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill deploying-osquery-for-endpoint-monitoring
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill deploying-osquery-for-endpoint-monitoring

简介

用于批量部署 osquery 进行端点资产与行为监控,支持跨平台查询。

  • 适用于软件清单、端口状态、服务运行情况等企业级可见性需求。
  • 可构建威胁狩猎查询并与 Kolide Fleet 等管理平台集成实现集中管控。
  • 需部署 osquery 客户端并配置 Fleet 服务器,不适用于实时流式告警场景。
  • deploying-osquery-for-endpoint-monitoring 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

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).

Prerequisites

  • Osquery package for target OS (https://osquery.io/downloads)
  • Fleet management server (Kolide Fleet or FleetDM) for enterprise deployment
  • TLS certificates for secure agent-to-server communication
  • Log aggregation pipeline (Filebeat, Fluentd) for osquery result logs

Workflow

Step 1: Install Osquery

# Ubuntu/Debian
export OSQUERY_KEY=1484120AC4E9F8A1A577AEEE97A80C63C9D8B80B
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $OSQUERY_KEY
add-apt-repository 'deb [arch=amd64] https://pkg.osquery.io/deb deb main'
apt-get update && apt-get install osquery -y

# Windows (MSI)
# Download from https://osquery.io/downloads/official
msiexec /i osquery-5.12.1.msi /quiet

# macOS
brew install osquery

Step 2: Configure Osquery

// /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)
SELECT pid, name, path, cmdline FROM processes WHERE on_disk = 0;

-- Find listening ports not associated with known services
SELECT lp.port, lp.protocol, p.name, p.path
FROM listening_ports lp JOIN processes p ON lp.pid = p.pid
WHERE lp.port NOT IN (22, 80, 443, 3306, 5432);

-- Detect unauthorized SSH keys
SELECT * FROM authorized_keys WHERE NOT key LIKE '%admin-team%';

-- Find recently modified system binaries
SELECT path, mtime, size FROM file
WHERE path LIKE '/usr/bin/%' AND mtime > (strftime('%s', 'now') - 86400);

-- Detect processes connecting to external IPs
SELECT DISTINCT p.name, p.path, pn.remote_address, pn.remote_port
FROM process_open_sockets pn JOIN processes p ON pn.pid = p.pid
WHERE pn.remote_address NOT LIKE '10.%'
  AND pn.remote_address NOT LIKE '172.16.%'
  AND pn.remote_address NOT LIKE '192.168.%'
  AND pn.remote_address != '127.0.0.1'
  AND pn.remote_address != '0.0.0.0';

-- Windows: Detect unsigned running executables
SELECT p.name, p.path, a.result AS signature_status
FROM processes p JOIN authenticode a ON p.path = a.path
WHERE a.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

TermDefinition
OsqueryOpen-source endpoint agent that exposes OS state as SQL tables for querying
SchedulePeriodic queries that run at defined intervals and log results
PackCollection of related queries grouped for specific use cases (IR, compliance)
FleetDMOpen-source osquery fleet management platform
Differential ResultsOsquery logs only changes between query executions, reducing data volume

Tools & Systems

  • Osquery: https://osquery.io/ - endpoint visibility agent
  • FleetDM: https://fleetdm.com/ - centralized fleet management
  • Kolide: Cloud-based osquery management with Slack integration
  • osquery-go: Go client library for osquery extensions

Common Pitfalls

  • Query performance: Complex queries with large table scans impact endpoint performance. Use WHERE clauses and test query cost with EXPLAIN.
  • Schedule intervals too aggressive: Running heavy queries every 60 seconds causes CPU spikes. Use 300-3600 second intervals for most queries.
  • Not using differential mode: Without differential logging, osquery logs all results every interval. Differential mode logs only changes.
  • Missing event tables: Some osquery tables require events framework enabled (process_events, socket_events). Enable with --disable_events=false.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.45%
按下载量换算27

Claude

31.66%
按下载量换算25

Cursor

21.44%
按下载量换算17

Gemini CLI

10.26%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill deploying-osquery-for-endpoint-monitoring 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills