LogScale Queries
SebastianSE

Contributor

Sebastian

@sebastian

168 published items

Queries

150 items

query.txt
// use @ingesttimestamp for weekday and hour
| formatTime(format="%A", field="@ingesttimestamp", as="weekday")
| formatTime(format="%k", field="@ingesttimestamp", as="hour")
// set notification day

Use the event ingestion timestamp to limit query results to a defined notification window. Configure the allowed weekdays and hours to ensure alerts run only during the intended period, such as business hours. To alert outside that window instead, invert the in() and test() conditions.

LogScaleDetection & MonitoringDetectionInvestigation

@sebastian · 20.8.2026

query.txt
in(field="#windows.EventID", values=[4732,4728,4756,4729,4733,4757])
| day := formatTime(format="%Y-%m-%d", field=@timestamp, timezone="Europe/Berlin")
| rename(field="windows.EventData.TargetUserName", as="group")
| groupBy([day, group], function=count())

Aggregate Active Directory group membership additions and removals into a daily count by group for compliance reporting and anomaly baselining. Keep the timezone aligned with your investigation queries. Source: the blog article “5 LogScale queries to audit Active Directory group changes” — https://it-selig.de/blog/logscale-queries-ad-group-changes

LogScaleComplianceActiveDirectoryComplianceMonitoring+1

@sebastian · 2.8.2026

query.txt
in(field="#windows.EventID", values=[4732,4728,4756,4729,4733,4757])
| windows.EventData.SubjectUserName=/^(svc_|sa_|srv_)/i

// only show during office hours, when automation should be idle

Find group membership changes made by service accounts during the period when their automation should be idle. Adapt the account-name regex, office-hour window, and IANA timezone to match your conventions. Source: the blog article “5 LogScale queries to audit Active Directory group changes” — https://it-selig.de/blog/logscale-queries-ad-group-changes

LogScaleDetection & MonitoringActiveDirectoryDetectionMonitoring+1

@sebastian · 2.8.2026

query.txt
in(field="#windows.EventID", values=[4732,4728,4756])
| test(windows.EventData.MemberSid == windows.EventData.SubjectUserSid)

// format the table

Find Active Directory group additions where the requesting account and the added member share the same SID. These rare self-additions are a high-signal escalation pattern worth investigating. Source: the blog article “5 LogScale queries to audit Active Directory group changes” — https://it-selig.de/blog/logscale-queries-ad-group-changes

LogScaleDetection & MonitoringActiveDirectoryDetectionWindows

@sebastian · 2.8.2026

