Velociraptor: Endpoint Forensics at Scale
Velociraptor is an open-source endpoint visibility tool that lets you run forensic queries across thousands of systems simultaneously. The difference between Velociraptor and EDR: EDR collects telemetry continuously; Velociraptor goes looking for specific evidence when you have a question to answer.
An IOC arrives from threat intel: a specific DLL filename and its SHA256 hash, associated with a supply chain attack that is actively compromising organizations in your sector. You need to know immediately: is this file present anywhere in your environment? You have 4,000 Windows endpoints. Without Velociraptor, you have two options: ask your IT team to script a manual check and wait 48 hours, or search your EDR console for the hash hoping the file was seen in the telemetry window. With Velociraptor, you write a VQL query and get an answer across all 4,000 endpoints in under 10 minutes.
What Velociraptor Is and How It Works
Velociraptor is not a SIEM and not an EDR. It is a targeted forensic investigation tool that runs queries against live endpoint state on demand. The architecture is a server-client model: a central Velociraptor server communicates with lightweight agents deployed on endpoints.
Velociraptor Architecture
══════════════════════════════════════════════════════════════════════
Analyst workstation
(Velociraptor GUI or VQL query editor)
│
│ HTTPS (mutual TLS)
▼
Velociraptor Server
├── GUI (web interface at :8889)
├── Frontend (client communication at :8000)
├── API server (programmatic access)
└── Data store (local filesystem or cloud)
│
│ Long-polling HTTPS connection
│ (agents poll server for tasks ~10s interval)
├────────────┬────────────┬────────────┐
▼ ▼ ▼ ▼
ENDPOINT-001 ENDPOINT-002 ENDPOINT-003 ...4000 more
Windows agent Windows agent Linux agent
~10MB binary ~10MB binary ~10MB binary
When analyst submits a hunt (fleet-wide query):
Server stores the hunt task
Each endpoint agent picks up the task on next poll (~10s)
Agent runs the VQL query locally on the endpoint
Results stream back to server as they complete
Analyst sees results appearing in real time in the GUI
Key: the query runs ON the endpoint, not on a log stream.
This means Velociraptor can access current state — running
processes, file system, registry, memory artifacts, network
connections — that is NOT in the SIEM because it wasn't logged.
VQL: Velociraptor Query Language
VQL (Velociraptor Query Language) is the query language for Velociraptor. It is SQL-like but operates against forensic data sources rather than database tables. Every forensic artifact available on an endpoint — file system, registry, process list, event logs, memory — is accessible as a VQL source.
VQL Anatomy
══════════════════════════════════════════════════════════════════════
Basic structure:
SELECT [fields] FROM [artifact or plugin]
WHERE [filter conditions]
Examples:
1. Find a specific file by SHA256 across the entire filesystem:
─────────────────────────────────────────────────────────────────
SELECT FullPath, Size, Mtime, hash(path=FullPath, hashselect="SHA256")
FROM glob(globs="C://**/*", accessor="file")
WHERE hash(path=FullPath, hashselect="SHA256").SHA256 =
"a3b4c5d6e7f8..."
(More efficient version: limit to executable paths first,
then hash check — full filesystem hash scan is slow)
2. List all running processes with unusual characteristics:
─────────────────────────────────────────────────────────────────
SELECT Pid, Ppid, Name, Exe, CommandLine,
Username, CreateTime
FROM pslist()
WHERE NOT Exe =~ "^C:\\Windows\\" AND
NOT Exe =~ "^C:\\Program Files\\"
ORDER BY CreateTime DESC
3. Check for persistence in common autorun locations:
─────────────────────────────────────────────────────────────────
SELECT * FROM Artifact.Windows.Sys.StartupItems()
4. Find recently modified executables (last 7 days):
─────────────────────────────────────────────────────────────────
SELECT FullPath, Size, Mtime, Atime, Ctime
FROM glob(globs="C:/**/*.exe", accessor="file")
WHERE Mtime > now() - 7 * 86400
ORDER BY Mtime DESC
5. Search event log for specific Event ID with time range:
─────────────────────────────────────────────────────────────────
SELECT EventTime, EventID, UserData
FROM parse_evtx(filename="C:/Windows/System32/winevt/Logs/Security.evtx")
WHERE EventID = 4625 -- Failed logon
AND EventTime > "2026-09-01"
ORDER BY EventTime DESC
LIMIT 100
Artifacts: Pre-Built Investigation Modules
Velociraptor ships with hundreds of built-in artifacts — pre-written VQL queries wrapped with metadata, parameters, and descriptions. Rather than writing VQL from scratch for common tasks, you select the appropriate artifact, configure its parameters, and deploy it. This is how most incident response use of Velociraptor works in practice.
| Artifact name | What it does | Common IR use |
|---|---|---|
| Windows.System.Pslist | Lists all running processes with path, arguments, and parent | Initial triage — identify unusual processes after compromise alert |
| Windows.Sys.StartupItems | Enumerates all persistence mechanisms: Run keys, startup folders, scheduled tasks, services | Persistence hunting during IR; confirming attacker established persistence |
| Windows.EventLogs.Evtx | Parses Windows Event Log files, queryable by Event ID and time range | Authentication events (4624/4625/4648), account changes (4720/4722), process creation (4688) |
| Windows.Search.FileFinder | Finds files matching name/extension/hash pattern on filesystem | IOC hash hunt: "Is this known malware file present anywhere?" |
| Windows.Sys.Services | Lists all installed Windows services with paths and state | Malicious service detection; persistence verification |
| Windows.Network.Netstat | Lists active network connections with associated processes | Identify active C2 connections during live response |
| Windows.Memory.ProcessDump | Dumps memory of a specific process | Credential extraction, process injection analysis |
| Generic.Forensic.SQLiteHunter | Parses SQLite databases: browser history, credential stores | Browser artifact collection during insider threat or BEC investigation |
| Windows.NTFS.MFT | Parses the NTFS Master File Table | File timeline analysis; find files created/modified during attacker dwell time |
| Windows.Carving.Evtx | Carves deleted event log records from disk | Log clearing recovery — find events that were cleared by the attacker |
Fleet-Wide Hunts
A Velociraptor hunt is the deployment of an artifact to all enrolled endpoints simultaneously. This is the capability that makes Velociraptor uniquely valuable during IR: the ability to answer a question across thousands of systems in minutes, rather than waiting for log aggregation or manual investigation.
Creating and Running a Hunt
══════════════════════════════════════════════════════════════════════
GUI Workflow:
1. Navigate to "Hunts" → "+ New Hunt"
2. Set:
Name: descriptive name ("IOC Hunt - QakBot hash 2026-09-24")
Artifacts: select artifact(s) to run
Parameters: configure artifact-specific parameters
(e.g., target hash for FileFinder,
event ID range for EventLogs)
Collection conditions: All hosts / Windows hosts / specific labels
Resource limits:
Max rows: 10000 (prevents a hung query from collecting 10M rows)
CPU usage limit: 50% (prevents impacting endpoint performance)
Timeout per collection: 600 seconds
3. Start hunt → agents collect on next poll (≤10s)
4. Monitor progress: GUI shows completed/running/error count in real time
5. Results: download as CSV/JSON, or query in VQL notebook
Timeline:
Single artifact, simple query, 500 endpoints:
→ Results start appearing in ~1 minute
→ 90% complete in ~5 minutes
→ 100% complete in ~15 minutes (accounting for slow/offline hosts)
Multi-artifact, complex query, 4000 endpoints:
→ Budget 30-60 minutes for full completion
Offline hosts:
Agents that are offline when hunt starts will collect
when they next come online and poll the server.
Results arrive late but are included in the hunt.
Offline Collector: IR for Isolated Systems
During containment, compromised hosts are isolated from the network — which means the Velociraptor agent can no longer communicate with the server. Velociraptor's offline collector solves this: a self-contained binary that runs on an isolated host, collects specified artifacts, and writes output to a local encrypted file. You copy the file to a USB drive and import results into Velociraptor for analysis.
Offline Collector Workflow
══════════════════════════════════════════════════════════════════════
1. BUILD THE COLLECTOR (on the Velociraptor server, before deployment):
GUI → Server Artifacts → Generic.Utils.FetchBinary → Offline Collector
Select artifacts to include in the collection
Set encryption passphrase for output file
Download: Collector_Windows_amd64.exe (~30-50MB self-contained binary)
2. DEPLOY TO ISOLATED HOST:
Copy Collector_Windows_amd64.exe to USB drive
Plug USB into isolated host
Run: Collector_Windows_amd64.exe --timeout 600
Output: collection__.zip (encrypted)
Copy .zip back to USB drive
3. IMPORT INTO VELOCIRAPTOR:
GUI → Server Artifacts → Server.Utils.ImportCollection
Upload the .zip file with the passphrase
Results appear as a client collection in the GUI
Full VQL analysis available on the imported data
4. ARTIFACTS TO INCLUDE IN OFFLINE COLLECTOR FOR STANDARD IR:
Windows.System.Pslist (running processes)
Windows.Sys.StartupItems (persistence)
Windows.Network.Netstat (network connections)
Windows.NTFS.MFT (file timeline)
Windows.EventLogs.Evtx (event logs - specify key logs)
Windows.Sys.Services (services)
Windows.Search.FileFinder (specific IOC paths/hashes)
Windows.Memory.ProcessDump (if specific process is suspect)
Windows.Timeline.Prefetch (program execution timeline)
EDR platforms provide continuous telemetry — they record events as they happen and send them to a cloud data lake for querying. This is powerful for detection, but has limitations for forensics: the EDR only has what it was looking for. If a specific artifact type wasn't in the EDR's collection policy, it's not in the data lake. If the log retention window is 30 days and the attacker was present for 90 days, 60 days of evidence is gone. And EDR telemetry is event-based — it can't tell you about the current state of the system. Velociraptor is the opposite: it queries current live state on demand. You choose what to collect at investigation time, not at deployment time. This means Velociraptor can retrieve artifacts that weren't in your EDR collection policy, can scan for specific IOCs that weren't known when the EDR was configured, and can answer questions about the current filesystem, registry, and process state of a live system. The two tools are complementary: EDR for continuous detection, Velociraptor for targeted forensic investigation.
Q & A
Q: You suspect an attacker used a LOLBin (Living Off the Land Binary) — specifically wmic.exe — to execute commands during the intrusion. How would you use Velociraptor to find evidence of wmic.exe abuse?
Multiple artifact approaches, each covering different evidence sources: (1) Process execution history via event logs: run Windows.EventLogs.Evtx targeting Security.evtx and Sysmon.evtx for Event ID 4688 (process creation) or Sysmon Event ID 1 (process create), filtered to Image containing "wmic.exe" and your time window of interest. This shows command-line arguments — critical for LOLBin abuse where the arguments reveal what wmic.exe was called to do. (2) Prefetch analysis: Windows Prefetch records the last 8 execution times for each executable. Run Windows.Timeline.Prefetch and look for WMIC.EXE-
Q: You want to hunt for lateral movement across your fleet. What VQL queries or artifacts would you use?
Lateral movement hunting is a multi-signal operation. The most effective approach combines several artifact types: (1) Authentication events: Windows.EventLogs.Evtx on all endpoints, Event ID 4624 (successful logon), filtered to Logon Type 3 (network logon) — this shows which accounts authenticated to which machines via the network and when. Cross-reference login times against normal business hours and the known attacker dwell window. (2) Admin share usage: Event ID 5140 (a network share was accessed) filtered to share name \\
Q: An analyst asks why you use Velociraptor instead of just running PowerShell scripts via your RMM (Remote Monitoring and Management) tool. What's the substantive difference?
Several substantive differences that matter for IR: (1) Forensic methodology: Velociraptor uses forensically sound access patterns. For filesystem access it can read files locked by the OS that PowerShell cannot (VSS shadow copies, NTFS-locked files, MFT access without going through the filesystem driver). For evidence integrity, every Velociraptor collection includes a cryptographic hash of the collected artifacts — you can prove the evidence was not modified after collection. PowerShell scripts via RMM provide none of this. (2) Scale and parallelism: Velociraptor is purpose-built for fleet-wide concurrent queries. Your RMM can run PowerShell scripts at scale, but Velociraptor's result streaming, progress monitoring, and automatic handling of offline/slow endpoints is significantly better for IR use cases. (3) Analyst visibility: Velociraptor's GUI provides real-time result streaming, VQL notebook for analysis, and export functions designed for IR use. Analyzing results from RMM PowerShell output requires building your own analysis pipeline. (4) Evidence preservation: Velociraptor retains all collection results on the server with timestamps and metadata, creating an auditable evidence record. RMM script output is often ephemeral. (5) That said — PowerShell via RMM is fine for specific targeted checks when you know exactly what you're looking for and the forensic formality isn't required. Velociraptor is the right tool when the investigation has legal or regulatory stakes, when you need fleet-wide coverage, or when you need forensic artifact types that require raw NTFS access.