This repository contains essential osquery commands used for auditing a Linux system. The commands are grouped by functionality and serve as a quick reference for system monitoring, process auditing, file integrity checking, and network inspection.
- β
COMMANDS.mdβ A categorized list of SQL-likeosquerycommands used to:- Monitor system processes and memory
- Audit installed packages and kernel modules
- Inspect open network ports and socket activity
- Perform file integrity monitoring (FIM)
- Track login sessions and user activity
- Enable event-based logging
- Running processes
- Kernel version and modules
- Installed packages (Ubuntu-based)
- SUID binary detection
- Listening ports and open sockets
- Interface traffic statistics
- Gateway routing information
- Privilege escalation detection (EUID β UID)
- Process memory consumption
- Checking event-based logging status
- Listing active query packs
- Tracking file creation/modification using
file_events
osqueryinstalled on a Linux system (Ubuntu 20.04+ or 24.04 recommended)- Access to
osqueryiinteractive shell orosquerydfor scheduled queries
Clone the repository and explore the COMMANDS.md file:
git clone https://github.com/<your-username>/osquery-command-reference.git
cd osquery-command-reference
less COMMANDS.md