Library
Command reference
Search the live database for syntax, tools, use cases, tags, MITRE context, and safe lab-ready command examples.
Defensive
Intermediate
Free
Query running process inventory.
Query running process inventory.
osqueryi "select name,path,pid from processes limit 10;"
osquery
endpoint-security
expanded-library
Osquery / Endpoint Security
Open
Defensive
Intermediate
Free
Find unusual listening ports.
Find unusual listening ports.
osqueryi "select * from listening_ports where port not in (80,443,22);"
osquery
endpoint-security
expanded-library
Osquery / Endpoint Security
Open
Defensive
Intermediate
Free
Review local users.
Review local users.
osqueryi "select username,description from users;"
osquery
endpoint-security
expanded-library
Osquery / Endpoint Security
Open
Defensive
Intermediate
Free
Inventory installed software.
Inventory installed software.
osqueryi "select name,version from programs order by name;"
osquery
endpoint-security
expanded-library
Osquery / Endpoint Security
Open
Defensive
Intermediate
Free
Review startup persistence entries.
Review startup persistence entries.
osqueryi "select * from startup_items;"
osquery
endpoint-security
expanded-library
Osquery / Endpoint Security
Open
Defensive
Intermediate
Free
Show logged-in user sessions.
Show logged-in user sessions.
osqueryi "select * from logged_in_users;"
osquery
endpoint-security
expanded-library
Osquery / Endpoint Security
Open
Defensive
Intermediate
Free
Review endpoint interface addresses.
Review endpoint interface addresses.
osqueryi "select address,mac,interface from interface_addresses;"
osquery
endpoint-security
expanded-library
Osquery / Endpoint Security
Open
Defensive
Intermediate
Free
Inspect certificates matching organization hints.
Inspect certificates matching organization hints.
osqueryi "select * from certificates where common_name like '%corp%';"
osquery
endpoint-security
expanded-library
Osquery / Endpoint Security
Open
Defensive
Intermediate
Free
Review scheduled cron entries.
Review scheduled cron entries.
osqueryi "select * from crontab;"
osquery
endpoint-security
expanded-library
Osquery / Endpoint Security
Open
Defensive
Intermediate
Free
Hash a system binary.
Hash a system binary.
osqueryi "select path,sha256 from hash where path='/bin/bash';"
osquery
endpoint-security
expanded-library
Osquery / Endpoint Security
Open