[Osquery_manager] LNK artifacts saved query #16059
Open
+179
−8
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.
Windows LNK Forensics Artifact
Detects suspicious Windows LNK (shortcut) files in critical persistence locations with advanced pattern detection and shellbags enrichment. Focuses on risky executables, malicious command-line arguments, download cradles, and UNC path abuse in Startup folders and Public Desktop locations.
Read: https://p.elstc.co/paste/5zrvrCXl#WOQWWEj62EM0utP1pyuZg4gejeGCKCWGJqVy0YbBPjB
Core Forensic Artifacts Coverage Table
Queries by Platform
🪟 Windows - LNK Shortcut File Forensics with Suspicious Pattern Detection
Description
Collects and analyzes Windows LNK (shortcut) files from critical system-wide persistence locations and public areas. This query enriches LNK file metadata with shellbags registry data to correlate shortcut targets with Windows Explorer directory access patterns. It implements multi-layered detection focusing on persistence mechanisms, risky executable targets, and malicious command-line patterns.
Risk Scoring Methodology:
The query implements binary flag-based detection across multiple threat vectors:
Detection Focus:
Result
This query returns LNK files with suspicious characteristics, including full file metadata, cryptographic hashes, target executable paths, command-line arguments, and correlated shellbags data. Binary flags indicate specific threat indicators for rapid triage.
Platform
windowsInterval
3600seconds (1 hour)Query ID
lnk_forensics_windows_elasticECS Field Mappings
file.path→pathfile.name→filenamefile.directory→directoryfile.size→sizefile.created→btimefile.mtime→mtimefile.accessed→atimefile.ctime→ctimefile.type→typefile.hash.md5→md5file.hash.sha1→sha1file.hash.sha256→sha256file.extension→extensionprocess.executable→shortcut_target_pathprocess.command_line→combined_commanduser.id→shellbags_sidregistry.path→shellbags_sourceSQL Query
MITRE ATT&CK Coverage
Tags
forensics,persistence,lateral-movement,user-activity,file-analysis,malware-detection,command-and-control