{"id":13392804,"url":"https://github.com/osquery/osquery","last_synced_at":"2025-05-12T05:18:54.487Z","repository":{"id":19162621,"uuid":"22394357","full_name":"osquery/osquery","owner":"osquery","description":"SQL powered operating system instrumentation, monitoring, and analytics.","archived":false,"fork":false,"pushed_at":"2025-04-18T00:14:16.000Z","size":27109,"stargazers_count":22452,"open_issues_count":636,"forks_count":2491,"subscribers_count":675,"default_branch":"master","last_synced_at":"2025-05-12T02:43:21.148Z","etag":null,"topics":["hacktoberfest","intrusion-detection","monitoring","security","sql"],"latest_commit_sha":null,"homepage":"https://osquery.io","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osquery.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"community_bridge":"osquery"}},"created_at":"2014-07-29T20:27:33.000Z","updated_at":"2025-05-12T02:27:28.000Z","dependencies_parsed_at":"2023-10-15T13:26:26.468Z","dependency_job_id":"e36e7ba9-8bf6-4244-acc7-faad2024a003","html_url":"https://github.com/osquery/osquery","commit_stats":null,"previous_names":["facebook/osquery"],"tags_count":143,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osquery%2Fosquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osquery%2Fosquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osquery%2Fosquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osquery%2Fosquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osquery","download_url":"https://codeload.github.com/osquery/osquery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253672696,"owners_count":21945480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","intrusion-detection","monitoring","security","sql"],"created_at":"2024-07-30T17:00:37.462Z","updated_at":"2025-05-12T05:18:54.464Z","avatar_url":"https://github.com/osquery.png","language":"C++","readme":"# osquery\n\n\u003cp align=\"center\"\u003e\n\u003cimg alt=\"osquery logo\" width=\"200\"\nsrc=\"https://github.com/osquery/osquery/raw/master/docs/img/logo-2x-dark.png\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nosquery is a SQL powered operating system instrumentation, monitoring, and analytics framework.\n\u003cbr\u003e\nAvailable for Linux, macOS, and Windows.\n\u003c/p\u003e\n\n## Information and resources\n\n- Homepage: [osquery.io](https://osquery.io)\n- Downloads: [osquery.io/downloads](https://osquery.io/downloads)\n- Documentation: [ReadTheDocs](https://osquery.readthedocs.org)\n- Stack Overflow: [Stack Overflow questions](https://stackoverflow.com/questions/tagged/osquery)\n- Table Schema: [osquery.io/schema](https://osquery.io/schema)\n- Query Packs: [osquery.io/packs](https://github.com/osquery/osquery/tree/master/packs)\n- Slack: [Browse the archives](https://chat.osquery.io/c/general) or [Join the conversation](https://join.slack.com/t/osquery/shared_invite/zt-1wipcuc04-DBXmo51zYJKBu3_EP3xZPA)\n- Build Status: [![GitHub Actions Build x86 Status](https://github.com/osquery/osquery/actions/workflows/hosted_runners.yml/badge.svg?branch=master)](https://github.com/osquery/osquery/actions/workflows/hosted_runners.yml) [![GitHub Actions Build AArch64 Status](https://github.com/osquery/osquery/actions/workflows/self_hosted_runners.yml/badge.svg?branch=master)](https://github.com/osquery/osquery/actions/workflows/self_hosted_runners.yml) [![Documentation Status](https://readthedocs.org/projects/osquery/badge/?version=latest)](https://osquery.readthedocs.io/en/latest/?badge=latest)\n- CII Best Practices: [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3125/badge)](https://bestpractices.coreinfrastructure.org/projects/3125)\n\n## What is osquery?\n\nosquery exposes an operating system as a high-performance relational database.  This allows you to\nwrite SQL-based queries to explore operating system data.  With osquery, SQL tables represent\nabstract concepts such as running processes, loaded kernel modules, open network connections,\nbrowser plugins, hardware events or file hashes.\n\nSQL tables are implemented via a simple plugin and extensions API. A variety of tables already exist\nand more are being written: [https://osquery.io/schema](https://osquery.io/schema/). To best\nunderstand the expressiveness that is afforded to you by osquery, consider the following SQL\nqueries:\n\nList the [`users`](https://osquery.io/schema/current#users):\n\n```sql\nSELECT * FROM users;\n```\n\nCheck the [`processes`](https://osquery.io/schema/current#processes) that have a deleted executable:\n\n```sql\nSELECT * FROM processes WHERE on_disk = 0;\n```\n\nGet the process name, port, and PID, for processes listening on all interfaces:\n\n```sql\nSELECT DISTINCT processes.name, listening_ports.port, processes.pid\n  FROM listening_ports JOIN processes USING (pid)\n  WHERE listening_ports.address = '0.0.0.0';\n```\n\nFind every macOS LaunchDaemon that launches an executable and keeps it running:\n\n```sql\nSELECT name, program || program_arguments AS executable\n  FROM launchd\n  WHERE (run_at_load = 1 AND keep_alive = 1)\n  AND (program != '' OR program_arguments != '');\n```\n\nCheck for ARP anomalies from the host's perspective:\n\n```sql\nSELECT address, mac, COUNT(mac) AS mac_count\n  FROM arp_cache GROUP BY mac\n  HAVING count(mac) \u003e 1;\n```\n\nAlternatively, you could also use a SQL sub-query to accomplish the same result:\n\n```sql\nSELECT address, mac, mac_count\n  FROM\n    (SELECT address, mac, COUNT(mac) AS mac_count FROM arp_cache GROUP BY mac)\n  WHERE mac_count \u003e 1;\n```\n\nThese queries can be:\n\n- performed on an ad-hoc basis to explore operating system state using the\n  [osqueryi](https://osquery.readthedocs.org/en/latest/introduction/using-osqueryi/) shell\n- executed via a [scheduler](https://osquery.readthedocs.org/en/latest/introduction/using-osqueryd/)\n  to monitor operating system state across a set of hosts\n- launched from custom applications using osquery Thrift APIs\n\n## Download \u0026 Install\n\nTo download the latest stable builds and for repository information\nand installation instructions visit\n[https://osquery.io/downloads](https://osquery.io/downloads/).\n\nWe use a simple numbered versioning scheme `X.Y.Z`, where X is a major version, Y is a minor, and Z is a patch.\nWe plan minor releases roughly every two months. These releases are tracked on our [Milestones](https://github.com/osquery/osquery/milestones) page. A patch release is used when there are unforeseen bugs with our minor release and we need to quickly patch.\nA rare 'revision' release might be used if we need to change build configurations.\n\nMajor, minor, and patch releases are tagged on GitHub and can be viewed on the [Releases](https://github.com/osquery/osquery/releases) page.\nWe open a new [Release Checklist](https://github.com/osquery/osquery/blob/master/.github/ISSUE_TEMPLATE/New_Release.md) issue when we prepare a minor release. If you are interested in the status of a release, please find the corresponding checklist issue, and note that the issue will be marked closed when we are finished the checklist.\nWe consider a release 'in testing' during the period of hosting new downloads on our website and adding them to our hosted repositories.\nWe will mark the release as 'stable' on GitHub when enough testing has occurred, this usually takes two weeks.\n\n## Build from source\n\nBuilding osquery from source is encouraged! Check out our [build\nguide](https://osquery.readthedocs.io/en/latest/development/building/). Also\ncheck out our [contributing guide](CONTRIBUTING.md) and join the\ncommunity on [Slack](https://join.slack.com/t/osquery/shared_invite/zt-1wipcuc04-DBXmo51zYJKBu3_EP3xZPA).\n\n## Osquery fleet managers\n\nThere are many osquery fleet managers out there. The osquery project does not endorse, recommend, or test these. They are provided as a starting point\n\n| Project                                                 | License     |\n| ------------------------------------------------------- | ----------- |\n| [Fleet](https://github.com/fleetdm/fleet)               | Open Core   |\n| [Kolide](https://www.kolide.com)                        | Commercial    |\n| [OSCTRL](https://github.com/jmpsec/osctrl)              | Open Source |\n| [Zentral](https://github.com/zentralopensource/zentral) | Open Source |\n\n## License\n\nBy contributing to osquery you agree that your contributions will be\nlicensed as defined on the LICENSE file.\n\n## Vulnerabilities\n\nWe keep track of security announcements in our tagged version release\nnotes on GitHub. We aggregate these into [SECURITY.md](SECURITY.md)\ntoo.\n\n## Learn more\n\nThe osquery documentation is available\n[online](https://osquery.readthedocs.org). Documentation for older\nreleases can be found by version number, [as\nwell](https://readthedocs.org/projects/osquery/).\n\nIf you're interested in learning more about osquery read the [launch\nblog\npost](https://code.facebook.com/posts/844436395567983/introducing-osquery/)\nfor background on the project, visit the [users\nguide](https://osquery.readthedocs.org/).\n\nDevelopment and usage discussion is happening in the osquery Slack, grab an invite\n[here](https://join.slack.com/t/osquery/shared_invite/zt-1wipcuc04-DBXmo51zYJKBu3_EP3xZPA)!\n","funding_links":["https://funding.communitybridge.org/projects/osquery"],"categories":["C++","Tools","Install from Source","\u003ca name=\"cpp\"\u003e\u003c/a\u003eC++","Challenges","Debugging \u0026 Profiling \u0026 Tracing","Parallel Systems Learning Resources","其他__大数据","Other Lists","sql","Application Recommendation","CLI Utilities","⚡ Productivity","SQL"],"sub_categories":["Live Forensics","Databases","Live forensics","For C++/C","Parallel Systems Courses \u0026 Tutorials","网络服务_其他","🛡️ DFIR:","🔒 Cybersecurity","Useful Linux Tools","Über SQL"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosquery%2Fosquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosquery%2Fosquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosquery%2Fosquery/lists"}