[Osquery_manager] Services artifacts saved queries #15892
+419
−71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Services Artifact
Comprehensive service enumeration queries providing visibility across Windows, macOS, and Linux platforms. These queries enable security teams to detect persistence mechanisms, unauthorized service installations, and suspicious service configurations.
Read: https://p.elstc.co/paste/0gPw5JHV#cM0QG6ZyOjx9O1b3Fs8ZR-U2pcAKUkPaJn9drdjE6PP
Core Forensic Artifacts Coverage
Queries by Platform
🪟 Windows - Comprehensive Services Enumeration with Risk Scoring
Description
Detects suspicious Windows services with comprehensive risk scoring (0-100). Identifies services in user-writable directories, unsigned/untrusted binaries, ServiceDLL hijacking, failure command persistence, and privilege escalation patterns.
Risk Scoring Methodology:
Detection Focus:
Result
Platform
windowsInterval
3600seconds (1 hour)Query ID
services_windows_elasticECS Field Mappings
service.name→nameservice.state→statusservice.type→start_typeprocess.executable→pathuser.name→user_accountfile.hash.md5→md5file.hash.sha256→sha256file.code_signature.subject_name→cert_subjectfile.code_signature.status→signature_statusfile.code_signature.trusted→cert_trustedevent.risk_score→risk_scoreevent.severity→risk_levelSQL Query
🍎 macOS - Launchd Services Enumeration
Description
Parse launchd services on macOS systems. Provides visibility into launchd service agents and daemons including service identification, configuration state, program executable paths, and execution context.
Detection Focus:
Results
Platform
darwin(macOS)Interval
3600seconds (1 hour)Query ID
services_launchd_darwin_elasticECS Field Mappings
service.name→labelfile.path→pathprocess.executable→programuser.name→usernamegroup.name→groupnameSQL Query
🐧 Linux - Systemd Services Enumeration
Description
Parse systemd services on Linux systems. Provides visibility into systemd service units including load state, activation state, sub-state details, and enablement status.
Detection Focus:
Result
Platform
linuxInterval
3600seconds (1 hour)Query ID
services_systemd_linux_elasticECS Field Mappings
service.name→idservice.state→active_statefile.path→fragment_pathSQL Query
Use Cases