![](offline_builder.png)
#### Let's select two artifacts to collect:
1. Windows.KapeFiles.Targets
* Select the Basic Collection to get many forensic artifacts
2. SQLiteHunter: https://github.com/Velocidex/SQLiteHunter
---
### Selecting the Windows.KapeFiles.Targets artifact
![](offline_kape_targets.png)
---
### Configuring the collector to encrypt output
![](offline_configure.png)
---
### Downloading the prepared binary
![](offline_download_binary.png)
---
## Offline collector binaries
* Preconfigured to collect the required artifacts
* No user interaction needed - just run with no command line args
* Prepare armoured Zip file with all the results in them
---
### Acquire data!
![](offline_acquire.png)
---
## Acquired file is encrypted
* Due to limitations in the Zip format, file names can not be encrypted.
* Therefore, Velociraptor creates a second protected Zip file inside
the outer container.
* Several encryption schemes supported:
1. Regular password
2. X509 - random password generated and encrypted with the server's certificate.
3. GPG - random password generated and encrypted with the GPG public key.
---
## Acquired file is encrypted
![](offline_encrypted.png)
---
## Importing into Velociraptor
* Velociraptor can automatically decrypted offline containers when
importing.
* Use the Server.Utils.ImportCollection artifact to import collections
* The server uses its private key to unlock the container automatically.
* This preserves PII and confidential information in transit!
---
### Import the collection into the Velociraptor server
![](offline_import.png)
---
### Inspect the import process
![](offline_import_inspect.png)
---
### Inspect the collected data
![](offline_import_inspect_data.png)
---
## Protecting the collection file: Encryption
* For added protection, add a password to the zip file
* If we used a simple password it would be embedded in the collector
* Use an X509 scheme to generate a random password.
* Zip files do not password protect the directory listing - So
Velociraptor creates a second zip file inside the password protected
zip.
---
## Including third party binaries
* Sometimes we want to collect the output from other third party
executables.
* Velociraptor can package dependent binaries together with the
offline collector.
* Velociraptor can append a zip file to the end of the binary and
adjust PE headers to ensure it can be properly signed.
---
## Take a memory image with winpmem
* We will shell out to winpmem to acquire the image. We will bring
winpmem embedded in the collector binary.
---
## Importing collections into the GUI
* You can import an offline collection into the GUI using the
`import_collection()` [VQL function](https://docs.velociraptor.app/vql_reference/server/import_collection/).
* Requires the collection ZIP to already be present on the server.
* Decrypts X509 encrypted collections automatically.
---
## Local collection considerations
* Local collection can be done well without a server and permanent
agent installed.
* A disadvantage is that we do not get feedback of how the collection
is going and how many resources are consumed.
* We really need to plan ahead what we want to collect and it is more
difficult to pivot and dig deeper in response to findings.