60 Commits
Author SHA1 Message Date
Mike Cohenanddependabot[bot] 971f51f5ea Added button in hunt overview for manual stats refresh (#4898)
This is needed now that the hunt dispatcher does not automatically
refresh the stats periodically.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-22 15:00:56 +10:00
Mike Cohen 0104df2f7d Added test to the velociraptor debian server command (#4882)
Parse the deb and make sure it is embedding the correct config.
2026-06-16 21:57:26 +10:00
Mike Cohen e85682ed78 Update version on modified VQL plugins/functions (#4700)
Also added a CI test to ensure Version is kept in sync with plugin arg
modifications.

Also removed old config options from config file in order to trigger
syntax errors if people try to use them.
2026-03-03 12:24:22 +10:00
Mike Cohen 19ab65a5b9 Refactor process tracker. (#4647)
The new process tracker is more efficient:

1. Process Children are stored in the tracked process entry avoiding the
need to sweep across the entire tracker when constructing the process
tree

2. The tracker now uses links to maintain correspondence between process
ID (which is heavily reused) and internal unique ID (based on the start
time). This avoids the need to sweep through the tracker when we detect
a PID was reused.

3. The tracker can use an on disk sqlite based LRU which is a bit slower
but reduces memory use and allows tracking much larger number of
processes.
2026-02-04 16:53:06 +10:00
Mike Cohenanddependabot[bot] e84f6d262f Added a json schema validator to parse_json() and parse_yaml() (#4510)
This allows us to validate offline spec files and reject invalid files.

Also added an upload to the Server.Utils.CreateCollector that contains
the spec file for ease of use. Users now simply can download that spec
file and use it on the CLI builder.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-24 02:51:03 +10:00
Mike Cohenandsnyk-bot 3a8a2417b4 Improved VQL verifier. (#4451)
1. When verifying artifacts, reported error line number now accounts
   for the yaml structure.
2. Verify new case: Defining functions in LET and calling them with
   incorrect parameters.
3. Identify calling undefined plugins or functions (previously this
   was not a warning because it could have been defined by LET
   definitions).
4. Resolving import and export sections when verifying artifacts now
   warn about misuse of imported functions which may have changed
   their definitions.
5. Uploads are now reported as Dicts instead of an upload object.
6. Dict sorting now implemented.
7. Lots of artifact bugs found by previous static analysis
8. Updated to go 1.24.0

---------

Co-authored-by: snyk-bot <[email protected]>
2025-09-16 14:11:14 +10:00
Mike Cohen 37efa58fd9 Reworking Lnk Parser (#4405)
Also added:
* Tests for Various ShellBags
* Delve scripts to make debugging better - support Velociraptor specific
pretty printer.
* Update Linux.Network.Netstat to support IPv6 sockets.
2025-08-20 05:02:18 +10:00
Mike Cohenandsnyk-bot e5af6a4a0a Added artifact tags (#4397)
Previously we used artifact name prefix to distinguish and group
artifacts. This is useful for broad artifacts like `Windows`, `Linux`
etc but proved to be problematic for `Exchange` artifacts.

If an arbitrary name prefix is used when importing exchange artifacts,
artifacts that import other artifacts may break due to the name
changing.

This PR introduces a "Tag" on artifacts. Tags allow grouping artifacts
into distinct groups. The artifacts viewer allows searching for tags
automatically (unique tags are added to the end of the search selector).

Tags may be attached to the artifact using artifact_set_metadata() or
directly as part of artifact_set().

This PR also adds `Server.Import.Extras` artifact to replace the
distinct import artifacts from the various semi-official sources. All
external sources are now imported using this artifact.

This means we can also remove these artifacts from being built in:
* Generic.Collectors.SQLECmd
* Generic.Forensic.SQLiteHunter
* Server.Import.CuratedSigma
* Server.Import.Rapid7Labs
* Windows.KapeFiles.Targets

---------

Co-authored-by: snyk-bot <[email protected]>
2025-08-13 13:48:22 +10:00
Mike Cohen cdb2d03b85 Resumable uploads (#4364)
This PR introduces resumable uploads. These uploads are opt-in set by
setting a VQL variable.

When the variable is set, uploads will complete immediately:

- Schedule an upload transaction and inform the server
- VQL queries return an upload id immediately and the VQL query
continues (ie uploads are asynchronous).
- Begin uploading transactions on the client 

If the client is interrupted or crashes, the transactions can be resumed
on the server.
2025-07-27 17:16:22 +10:00
Mike Cohen 7ebf3225b5 Add Server.Utils.DeadDiskClient - automate dead disk analysis. (#4331) 2025-07-04 01:53:04 +10:00
Mike Cohen 1d53221525 Bugfix: Support packing large configs into MSI (#4305)
Due to OLE fragmentation we need to take care to split the client config
while packing into the MSI.

Fixes: #4304
2025-06-18 14:31:52 +10:00
Mike Cohen 8a8ebb997e Update KapeFiles Targets (#4260)
Also detect Wow64 as an architecture specifically when running on
windows.
2025-05-28 16:37:57 +10:00
Mike Cohen 5e9bb620b3 Bugfix: Fix interpretation of KapeFile targets. (#4257)
After clarifications from the maintainers of the KapeFile fixed
interpretation of fields.
2025-05-28 01:59:17 +10:00
Mike Cohen 1c6bab93b6 Refactored BasePath to be a service. (#4242)
This accomodates complex routing configurations which allow base path to
depend on arbitrary things (like org name).

Also:
* fixed copy notebook cell bug
* revert gorilla csrf to unbroken version
* remove unused pst artifacts
* Added audit log on jwt exchange
2025-05-19 15:42:01 +10:00
Mike Cohen 2d6134ea3f Bugfix: Descriptions in KapeFiles targets were incorrect (#4074) 2025-02-20 12:00:48 +10:00
Mike Cohenandsnyk-bot 4cca62cfe6 Prepare for 0.74 release (#4068)
* Allow markdown block quotes to be rendered in artifact descriptions
* Add tool tips to column headers
* Move the default "LIMIT 50" vql into a config option

---------

Co-authored-by: snyk-bot <[email protected]>
2025-02-19 16:10:17 +10:00
fa83567ccf Update and rename Kerbroasting.yaml to Kerberoasting.yaml (#4046)
Fixed spelling in name and metadata

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Matthew Green <[email protected]>
Co-authored-by: Mike Cohen <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: snyk-bot <[email protected]>
2025-02-01 12:44:53 +10:00
Mike Cohen 276a49a17a Bugfix: Updated table API to use JSON (#3812)
This preserves the column types more accurately to correspond with
internal data types.
2024-10-10 10:56:19 +10:00
Mike Cohen 8058855b13 Sync latest KapeFiles Targets (#3806)
Also add timestamp in the artifact to record when the artifact was
built.
2024-10-09 00:37:21 +10:00
Mike Cohen 912f3330c7 Update calendar to be more timezone aware. (#3799) 2024-10-04 13:46:32 +10:00
Mike Cohen 84a431401c Redesigned date/time selector. (#3795)
* Reflect user preference timezone
* Shows times in RFC3339 format
* Enter time in RFC3339 format
* Dropdown calendar
* Quick settings - next week, prev week etc.
2024-10-03 22:34:39 +10:00
Mike Cohenandsnyk-bot cda38922b6 Added Server.Utils.UploadTools artifact (#3761)
This artifact helps to manage binary tools on a disconnected system.

---------

Co-authored-by: snyk-bot <[email protected]>
2024-09-17 17:44:25 +10:00
Mike Cohen 83980d69d4 Wrap tempfile usage to work around Windows/Golang bug (#3724)
This is a workaround to the introduction of GetTempPath2 in Windows. The
Golang standard library switched to this API in recent Go version
https://github.com/golang/go/issues/56899

The GetTempPath2 API ignores the TEMP environment variable and always
returns C:\Windows\SystemTemp for system level programs. This causes the
os.TempDir() API to ignore our configuration of the correct temp
location.

Since practically, we can not allow list the SystemTemp directory in
e.g. EDR or other security products, this bug forces Velociraptor to
write temp files in this common area ignoring the configuration file.

To work around this issue we wrap all calls to temporary files and
ignore the os.TempDir() API completely.
2024-09-05 15:29:06 +10:00
Mike Cohen cd69c3eb14 Added artifacts to make it easier to post process KapeFiles.Targets (#3693)
The Windows.KapeFiles.Targets artifact allows to collect many bulk
forensic artifacts like registry hives etc. People often use it to
collect offline collections for preservation of hosts.

Although best practice is to **also** collect parsing artifacts as the
same time, sometimes this is left out. In this case the user needs to
parse the collected raw files (for example collecting $MFT then needing
to apply `Windows.NTFS.MFT` to parse it). This is not always easy to do.

This PR adds a notebook suggestion which applies remapping on the
KapeFiles collection in such as way that some regular artifacts designed
to run on the live system can work to some extent off the raw
collection. The additional parsing will be added to new collections in
the same (possibly virtual) client.

Also: Bugfix for zip_nocase accessor failed to work in some cases.

Since we now use remapping there is no need for the
Linux.KapeFiles.CollectFromDirectory (which was basically the same as
the Windows.KapeFiles.Targets but applies to a mounted directory). That
artifact is now removed.
2024-08-19 12:56:29 +10:00
Mike Cohen 235939563c Bugfix: Replace regex in KapeFiles target with globs (#3631) 2024-07-19 02:14:02 +10:00
Mike Cohen 765259943b Updated array() VQL function (#3609)
This was previously more like flatten() which had some surprising
results. This PR changes array() to be more like an array constructor
creating an array from a variety of objects
2024-07-12 17:32:29 +10:00
Mike Cohen b1cde98cdf Disable compatibility with URL style paths (#2912)
In the distant past we used to use url encoding to encode recursive
pathspecs but this is problematic because url encoding is just not
reliable enough. We have since moved to an OSPath object that properly
encodes paths as JSON objects but there is still some backwards
compatibility code in there that tries to detect a URL style path by
looking for # (the fragment component of the url).

This is probably a good time to remove this compatibility code because
we dont use urls for probably about 4-5 releases now.

Also sync latest KapeFiles Targets and fixed tests

Fixes: #2906
2023-08-27 22:52:44 +10:00
Mike Cohen 833aa0fd05 Merge fix for ntfs library, add back KapeTriage SDS target (#2849) 2023-07-29 01:47:31 +10:00
Mike Cohen c74055db90 Added a VSS accessor to automatically diff files from different vss (#2833)
This makes VSS analysis a lot simpler since the VQL just needs to use
the 'ntfs_vss' accessor and will suddenly see distinct files from all
the VSS returned by a glob in the same directory. Further analysis of
these artifacts will use the ntfs_vss to open these files transparenly.
2023-07-24 21:06:19 +10:00
Mike CohenandMaxime THIEBAUT 5f824240e1 Correct UI typo and update translations (#2748)
Co-authored-by: Maxime THIEBAUT <[email protected]>
2023-06-11 10:29:13 +10:00
Mike Cohen e977448684 Updated the SQLECmd artifact to support MacOS and Linux (#2708) 2023-05-25 01:58:38 +10:00
Mike Cohen ee40d4cbd2 Updated Windows.KapeFiles.Targets to support multiple drives (#2692)
Sometimes the main system drive is on D: instead of C:
2023-05-22 12:00:43 +10:00
Mike Cohen 9f18d46d16 Added Vietnamese translation (#2680)
Updated other languages.
2023-05-17 00:50:01 +10:00
Mike Cohen 422d32ed0d Added automated translations for missing terms (#2565)
New script makes it easier to manage new translations:

1. Script automatically creates a json file with newer translations
2. User manually copies and pastes into google translate to get
translations. Paste to the automated json file.
3. Language files merge translations at runtime.

When a human is able to review translations they can move them into the
primary file once vetted.
2023-03-20 20:36:47 +10:00
Mike Cohen 6f8e5a4d7f Added progress reporting to offline collector (#2423)
* When copying large files it is useful to get some kind of feedback.
* Also implemented less strict escaping for zip filenames - previously
  this was reusing the same rules as the filestore which mutated
  things like the .db extension.
* Updated pathspec() function to accept an accessor
* Start client's CA Pool from the OS root store, then adds built in
  certs. (Issue #2330)
* Updated KapeFiles to latest.
2023-02-07 04:07:27 +10:00
Mike Cohen 074d9ea32f Retry reads on EOF in NTFS accessor (#2157)
The NTFS context gets reset periodically and this causes a read to
return EOF on closed file handle. When this happens we need to retry
the read which will force it to recreate caches and parse MFT etc.

This is usually not needed for single shot collections, so this PR
also disables it from the KapeTargets artifact
2022-10-12 22:46:17 +10:00
Mike Cohen 1fefdce38f Sync KapeFiles and SQLECmd artifacts (#1845) 2022-06-07 00:07:06 +10:00
Mike Cohen 166d8df339 Added Portuguese and Spanish languages (#1831) 2022-06-01 14:08:21 +10:00
Mike Cohen f440359879 Updated SQLECmd artifacts (#1677)
Now parses tape paths directly. Also optimized speed by applying
filename restrictions first
2022-03-29 10:12:47 +10:00
Mike Cohen 3d2fecee8c Added Generic.Collectors.SQLECmd (#1635)
This artifact is automatically generated from the SQLECmd Maps.
2022-03-08 10:26:36 +10:00
lucebac 6bdbf09459 Add Artifact to collect KapeFile targets on Linux (#1426)
* Add Artifact to collect KapeFile targets on Linux

* adjust testdata to new artifact name
2021-12-11 11:39:35 +10:00
Mike Cohen 87d4d2d278 Added a buffer_size parameter to parse_lines (#1334)
This allows controlling the maximum size of the line buffer (default
is 64kb).

Also various cleanup tasks
* sync KapeFiles.Targets
* remove SDS target from KapeFiles and add a special collector for it.
* Refacted Windows.KapeFiles.Extract - Use uploads table directly to
  find file in container.

Fixes: #1142
Fixes: #1051
2021-10-15 18:06:22 +10:00
Mike Cohen 296d508991 Fix html export of images in notebook. (#1100) 2021-06-09 00:40:14 +10:00
Mike Cohen 162a28e267 Updated KapeFiles Targets artifact (#1097)
Also various cleanups.
2021-06-08 13:39:45 +10:00
Mike Cohen 27dcd34d7e Tools setup page now allows specifying tool url (#804)
Sometimes users need to host tools on external resources (e.g. S3
bucket). This change allows this url to be configured in the GUI so
all endpoints can download the tool from the specified URL.

Also this change includes some fixes to hunt and flow view refresh and
a fix to Windows.KapeFiles.Target that broke due to typed parameters.
2020-12-09 17:27:21 +10:00
Mike Cohen 4ecd422127 Memory Ring buffer implementation deadlocks (#796)
The Memory Ring Buffer implementation suffers from a potential
deadlock that may occur when the buffer is full causing calls to
AddResponse() to block. Additionally, the memory ring buffer was not
properly filtering out cancelled messages (like the file ring buffer).

This creates problems in cancelling large hunts and could potentially
lead to client deadlocks.
2020-12-07 02:21:36 +10:00
Mike Cohen bcd81e1921 Kapefiles artifacts updated to use auto accessor by default. (#771) 2020-11-26 17:43:48 +10:00
Mike Cohen 09fc1bc934 Fixed bug in lazy ntfs. (#494)
The lazy_ntfs accessor is faster because it only looks at $I30
records.  The lazy_ntfs accessor was calling record.IsValid() to make
sure the records are valid. However in practice $I30 records are not
always fully populated in particular $LogFile has wrong timestamps.

This change does not force this check any more.
2020-07-17 14:13:12 +10:00
Mike Cohen 5ce9eea91e Notebooks can be exported to zip files. (#429)
Removed unused commands:
- console (completely replaced by notebooks).
- artifacts acquire (Not very different from artifacts collect)
- inspect (not really used any more)
- report (superseded by notebooks)
2020-06-14 01:06:49 +10:00
Mike Cohen c9d82bd16f Fix baked in client labels. (#402)
It is possible to bake in labels into client configs. There was a bug
in syncing those when interrogating the client. Also added a test for
this.

Re-synced KapeFiles repository - they started using %user% when they
really meant *.

Custom collector builder now adds custom artifacts into the collector
configuration.
2020-06-03 00:01:49 +10:00