{"id":187,"date":"2023-11-18T09:00:00","date_gmt":"2023-11-18T09:00:00","guid":{"rendered":"http:\/\/justruss.tech\/index.php\/2023\/11\/18\/using-velociraptor-for-live-response-on-windows\/"},"modified":"2026-05-13T12:59:35","modified_gmt":"2026-05-13T12:59:35","slug":"using-velociraptor-for-live-response-on-windows","status":"publish","type":"post","link":"https:\/\/justruss.tech\/index.php\/2023\/11\/18\/using-velociraptor-for-live-response-on-windows\/","title":{"rendered":"Using Velociraptor for Live Response on Windows"},"content":{"rendered":"<p>Velociraptor is an open source endpoint visibility and DFIR platform. Unlike traditional forensic tools that require physical or remote access to pull individual artefacts, Velociraptor deploys a lightweight agent to endpoints and lets you<br \/>\ncollect artefacts, run hunts, and monitor for threats across your entire fleet simultaneously through a central server.<\/p>\n<h3>Server deployment<\/h3>\n<pre># Download latest release\nwget https:\/\/github.com\/Velocidex\/velociraptor\/releases\/latest\/download\/velociraptor-linux-amd64\n\n# Generate server config\n.\/velociraptor config generate -i\n# Interactive wizard - choose self-signed cert for lab, set bind address to 0.0.0.0\n\n# Start server\n.\/velociraptor --config server.config.yaml frontend &amp;\n\n# Create admin user\n.\/velociraptor --config server.config.yaml user add admin --role administrator<\/pre>\n<p>The GUI is available at <code>https:\/\/&lt;server-ip&gt;:8889<\/code>. Accept the self-signed cert warning in the browser.<\/p>\n<h3>Agent deployment<\/h3>\n<pre># Generate Windows MSI installer with client config embedded\n.\/velociraptor --config server.config.yaml config repack \\\n  --exe velociraptor-windows-amd64.exe client_config.yaml output.msi\n\n# On the target Windows host (admin PowerShell):\nmsiexec \/i output.msi \/quiet<\/pre>\n<p>The agent connects back to the server and appears in the GUI under Clients within about 30 seconds.<\/p>\n<h3>VQL \u2014 the query language<\/h3>\n<p>VQL is similar to SQL but designed for system introspection. Every Velociraptor capability is a VQL plugin. A basic query to list running processes:<\/p>\n<pre>SELECT Pid, Name, Exe, CommandLine, Username\nFROM pslist()\nWHERE Name =~ \"powershell\"<\/pre>\n<p>Finding persistence via scheduled tasks:<\/p>\n<pre>SELECT Name, Command, Arguments, Enabled, NextRunTime\nFROM schtasks()\nWHERE Command !~ \"^C:\\\\Windows\\\\\" AND Enabled = TRUE<\/pre>\n<p>Searching all registry run keys for anything pointing outside of Program Files or Windows:<\/p>\n<pre>SELECT Key.FullPath AS KeyPath, Name, Data.value AS Value\nFROM read_reg_key(globs=[\n    \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\**\",\n    \"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\**\"\n])\nWHERE NOT Value =~ \"^(C:\\\\Windows|C:\\\\Program Files)\"<\/pre>\n<h3>Running a fleet hunt<\/h3>\n<p>In the GUI, go to Hunt Manager, click New Hunt, and select artefacts. For initial compromise assessment on multiple hosts simultaneously, the most useful built-in artefacts are:<\/p>\n<ul>\n<li><code>Windows.System.Pslist<\/code> \u2014 running processes across all endpoints<\/li>\n<li><code>Windows.Network.Netstat<\/code> \u2014 active network connections per host<\/li>\n<li><code>Windows.Persistence.PermanentWMIEvents<\/code> \u2014 WMI-based persistence (missed by most checklist-based IR)<\/li>\n<li><code>Windows.Forensics.Prefetch<\/code> \u2014 execution history from Prefetch files<\/li>\n<li><code>Windows.EventLogs.Evtx<\/code> \u2014 targeted event log collection with time range filter<\/li>\n<\/ul>\n<p>A hunt across 100 endpoints for all of these typically completes in under 3 minutes. The results are queryable with VQL across the combined dataset.<\/p>\n<h3>Collecting a specific file from all hosts<\/h3>\n<pre># Hunt to collect NTUSER.DAT from all endpoints for offline analysis\nSELECT OSPath, Size, Mtime\nFROM glob(globs=\"C:\/Users\/*\/NTUSER.DAT\")\nWHERE Size &gt; 0<\/pre>\n<p>Add a file upload step and Velociraptor will stream the files back to the server automatically. No manual collection needed per host.<\/p>\n<h3>Memory analysis integration<\/h3>\n<p>Velociraptor can trigger a memory acquisition and ship it directly to the server:<\/p>\n<pre>SELECT * FROM Artifact.Windows.Memory.Acquisition(\n    Destination=\"C:\/Windows\/Temp\/mem.dmp\"\n)<\/pre>\n<p>Then collect the file through a separate upload artefact. From there, Volatility analysis can be done offline against the collected image.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Velociraptor is free, fast, and genuinely useful for rapid triage. A<br \/>\nwalkthrough of setting it up and collecting artefacts from a simulated compromised host.<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-187","post","type-post","status-publish","format-standard","hentry","category-dfir"],"_links":{"self":[{"href":"https:\/\/justruss.tech\/index.php\/wp-json\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/justruss.tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/justruss.tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/justruss.tech\/index.php\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":2,"href":"https:\/\/justruss.tech\/index.php\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"predecessor-version":[{"id":229,"href":"https:\/\/justruss.tech\/index.php\/wp-json\/wp\/v2\/posts\/187\/revisions\/229"}],"wp:attachment":[{"href":"https:\/\/justruss.tech\/index.php\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/justruss.tech\/index.php\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/justruss.tech\/index.php\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}