query.txt
in(field="#windows.EventID", values=[4732,4728,4756,4729,4733,4757])
| case {
in(field="#windows.EventID", values=[4732,4728,4756]) | action:= "added";
in(field="#windows.EventID", values=[4733,4729,4757]) | action:= "removed";

Focus on additions and removals in a configurable list of privileged Active Directory groups outside local business hours. Adjust the group names, office-hour window, and IANA timezone for your environment. Source: the blog article “5 LogScale queries to audit Active Directory group changes” — https://it-selig.de/blog/logscale-queries-ad-group-changes

LogScaleDetection & MonitoringActiveDirectoryDetectionMonitoring+1

@sebastian · 2.8.2026

query.txt
in(field="#windows.EventID", values=[4732,4728,4756,4729,4733,4757])
| case {
	in(field="#windows.EventID", values=[4732,4728,4756]) | action:= "added";
	in(field="#windows.EventID", values=[4733,4729,4757]) | action:= "removed";

Show every addition to and removal from Active Directory global, local, and universal groups. Use it to investigate a time window or confirm that Windows Security group-membership events are reaching LogScale. Source: the blog article “5 LogScale queries to audit Active Directory group changes” — https://it-selig.de/blog/logscale-queries-ad-group-changes

LogScaleInvestigation & TroubleshootingActiveDirectoryInvestigationMonitoring+1

@sebastian · 2.8.2026

query.txt
#event_simpleName=UserLogon
| UserName!=/^DWM-/i
| UserName!=/^UMFD-/i
| UserName!=/^Lokaler Dienst/i

This query shows endpoint login events collected from corporate Windows laptops throughout the day. The log data includes device identifiers, hardware information, usernames, and login timestamps, providing visibility into user authentication activity across the managed workstation fleet. You can also exclude additional usernames. This query is based on the Falcon Data Replicator repository.

LogScaleInfrastructureAuthenticationEndpointInvestigation

@sebastian · 2.8.2026

query.txt
// Get ReflectiveDotnetModuleLoad with non-null ManagedPdbBuildPath field.
#event_simpleName=ReflectiveDotnetModuleLoad event_platform=Win ManagedPdbBuildPath!=""

// Capture FilePath and FileName Fields

Community LogScale query imported from CrowdStrike/logscale-community-content. Source file: Queries-Only/Helpful-CQL-Queries/Hunt PBD File Paths in Reflective .net Module Loads.md. Origin URL: https://github.com/CrowdStrike/logscale-community-content/blob/main/Queries-Only/Helpful-CQL-Queries/Hunt%20PBD%20File%20Paths%20in%20Reflective%20.net%20Module%20Loads.md

LogScaleInvestigation & TroubleshootingDetectionEndpointInvestigation+2

@sebastian · 25.7.2026

query.txt
// Get OsVersionInfo events; sent by sensor every 24-hours or at sensor start or update
#event_simpleName=OsVersionInfo
 
// Narrow search to only include Linux, Container, and K8 systems

The query below will look for Linux systems (Linux, K8, Containers) that need to be updated against CVE-2025-1146. The query is based on the event OsVersionInfo which is generated every 24-hours, at sensor start, or at sensor update. It attempts to merge in LogonType 2 and 10 to determine the last logged on user.

LogScaleDetection & MonitoringAuthenticationDetectionEndpoint+2

@sebastian · 25.7.2026

query.txt
// Get OsVersionInfo events; sent by sensor every 24-hours or at sensor start or update
#event_simpleName=OsVersionInfo
 
// Narrow search to only include Linux, Container, and K8 systems

The query below will look for Linux systems (Linux, K8, Containers) that need to be updated against CVE-2025-1146. The query is based on the event OsVersionInfo which is generated every 24-hours, at sensor start, or at sensor update.

LogScaleDetection & MonitoringDetectionEndpointKubernetes+1

@sebastian · 25.7.2026

query.txt
// Read in AID Master file; REMINDER: this file updates every 4 hours.
| readFile("aid_master_main.csv")
 
// Narrow search to only include Linux, Container, and K8 systems

The query below will look for Linux systems (Linux, K8, Containers) that need to be updated against CVE-2025-1146. The query is based on the lookup file aid_master_main.csv which is automatically updated every 4 hours.

LogScaleDetection & MonitoringDetectionKubernetesLinux

@sebastian · 25.7.2026

Show all 150 queries

Parsers

1 item

parser.yaml
name: unifi
description: >-
  universal envelope for UniFi Syslog events. Maps Facility/Severity
  from the Syslog PRI (using in(priority, values=[...]), not arithmetic functions:

Parses UniFi Syslog from Dream Machine, access points, and switches into structured fields for Wi-Fi, DHCP, DNS, gateway, and audit analysis. Set up the export first: [[howto:Forward UniFi Syslog to a Remote Server]]. Dashboards using this parser: [[dashboard:UniFi Basics]], [[dashboard:UniFi Security & Audit]], [[dashboard:UniFi Wi-Fi Quality]], and [[dashboard:UniFi Gateway Health]].

ParserAuthenticationFirewallLinux

@sebastian · 10.8.2026

Dashboards

4 items

How-tos

13 items

Add logging to an existing Python script with LogScale

Add structured logging to Python scripts using the standard library, direct HTTPS or local JSON Lines, collector delivery, and verification.

How-toInfrastructureLinuxMonitoringWindows

@sebastian · 13.9.2026

Add logging to an existing PowerShell script with LogScale

Add structured logging to PowerShell scripts with direct HTTPS or local JSON Lines, collector delivery, retention, and LogScale verification.

How-toInfrastructureMonitoringWindows

@sebastian · 13.9.2026

Ingest an existing log file with LogScale Collector

Send existing text logs and JSON Lines to LogScale with the Falcon LogScale Collector, configure parsers, and verify fields and timestamps.

How-toInfrastructureLinuxMonitoringWindows

@sebastian · 13.9.2026

Add logging to an existing Bash script with LogScale

Add structured logging to Bash scripts on Linux with direct HTTPS or local JSON Lines, collector delivery, retention, and LogScale verification.

How-toInfrastructureLinuxMonitoring

@sebastian · 13.9.2026

Choose a LogScale ingest path for scripts, files, and syslog

Choose the right LogScale ingest path for PowerShell, Bash, Python, existing log files, or syslog, then follow the matching setup guide.

How-toInfrastructureLinuxMonitoringNetwork+1

@sebastian · 13.9.2026

Stream Defender XDR events to LogScale through Azure Event Hubs

Send selected Microsoft Defender XDR Advanced Hunting events to Azure Event Hubs and validate a Falcon LogScale Azure Ingest Feed in a test environment.

How-toMicrosoftAzureEndpointMicrosoft 365+1

@sebastian · 13.9.2026

Install LogScale Collector on Windows

Step-by-step guide to get the LogScale Collector running as a Windows service, enrolled in Fleet Management, and shipping Windows Event Logs.

How-toOnboardingWindows

@sebastian · 24.8.2026

Install LogScale Archive with Docker Compose

Install LogScale Archive on a Linux host, connect one read-only LogScale repository, and verify that scheduled query results are stored locally.

How-toComplianceComplianceInvestigationMonitoring

@sebastian · 16.8.2026

LogScale Troubleshooting Guide

A living LogScale troubleshooting guide with evidence-led checks for ingestion, repository errors, timestamps, and future cases.

How-toTroubleshootingInvestigationMonitoringTroubleshooting

@sebastian · 15.8.2026

Forward UniFi Syslog to a Remote Server

Configure UniFi Network to export selected system logs as CEF to a remote syslog or SIEM server, then verify that the receiver gets usable events.

How-toNetwork & SecurityMonitoringNetworkTroubleshooting

@sebastian · 10.8.2026

Build a Multi-Repository Syslog Server with LogScale Collector

Run LogScale Collector as a syslog server, map separate listeners to repository-specific ingest tokens, and understand source settings that control delivery.

How-toInfrastructureMonitoringNetworkTroubleshooting

@sebastian · 10.8.2026

LogScale Repository vs. View: When to Use Each

Learn when LogScale repositories define real data boundaries and when views provide the right scoped search workspace without copying data.

How-toInfrastructureComplianceInvestigationMonitoring

@sebastian · 10.8.2026

Show all 13 how-tos