osquery Templates

Selection of osquery rules for use as guides or templates

UAC_disabled

-- platform: windows
-- description: Controls UAC. A setting of 0 indicates that UAC is disabled.
SELECT * 
FROM registry 
WHERE path='HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA' AND data=0;

Windows Update history

-- platform: windows
-- description: List Windows Update history.
select title, datetime(date, 'unixepoch', 'localtime')
from windows_update_history;

Registry Run entries

-- platform: windows
-- description: List startup entries under Run keys.
select *
from registry
where key like
'HKEY_USERS\%\SOFTWARE\Microsoft\Windows\CurrentVersion\Run'
or key like 'HKEY_USERS\%\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce'
or key like 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run%\%'; 

Services that start automatically

Unusual Cron entries

Launched items not signed by Apple

Processes running no binary on the disk

Scheduled Task with Temp path reference

List all local Users

List logged users

List users with Administrative privileges

Check the security status of the system

List processes running from CMD (with hash value)

Last updated

Was this helpful?