<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Playbooks on Velociraptor - Digging deeper!</title>
    <link>https://www.velociraptor-docs.org/training/playbooks/</link>
    <description>Recent content in Playbooks on Velociraptor - Digging deeper!</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 05 Apr 2026 21:33:56 +1000</lastBuildDate>
    <atom:link href="https://www.velociraptor-docs.org/training/playbooks/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Finding Files</title>
      <link>https://www.velociraptor-docs.org/training/playbooks/finding_files/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://www.velociraptor-docs.org/training/playbooks/finding_files/</guid>
      <description>&lt;h2 id=&#34;scenario&#34;&gt;Scenario&lt;/h2&gt;&#xA;&lt;p&gt;One of the most common operations in DFIR is searching for files&#xA;efficiently. When searching for a file, we may search by filename,&#xA;file content, size or other properties.&lt;/p&gt;&#xA;&lt;h2 id=&#34;main-takeaways&#34;&gt;Main takeaways&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;This technique can be used to find files on the endpoint.&lt;/li&gt;&#xA;&lt;li&gt;Turning this into a hunt can search for a file across the entire fleet in minutes.&lt;/li&gt;&#xA;&lt;li&gt;You can transfer the content of the file or just detect its presence.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;steps-to-take&#34;&gt;Steps to take&lt;/h2&gt;&#xA;&lt;p&gt;The most common artifacts to use are:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;Windows.Search.FileFinder&lt;/code&gt; or &lt;code&gt;Linux.Search.FileFinder&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Windows.NTFS.MFT&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;more-details&#34;&gt;More details&lt;/h2&gt;&#xA;&lt;p&gt;The &lt;code&gt;Windows.Search.FileFinder&lt;/code&gt; is the Swiss army knife of file&#xA;searching.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;  &#xA;  &#xA;  &#xA;  &#xA;  &#xA;  &#xA;&lt;figure&gt;&#xA;  &lt;div class=&#34;figure&#34;&gt;&#xA;    &lt;img src=&#34;https://www.velociraptor-docs.org/training/playbooks/finding_files//training/playbooks/finding_files/file_finder_.svg&#34; alt=&#34;The File Finder artifact&#34;&#xA;         class=&#34;inline&#34;&#xA;         height=&#34;797&#34;&#xA;         width=&#34;1496.0949868073878&#34;  /&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;figcaption&gt;&#xA;    &lt;a class=&#34;image-link&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&#xA;       href=&#34;file_finder.svg&#34;&gt;&lt;i class=&#34;fa fa-download&#34;&gt;&lt;/i&gt;&lt;/a&gt;&#xA;    The File Finder artifact&#xA;  &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;You can use the &lt;code&gt;File Finder&lt;/code&gt; artifacts to find files by several criteria:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;File names: Adding one or more Glob expressions (i.e. expressions&#xA;with wildcards) will search for files by name.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;In addition to the filename, you can restrict the file by times -&#xA;by adding a time box (before and after times), only files with any&#xA;of their timestamps inside the time box will be selected.&lt;/p&gt;&#xA;&lt;p&gt;This allows us to restrict questions to &amp;ldquo;only files added in the past week&amp;rdquo;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;You can search file content by adding a Yara rule. Yara is a simple&#xA;matching language allowing sophisticated search expressions.&lt;/p&gt;&#xA;&lt;p&gt;By pressing &lt;code&gt;?&lt;/code&gt; inside the Yara editor, Velociraptor will suggest a&#xA;Yara template you can use to get started.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;img class=&#34;inline&#34;&#xA;     src=&#34;https://www.velociraptor-docs.org/training/playbooks/finding_files/yara_rule.png&#34;&#xA;     width=&#34;1222&#34;&#xA;     height=&#34;196&#34;/&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;/p&gt;&#xA;&lt;ol start=&#34;4&#34;&gt;&#xA;&lt;li&gt;Matching files can be uploaded to the server. NOTE: This may&#xA;generate a lot of traffic so it is only suitable for a small number&#xA;of very targeted matches. Alternatively simply calculate the hash&#xA;of matching files.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The artifact also supports Windows Volume Shadow Copies, if&#xA;available. Velociraptor will automatically deduplicate VSS so only a&#xA;single file match will be reported, even if the same file exists in&#xA;multiple VSS snapshots - unless the file is changed between them.&lt;/p&gt;&#xA;&#xA;&lt;div class=&#34;mynotices tip&#34;&gt;&#xA;  &lt;div heading=&#34; Searching the registry &#34;&gt;&lt;p&gt;Although the artifact is named &lt;code&gt;File Finder&lt;/code&gt;, the artifact can also be&#xA;used to search for registry keys and values. This is because&#xA;Velociraptor accesses files by way of an &lt;code&gt;accessor&lt;/code&gt;. The accessor&#xA;abstracts access for files and file-like objects.&lt;/p&gt;&#xA;&lt;p&gt;In Velociraptor the &lt;code&gt;registry&lt;/code&gt; accessor makes the registry appear as a&#xA;filesystem: Registry keys appear as directories and Registry Values&#xA;appear as Files (with binary content).&lt;/p&gt;&#xA;&lt;p&gt;This allows the File Finder to search the registry as well - simply&#xA;change the &lt;code&gt;Accessor&lt;/code&gt; option from &lt;code&gt;auto&lt;/code&gt; to &lt;code&gt;registry&lt;/code&gt; to search the&#xA;registry. Remember, top level directory is the registry hive, for&#xA;example &lt;code&gt;HKLM&lt;/code&gt;, or &lt;code&gt;HKEY_LOCAL_MACHINE&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;&lt;h3 id=&#34;example-detect-persistence&#34;&gt;Example: Detect persistence&lt;/h3&gt;&#xA;&lt;p&gt;Office executables like &lt;code&gt;WINWORD.exe&lt;/code&gt; look for &lt;code&gt;AI.exe&lt;/code&gt; under the&#xA;&lt;code&gt;%ProgramFiles%\Microsoft Office\root\&amp;lt;Office Version&amp;gt;&lt;/code&gt; and&#xA;&lt;code&gt;%ProgramFiles(x86)%\Microsoft Office\root\&amp;lt;Office Version&amp;gt;&lt;/code&gt;&#xA;directories.  An attacker may place a malicious &lt;code&gt;AI.exe&lt;/code&gt; there in order&#xA;to have persistence whenever a user interacts with the Microsoft&#xA;Office Suite.  &lt;a href=&#34;https://twitter.com/laughing_mantis/status/1645268114966470662&#34; target=&#34;_blank&#34; &gt;1&lt;/a&gt;, &lt;a href=&#34;https://github.com/last-byte/PersistenceSniper/blob/main/PersistenceSniper/PersistenceSniper.psm1&#34; target=&#34;_blank&#34; &gt;2&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Search for file glob &lt;code&gt;C:\Program File*\Microsoft Office\root\Office*\ai.exe&lt;/code&gt; and hash it.&lt;/p&gt;&#xA;&lt;h3 id=&#34;example-detect-registry-keys&#34;&gt;Example: Detect registry keys&lt;/h3&gt;&#xA;&lt;p&gt;The .NET DLLs listed in the &lt;code&gt;DOTNET_STARTUP_HOOKS&lt;/code&gt; environment variable&#xA;are loaded into .NET processes at runtime.&#xA;&lt;a href=&#34;https://persistence-info.github.io/Data/dotnetstartuphooks.html&#34; target=&#34;_blank&#34; &gt;1&lt;/a&gt;,&#xA;&lt;a href=&#34;https://github.com/last-byte/PersistenceSniper/blob/main/PersistenceSniper/PersistenceSniper.psm1&#34; target=&#34;_blank&#34; &gt;2&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Solution: Change the Accessor to &amp;ldquo;registry&amp;rdquo; and search for the following globs.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;HKEY_USERS\*\Environment\DOTNET_STARTUP_HOOKS&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\DOTNET_STARTUP_HOOKS&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Select &lt;code&gt;Upload file&lt;/code&gt; to view the content of the matching values.&lt;/p&gt;&#xA;&lt;h3 id=&#34;example-detect-mark-of-the-web-files&#34;&gt;Example: Detect Mark of the Web files&lt;/h3&gt;&#xA;&lt;p&gt;When files are downloaded from the internet, browsers will add an&#xA;Alternate Data Stream (ADS) to the file called &lt;code&gt;Zone.Identifier&lt;/code&gt;. This&#xA;stream will contain additional information about where the file was&#xA;downloaded from.&lt;/p&gt;&#xA;&lt;p&gt;Solution:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Change the accessor to &lt;code&gt;ntfs&lt;/code&gt; which will allow us to see&#xA;Alternate Data Streams (ADS).&lt;/li&gt;&#xA;&lt;li&gt;Search for files containing the &lt;code&gt;Zone.Identifier&lt;/code&gt; (ADS names are&#xA;appended to the filename with a colon): &lt;code&gt;C:\Users\*\Downloads\**\*:Zone.Identifier&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Enable uploading to get the data.&lt;/li&gt;&#xA;&lt;li&gt;You can preview the data within the GUI in the &lt;code&gt;Uploaded Files&lt;/code&gt; tab.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;div class=&#34;mynotices tip&#34;&gt;&#xA;  &lt;div heading=&#34; Using dedicated artifacts &#34;&gt;&lt;p&gt;You can also use &lt;code&gt;Windows.NTFS.ADSHunter&lt;/code&gt; or&#xA;&lt;code&gt;Exchange.Windows.Detection.ZoneIdentifier&lt;/code&gt; to further parse the&#xA;contents of the &lt;code&gt;Zone.Identifier&lt;/code&gt; stream.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;&lt;h2 id=&#34;performance&#34;&gt;Performance&lt;/h2&gt;&#xA;&lt;p&gt;Searching for files can be an expensive operation, using a lot of CPU&#xA;and IO resources on the end point. Some rules of thumb:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Searching by filename is fairly cheap.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;It is better if you can narrow down the number of directories we&#xA;have to scan. For example rather than search&#xA;&lt;code&gt;C:/**/*:Zone.Identifier&lt;/code&gt;, limit to search to only user files&#xA;&lt;code&gt;C:/Users/**/*:Zone.Identifier&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;It is expensive to search the content of files with a Yara rule.&lt;/p&gt;&#xA;&lt;p&gt;For example instead of searching for &lt;code&gt;C:/**&lt;/code&gt; then applying a Yara&#xA;rule looking for an executable, it is better to first narrow the&#xA;glob to &lt;code&gt;C:/**/*.exe&lt;/code&gt; and even time box it further. The File Finder&#xA;artifact prioritizes cheaper operations like filename or&#xA;modification time checks before attempting to apply a Yara scan.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;</description>
    </item>
    <item>
      <title>Preserving Forensic Evidence</title>
      <link>https://www.velociraptor-docs.org/training/playbooks/preservation/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://www.velociraptor-docs.org/training/playbooks/preservation/</guid>
      <description>&lt;h2 id=&#34;scenario&#34;&gt;Scenario&lt;/h2&gt;&#xA;&lt;p&gt;As a system administrator you have a high level of confidence a&#xA;certain endpoint is compromised. You wish to preserve critical&#xA;evidence while arranging for a more experienced DFIR professional to&#xA;examine the evidence.&lt;/p&gt;&#xA;&lt;h2 id=&#34;main-takeaways&#34;&gt;Main takeaways&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;This technique is a &amp;ldquo;shotgun&amp;rdquo; approach - it typically collects a&#xA;lot of data.&lt;/li&gt;&#xA;&lt;li&gt;Not very targeted.&lt;/li&gt;&#xA;&lt;li&gt;Does not scale to many endpoints - use when very confident an&#xA;endpoint is compromised.&lt;/li&gt;&#xA;&lt;li&gt;DFIR skill required - LOW.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;steps-to-take&#34;&gt;Steps to take&lt;/h2&gt;&#xA;&lt;p&gt;Some common artifacts that are used in a preservation collection:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;Windows.KapeFiles.Targets&lt;/code&gt; - collects files such as &lt;code&gt;$MFT&lt;/code&gt;, log files etc.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Windows.Memory.Acquisition&lt;/code&gt; - collects a physical memory image.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;if-velociraptor-is-already-installed-on-the-endpoint&#34;&gt;If Velociraptor is already installed on the endpoint&lt;/h3&gt;&#xA;&lt;p&gt;For collecting from a single endpoint&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Search for the client you want to acquire from the main search screen.&lt;/li&gt;&#xA;&lt;li&gt;Select &lt;code&gt;Collected Artifacts&lt;/code&gt; from the sidebar, then select &lt;code&gt;New Collection&lt;/code&gt; from the toolbar.&lt;/li&gt;&#xA;&lt;li&gt;For Windows systems, select &lt;code&gt;Windows.KapeFiles.Targets&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Select the &lt;code&gt;BasicCollection&lt;/code&gt; or &lt;code&gt;Kape Triage&lt;/code&gt; or &lt;code&gt;SANS Triage&lt;/code&gt;&#xA;targets. These targets select the most common raw files used by&#xA;DFIR analysts.&lt;/li&gt;&#xA;&lt;li&gt;This artifact can collect a large amount of data, we recommend to&#xA;place resource limits to ensure that collection is not too&#xA;excessive.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;figure&gt;&#xA;  &lt;div class=&#34;figure&#34;&gt;&#xA;    &lt;img src=&#34;https://www.velociraptor-docs.org/training/playbooks/preservation//training/playbooks/preservation/kape_targets.png&#34;&#xA;         class=&#34;inline&#34;&#xA;         alt=&#34;Selecting the Windows.KapeFiles.Targets artifact&#34;&#xA;         width=&#34;1458&#34; height=&#34;831&#34;&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;figcaption&gt;&#xA;    &lt;a class=&#34;image-link&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&#xA;       href=&#34;kape_targets.png&#34;&gt;&#xA;      &lt;i class=&#34;fa fa-download&#34;&gt;&lt;/i&gt;&lt;/a&gt;&#xA;    Selecting the Windows.KapeFiles.Targets artifact&#xA;  &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;If you will have a number of endpoints to collect you can use a hunt&#xA;to combine the data together:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;In the &lt;code&gt;Hunt Manager&lt;/code&gt; screen, create a new hunt. Restrict the hunt&#xA;to a label &lt;code&gt;acquisition&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Proceed to collect the same artifacts as above&lt;/li&gt;&#xA;&lt;li&gt;As the investigation proceeds, when you find a client that warrants&#xA;a preservation collection, simply add a label &lt;code&gt;acquisition&lt;/code&gt; to the&#xA;client. The &lt;code&gt;Windows.KapeFiles.Targets&lt;/code&gt; will be automatically&#xA;scheduled on this client.&lt;/li&gt;&#xA;&lt;li&gt;You can view all acquired clients in the hunt overview page, and&#xA;create a large zip export of all preserved files.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&#xA;&lt;div class=&#34;mynotices warning&#34;&gt;&#xA;  &lt;div heading=&#34; Ensure the hunt is restricted by labels! &#34;&gt;&lt;p&gt;Make sure this hunt is restricted by labels! If it is not, it will be&#xA;scheduled on all clients and may result in a lot of data being&#xA;transferred to the server - this can result in the server&amp;rsquo;s bandwidth&#xA;being saturated, disk becoming full or server becoming unresponsive.&lt;/p&gt;&#xA;&lt;p&gt;If this happens you can stop the hunt in the GUI which will cancel all&#xA;in-flight collections and eventually recover the server&amp;rsquo;s bandwidth.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;&lt;h3 id=&#34;if-velociraptor-is-not-installed-on-the-endpoint&#34;&gt;If Velociraptor is not installed on the endpoint&lt;/h3&gt;&#xA;&lt;p&gt;If Velociraptor is not already installed on the endpoint, you can use&#xA;an &lt;code&gt;offline collector&lt;/code&gt;. The Velociraptor &lt;code&gt;Offline Collector&lt;/code&gt; is a&#xA;preconfigured version of Velociraptor which can run on the endpoint&#xA;and write all raw files into a ZIP archive.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;figure&gt;&#xA;  &lt;div class=&#34;figure&#34;&gt;&#xA;    &lt;img src=&#34;https://www.velociraptor-docs.org/training/playbooks/preservation//training/playbooks/preservation/offline_collector.png&#34;&#xA;         class=&#34;inline&#34;&#xA;         alt=&#34;Creating an offline collector&#34;&#xA;         width=&#34;727&#34; height=&#34;356&#34;&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;figcaption&gt;&#xA;    &lt;a class=&#34;image-link&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&#xA;       href=&#34;offline_collector.png&#34;&gt;&#xA;      &lt;i class=&#34;fa fa-download&#34;&gt;&lt;/i&gt;&lt;/a&gt;&#xA;    Creating an offline collector&#xA;  &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;You can use a number of methods to push the offline to collection to&#xA;the endpoint:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Use an existing EDR or endpoint security product to run the binary&#xA;and retrieve the collected ZIP file.&lt;/li&gt;&#xA;&lt;li&gt;Use Group Policy to schedule a task that runs the collector from a&#xA;remote share.&lt;/li&gt;&#xA;&lt;li&gt;Use &lt;code&gt;WinRM&lt;/code&gt; or &lt;code&gt;PsExec&lt;/code&gt; to run the collector remotely (by careful&#xA;of pass the hash type attacks though).&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;We recommend using the X509 encryption scheme to store the raw data to&#xA;an encrypted container. This helps to protect it in transit.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;figure&gt;&#xA;  &lt;div class=&#34;figure&#34;&gt;&#xA;    &lt;img src=&#34;https://www.velociraptor-docs.org/training/playbooks/preservation//training/playbooks/preservation/encryoted_collector.png&#34;&#xA;         class=&#34;inline&#34;&#xA;         alt=&#34;Encrypting the collected data&#34;&#xA;         width=&#34;1414&#34; height=&#34;955&#34;&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;figcaption&gt;&#xA;    &lt;a class=&#34;image-link&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&#xA;       href=&#34;encryoted_collector.png&#34;&gt;&#xA;      &lt;i class=&#34;fa fa-download&#34;&gt;&lt;/i&gt;&lt;/a&gt;&#xA;    Encrypting the collected data&#xA;  &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;You can also configure the offline collector to automatically upload&#xA;the collection to a cloud storage, such as &lt;code&gt;S3&lt;/code&gt;, &lt;code&gt;Google Cloud Storage&lt;/code&gt; or a &lt;code&gt;Windows file share&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;when-to-use-this-technique&#34;&gt;When to use this technique?&lt;/h2&gt;&#xA;&lt;p&gt;This technique should be used sparingly, usually targeting few&#xA;systems, as it can transfer a large amount of data.&lt;/p&gt;&#xA;&lt;p&gt;Typically this technique is used when the endpoint is likely to be&#xA;destroyed (e.g. re-imaged) or become inaccessible in the near&#xA;future. The method is most suitable for preservation of raw data.&lt;/p&gt;&#xA;&lt;h2 id=&#34;when-not-to-use-this-technique&#34;&gt;When not to use this technique?&lt;/h2&gt;&#xA;&lt;p&gt;This workflow is not appropriate for triage. A triage workflow is&#xA;about discovering unknown compromised endpoints and therefore by&#xA;definition must be applied to a large number of endpoints. The&#xA;&lt;code&gt;Preserving Forensic Evidence&lt;/code&gt; workflow can not be applied to a large&#xA;number of endpoints.&lt;/p&gt;&#xA;&lt;p&gt;The traditional digital forensics workflow consists of the following&#xA;steps:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;Acquisition&lt;/code&gt; step collects a large amount of raw data to a central&#xA;server.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Analysis&lt;/code&gt; step applies parsers and various dedicated tools in a&#xA;central &amp;ldquo;forensics workstation&amp;rdquo; on all the raw data collected.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Interpretation&lt;/code&gt; step involves examining the output from the&#xA;various parsers to answer case specific questions.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Many newcomers to Velociraptor have been trained with this workflow&#xA;and try to apply it to Velociraptor.&lt;/p&gt;&#xA;&lt;p&gt;However this centralist approach to digital forensics does not scale&#xA;in practice. When trying to apply this approach to a large network of&#xA;endpoints, users are often overwhelmed with data (it is almost a right&#xA;of passage for new Velociraptor users to completely fill their&#xA;server&amp;rsquo;s disk because they tried to collect all the log files from all&#xA;the endpoints)&lt;/p&gt;&#xA;&lt;p&gt;Velociraptor&amp;rsquo;s philosophy is different:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Velociraptor considers the endpoint to be the ultimate source of truth.&lt;/li&gt;&#xA;&lt;li&gt;Therefore we rarely need to fetch the raw data from the endpoint!&#xA;Since Velociraptor can parse the raw data directly on the endpoint&#xA;we prefer asking case relevant questions from the entire network&#xA;directly.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;To explain this point, let&amp;rsquo;s consider an example where we want to know&#xA;if an executable file was recently downloaded onto the endpoint. We&#xA;will attempt to parse the USN Journal to answer this question.&lt;/p&gt;&#xA;&lt;p&gt;The very traditional Digital Forensics process (i.e. back in the 90s)&#xA;would require acquiring a bit for bit disk image of the suspected&#xA;endpoint with a write blocker attached! Probably no-one does this any&#xA;more!&lt;/p&gt;&#xA;&lt;p&gt;A more modern approach is to use a digital acquisition tool to copy&#xA;just the &lt;code&gt;C:\$Extend\$UsnJrnl:$J&lt;/code&gt; file in it&amp;rsquo;s entirety for&#xA;&lt;code&gt;Acquisition&lt;/code&gt;, then apply a separate tool to parse the journal and&#xA;search for any files written to the disk with a &lt;code&gt;.exe&lt;/code&gt; extension.&lt;/p&gt;&#xA;&lt;p&gt;While this approach is better than acquiring the entire disk image&#xA;(Average disks are of the range of 1-2Tb these days), it still&#xA;requires collecting several hundred MB of data from each endpoint. If&#xA;you have 10,000 endpoints this quickly becomes intractable.&lt;/p&gt;&#xA;&lt;p&gt;Velociraptor&amp;rsquo;s approach is different: Since the endpoint is considered&#xA;the source of truth, we just directly run our analysis on the&#xA;endpoint. Collecting the &lt;code&gt;Windows.Forensics.Usn&lt;/code&gt; artifact with a&#xA;&lt;code&gt;FileNameRegex&lt;/code&gt; filter of &lt;code&gt;.exe$&lt;/code&gt; will query each machine to parse&#xA;their own local copy of the USN journal to find all executables&#xA;directly.&lt;/p&gt;&#xA;&lt;p&gt;We can collect this artifact using a hunt from the entire network at&#xA;once. Since each endpoint will be doing the analysis in parallel,&#xA;results will return in minutes regardless of how many endpoint there&#xA;are!&lt;/p&gt;&#xA;&lt;p&gt;This is why we consider simple acquisition followed by central&#xA;analysis workflows to be inferior to directly collecting the right&#xA;artifacts.&lt;/p&gt;&#xA;&lt;p&gt;You should use the &lt;code&gt;Preserving Forensic Evidence&lt;/code&gt; workflow only on&#xA;systems that are known to have been compromised and you want to&#xA;preserve the raw files for some reason.&lt;/p&gt;&#xA;&lt;h3 id=&#34;other-considerations&#34;&gt;Other considerations&lt;/h3&gt;&#xA;&lt;p&gt;When collecting raw files from the endpoint we need to make a tradeoff:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Collecting fewer files may miss some files that are needed later&#xA;during analysis.&lt;/li&gt;&#xA;&lt;li&gt;Collecting more files will result in larger collection.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Ultimately it is not possible to know in advance what type of evidence&#xA;may be relevant. For example, we might collect the &lt;code&gt;$MFT&lt;/code&gt; in our&#xA;initial acquisition but subsequent analysis can show that certain&#xA;files are critical (e.g. files in the user&amp;rsquo;s &lt;code&gt;Downloads&lt;/code&gt; directory).&lt;/p&gt;&#xA;&lt;p&gt;In a &lt;code&gt;Preserving Forensic Evidence&lt;/code&gt; workflow we can not go back to the&#xA;source of truth and check the files in the &lt;code&gt;Downloads&lt;/code&gt; directory!&lt;/p&gt;&#xA;&lt;p&gt;Therefore it is always better to have Velociraptor already installed&#xA;on the endpoint so we can pivot during the analysis phase and get&#xA;additional information as required.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Triaging Logs</title>
      <link>https://www.velociraptor-docs.org/training/playbooks/triage-logs/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://www.velociraptor-docs.org/training/playbooks/triage-logs/</guid>
      <description>&lt;h2 id=&#34;scenario&#34;&gt;Scenario&lt;/h2&gt;&#xA;&lt;p&gt;An endpoint is suspected of being compromised but you dont know&#xA;exactly what happened. You want to get an initial idea by examining&#xA;the logs on the actual endpoint.&lt;/p&gt;&#xA;&lt;h2 id=&#34;main-takeaways&#34;&gt;Main takeaways&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;This technique is similar to forwarding logs to a SIEM and applying&#xA;signatures.&lt;/li&gt;&#xA;&lt;li&gt;However we can choose very noisy signatures here&lt;/li&gt;&#xA;&lt;li&gt;We use stacking to quickly categorize the types of activity that&#xA;happens on the endpoint.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;steps-to-take&#34;&gt;Steps to take&lt;/h2&gt;&#xA;&lt;p&gt;Some common artifacts that are used for &lt;code&gt;Triaging Logs&lt;/code&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;Windows.Hayabusa.Rules&lt;/code&gt; should be imported using &lt;code&gt;Server.Import.CuratedSigma&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Exchange.Windows.EventLogs.Hayabusa&lt;/code&gt; should be imported from the&#xA;artifact exchange.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;importing-windowshayabusarules&#34;&gt;Importing Windows.Hayabusa.Rules&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Select the &lt;code&gt;Server Artifacts&lt;/code&gt; from the sidebar.&lt;/li&gt;&#xA;&lt;li&gt;Add a collection, search for &lt;code&gt;Server.Import.CuratedSigma&lt;/code&gt; and&#xA;import the &lt;code&gt;Windows.Hayabusa.Rules&lt;/code&gt;. This will import the latest&#xA;version of the artifact.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;This artifact uses the built in &lt;code&gt;Sigma Engine&lt;/code&gt; in Velociraptor. The&#xA;artifact packages the curated &lt;code&gt;Hayabusa&lt;/code&gt; rules in a convenient&#xA;artifact. Rules are categorized by &lt;code&gt;RuleLevel&lt;/code&gt; and &lt;code&gt;RuleStatus&lt;/code&gt; which&#xA;generally try to balance how noisy a rule against its detection&#xA;efficacy.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;  &#xA;  &#xA;  &#xA;  &#xA;  &#xA;  &#xA;&lt;figure&gt;&#xA;  &lt;div class=&#34;figure&#34;&gt;&#xA;    &lt;img src=&#34;https://www.velociraptor-docs.org/training/playbooks/triage-logs//training/playbooks/triage-logs/velociraptor_sigma_flow_.svg&#34; alt=&#34;Sigma workflow in Velociraptor&#34;&#xA;         class=&#34;inline&#34;&#xA;         height=&#34;525.4545454545455&#34;&#xA;         width=&#34;1082.383226927995&#34;  /&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;figcaption&gt;&#xA;    &lt;a class=&#34;image-link&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&#xA;       href=&#34;velociraptor_sigma_flow.svg&#34;&gt;&lt;i class=&#34;fa fa-download&#34;&gt;&lt;/i&gt;&lt;/a&gt;&#xA;    Sigma workflow in Velociraptor&#xA;  &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;Because we are trying to triage the endpoint, we actually want to see&#xA;all the hits, even if they are noisy. We will apply stacking later to&#xA;quickly triage the type of activity on the endpoint. So in this case&#xA;we should select to apply all the rules.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;figure&gt;&#xA;  &lt;div class=&#34;figure&#34;&gt;&#xA;    &lt;img src=&#34;https://www.velociraptor-docs.org/training/playbooks/triage-logs//training/playbooks/triage-logs/all_rules.png&#34;&#xA;         class=&#34;inline&#34;&#xA;         alt=&#34;Applying all Sigma Rules&#34;&#xA;         width=&#34;1413&#34; height=&#34;965&#34;&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;figcaption&gt;&#xA;    &lt;a class=&#34;image-link&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&#xA;       href=&#34;all_rules.png&#34;&gt;&#xA;      &lt;i class=&#34;fa fa-download&#34;&gt;&lt;/i&gt;&lt;/a&gt;&#xA;    Applying all Sigma Rules&#xA;  &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;Once the artifact is collected from the endpoint we can stack the hits&#xA;in the GUI:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Update the notebook to remove the &lt;code&gt;LIMIT 50&lt;/code&gt;. This will select all&#xA;rows in one table. Typically there should be many thousands of&#xA;rows because we added all the noisy rules.&lt;/li&gt;&#xA;&lt;li&gt;Sort by the rule &lt;code&gt;Title&lt;/code&gt;. Hover the mouse on the column header and&#xA;click the &lt;code&gt;Sort&lt;/code&gt; button.&lt;/li&gt;&#xA;&lt;li&gt;Once the column is sorted, the stacking button should appear.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;figure&gt;&#xA;  &lt;div class=&#34;figure&#34;&gt;&#xA;    &lt;img src=&#34;https://www.velociraptor-docs.org/training/playbooks/triage-logs//training/playbooks/triage-logs/stacking_a_column.png&#34;&#xA;         class=&#34;inline&#34;&#xA;         alt=&#34;Stacking a column&#34;&#xA;         width=&#34;1210&#34; height=&#34;466&#34;&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;figcaption&gt;&#xA;    &lt;a class=&#34;image-link&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&#xA;       href=&#34;stacking_a_column.png&#34;&gt;&#xA;      &lt;i class=&#34;fa fa-download&#34;&gt;&lt;/i&gt;&lt;/a&gt;&#xA;    Stacking a column&#xA;  &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;/p&gt;&#xA;&lt;ol start=&#34;4&#34;&gt;&#xA;&lt;li&gt;Clicking the stacking button will show a summary of the different&#xA;rules matching and a count of how many times each rule made a hit.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;figure&gt;&#xA;  &lt;div class=&#34;figure&#34;&gt;&#xA;    &lt;img src=&#34;https://www.velociraptor-docs.org/training/playbooks/triage-logs//training/playbooks/triage-logs/viewing_column_stack.png&#34;&#xA;         class=&#34;inline&#34;&#xA;         alt=&#34;Viewing column summaries&#34;&#xA;         width=&#34;1222&#34; height=&#34;562&#34;&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;figcaption&gt;&#xA;    &lt;a class=&#34;image-link&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&#xA;       href=&#34;viewing_column_stack.png&#34;&gt;&#xA;      &lt;i class=&#34;fa fa-download&#34;&gt;&lt;/i&gt;&lt;/a&gt;&#xA;    Viewing column summaries&#xA;  &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;/p&gt;&#xA;&lt;ol start=&#34;5&#34;&gt;&#xA;&lt;li&gt;Clicking on any of the rules navigates the table to the list of&#xA;rules that actually hit.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;figure&gt;&#xA;  &lt;div class=&#34;figure&#34;&gt;&#xA;    &lt;img src=&#34;https://www.velociraptor-docs.org/training/playbooks/triage-logs//training/playbooks/triage-logs/viewing_common_rows.png&#34;&#xA;         class=&#34;inline&#34;&#xA;         alt=&#34;Viewing common rows&#34;&#xA;         width=&#34;1200&#34; height=&#34;373&#34;&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;figcaption&gt;&#xA;    &lt;a class=&#34;image-link&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&#xA;       href=&#34;viewing_common_rows.png&#34;&gt;&#xA;      &lt;i class=&#34;fa fa-download&#34;&gt;&lt;/i&gt;&lt;/a&gt;&#xA;    Viewing common rows&#xA;  &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;Using this technique it is possible to quickly identify the types or&#xA;categories of activity on the endpoint and see the most suspicious&#xA;rules. Due to the stacking we dont need to review each individual hit,&#xA;but only the different types of rules.&lt;/p&gt;&#xA;&lt;p&gt;For example, say we see a rule description a &lt;code&gt;PsExec&lt;/code&gt; lateral&#xA;movement, we can quickly identify if &lt;code&gt;PsExec&lt;/code&gt; is expected for this&#xA;environment, or does it represent a potential threat. If I identify&#xA;the rule as important, I can then review each instance to get more&#xA;information about what commands were run.&lt;/p&gt;&#xA;&lt;h2 id=&#34;using-the-exchangewindowseventlogshayabusa&#34;&gt;Using the Exchange.Windows.EventLogs.Hayabusa&lt;/h2&gt;&#xA;&lt;p&gt;The &lt;code&gt;Exchange.Windows.EventLogs.Hayabusa&lt;/code&gt; artifact is available in the&#xA;artifact exchange. This artifact uses an external binary &lt;code&gt;Hayabusa&lt;/code&gt; to&#xA;evaluate the &lt;code&gt;Sigma&lt;/code&gt; rules from the &lt;code&gt;Hayabusa&lt;/code&gt; project.&lt;/p&gt;&#xA;&lt;p&gt;Post processing and analysing the results from this artifact is&#xA;similar to the procedure described above.&lt;/p&gt;&#xA;&lt;h2 id=&#34;discussion-and-limitations&#34;&gt;Discussion and limitations&lt;/h2&gt;&#xA;&lt;p&gt;This technique is similar to many SIEMs which forward event logs from&#xA;the endpoint and apply matching rules. There are some fundamental&#xA;differences though:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;SIEMs typically only forward a small subset of logs since the more&#xA;logs are collected the more data the SIEM backend needs to&#xA;handle. Typically SIEMs forward logs such as &lt;code&gt;Sysmon Process Execution&lt;/code&gt; but do not forward other logs for example &lt;code&gt;BITS Client Operational Logs&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;SIEM rules are also written to ensure they have a low false&#xA;positive rate. This means that suspicious activity in one&#xA;environment which is common in another setting, might not trigger a&#xA;detection. By stacking on all noisy rules we get to decide for&#xA;ourselves if a particular rule is acceptable for this environment.&lt;/p&gt;&#xA;&lt;p&gt;For example an administrator RDP login may be perfectly normal in&#xA;some environments but a red flag in others!  SIEM detections are&#xA;rarely tuned to the environment.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;A SIEM may not be present or well tuned, in a particular&#xA;environment. Running the &lt;code&gt;Sigma&lt;/code&gt; log triaging workflow can&#xA;compensate for the lack of a SIEM.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Data retention is different from a SIEM. Typically SIEMs only&#xA;maintain logs for limited time (sometimes as low as a month). On&#xA;the other hand log files are typically rotated based on size. This&#xA;means that sometimes logs will be present on the endpoint for&#xA;longer than in the SIEM, while other times the SIEM will contain&#xA;logs that were already rotate on the endpoint.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Because this technique relies on locally stored logs, it is&#xA;susceptible to logs being cleared by attackers.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;real-time-monitoring&#34;&gt;Real time monitoring&lt;/h2&gt;&#xA;&lt;p&gt;As an additional step you can enable the &lt;code&gt;Windows.Hayabusa.Monitoring&lt;/code&gt;&#xA;artifact for real time detection of the same &lt;code&gt;Sigma&lt;/code&gt; rules. This can&#xA;provide coverage for any future compromises&lt;/p&gt;&#xA;</description>
    </item>
  </channel>
</rss>
