Skip to content

Conversation

@ADANBacki
Copy link
Contributor

This PR adds the existing artifact upload_webdav to the collector build logic, to line up with the other "cloud targets" (S3, SFTP, SMB ...) as WebDAV.

While testing an issue occurred in the artifact itself, which is also fixed by this PR. Since the velociraptor log file is also always uploaded, a http contentLength mismatch error appeared. The reason was that ongoing writes to the log changed the actual file size since the contentLength was determined.
[INFO] 2026-01-05T11:11:51Z upload_webdav: Put "https://readacted/webdav/Collection-DESKTOP-WK-2026-01-05T11_11_35Z.log": http2: request body larger than specified content length
The solution was to just remove the definition of the contentLength and let the lower layers handle it. Tested. Works.

[INFO] 2026-01-06T15:15:25+01:00 Container hash 5ac62602ebfe7331350aae2e39d97657a3cc9eebc68ece9d4928b127fcf048a8
[INFO] 2026-01-06T15:15:25+01:00 upload_webdav: Uploading Collection-DESKTOP-WK-2026-01-06T14_03_42Z.zip to https://redacted/webdav/
[INFO] 2026-01-06T15:17:29+01:00 upload_webdav: HTTP status 201
[INFO] 2026-01-06T15:17:29+01:00 upload_webdav: Uploading Collection-DESKTOP-WK-2026-01-06T14_03_42Z.log to https://redacted/webdav/
[INFO] 2026-01-06T15:17:29+01:00 upload_webdav: HTTP status 201
[INFO] 2026-01-06T15:17:29+01:00 Collection Complete! Please remove C:/Users/Administrator/Desktop/Collection-DESKTOP-WK-2026-01-06T14_03_42Z.zip when you are sure it was properly transferred
[INFO] 2026-01-06T15:17:29+01:00 Starting collection of Collector
[DEBUG] 2026-01-06T15:17:29+01:00 Query Stats: {"RowsScanned":707,"PluginsCalled":10,"FunctionsCalled":777,"ProtocolSearch":225,"ScopeCopy":1430}
[
 {
  "Upload": {
   "Path": "Collection-DESKTOP-WK-2026-01-06T14_03_42Z.zip",
   "Size": 135581901,
   "UploadId": 0
  },
  "LogUpload": {
   "Path": "Collection-DESKTOP-WK-2026-01-06T14_03_42Z.log",
   "Size": 110739,
   "UploadId": 0
  },
  "_Source": "Collector"
 }

@CLAassistant
Copy link

CLAassistant commented Jan 6, 2026

CLA assistant check
All committers have signed the CLA.

@scudette
Copy link
Contributor

scudette commented Jan 6, 2026

Thanks!

@scudette scudette merged commit 463e552 into Velocidex:master Jan 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants