본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)35k · #7784

deploying-osquery-for-endpoint-monitoring

하는 일

이 도구는 컴퓨터에 osquery라는 프로그램을 설치하고 설정하도록 돕습니다. 데이터베이스와 비슷한 쿼리 방식(SQL)을 사용해, 어떤 프로그램이 실행 중인지, 어떤 네트워크 포트가 열려 있는지 같은 각 컴퓨터의 상태를 볼 수 있게 합니다.

사용하는 경우

  • ✓모든 컴퓨터에서 무슨 일이 일어나는지 알아야 할 때.
  • ✓의심스러운 활동이나 보안 문제를 찾을 때.
  • ✓컴퓨터가 정해진 보안 규칙을 따르는지 확인하는 경우.

스킬 링크

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/deploying-osquery-for-endpoint-monitoring/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/deploying-osquery-for-endpoint-monitoring/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“모든 컴퓨터에 osquery를 설치하고, 현재 실행 중인 프로그램이 무엇인지 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

먼저 각 컴퓨터에 osquery를 설치합니다. 그다음 어떤 정보를 수집할지, 얼마나 자주 수집할지 설정합니다. 마지막으로 데이터베이스 형식(SQL)으로 질문해 이 정보를 얻을 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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';


…
자주 묻는 질문

osquery란 무엇인가요?

컴퓨터 정보(실행 중인 프로세스, 설치된 소프트웨어 등)를 SQL이라는 시스템으로 조회할 수 있는 표로 바꿔 주는 프로그램입니다.

실시간 경보에 사용할 수 있나요?

실시간 경보에는 적합하지 않습니다. osquery는 정기적으로 또는 요청할 때 정보를 수집하며, 즉시 수집하지는 않습니다. 실시간 경보에는 다른 도구를 사용하는 것이 좋습니다.

설치 전에 준비할 것이 있나요?

네, 운영체제에 맞는 osquery 프로그램을 내려받아 두어야 합니다. 여러 대의 컴퓨터에 배포한다면 FleetDM 같은 관리 시스템을 권장합니다.

상세 정보

작성자의 원본 설명

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

repo: mukul975/Anthropic-Cybersecurity-Skills

인기도

GitHub 스타
35k
순위
#7784
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