The following CVEs were reported in 2023. Please upgrade to the current release which is 0.7.0-4

CVE-2023-5950 Rapid7 Velociraptor Reflected XSS.

Published on 2023-11-06

Rapid7 Velociraptor versions prior to 0.7.0-4 suffer from a reflected cross site scripting vulnerability. This vulnerability allows attackers to inject JS into the error path, potentially leading to unauthorized execution of scripts within a user's web browser. This vulnerability is fixed in version 0.7.0-4 and a patch is available to download. Patches are also available for version 0.6.9 (0.6.9-1)
This issue affects the server only.

Problem:

CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') CWE-79

Product Status:

ProductAffected
Rapid7 Velociraptorbefore 0.7.0-4

Credits:

Mathias Kujala

Timeline:

  • 2023-11-02 - Notification of the issue
  • 2023-11-06 - Release 0.7.0-4 made available on Github

CVE-2023-2226 Velociraptor crashes while parsing some malformed PE or OLE files.

Published by rapid7 Published 2023-04-21 (updated 2023-04-21)

Due to insufficient validation in the PE and OLE parsers in Rapid7's Velociraptor versions earlier than 0.6.8 allows attacker to crash Velociraptor during parsing of maliciously malformed files. 

For this attack to succeed, the attacker needs to be able to introduce malicious files to the system at the same time that Velociraptor attempts to collect any artifacts that attempt to parse PE files, Authenticode signatures, or OLE files. After crashing, the Velociraptor service will restart and it will still be possible to collect other artifacts.

Problem:

CWE-125 Out-of-bounds Read CWE-125

Impact:

CAPEC-540 Overread Buffers CAPEC-540

Affected Product Status:

ProductAffected
Rapid7 Velociraptor » PE Parser, OLE parser, Authenticode parser on Windows
package reposource repo
Default status is unaffected
before 0.6.8

Solution:

Upgrade the clients to version 0.6.8-2

Credits:

Thanks to b1tg https://github.com/b1tg for reporting these issues and providing samples that trigger the crashes


CVE-2023-0242 Insufficient Permission Check In The VQL Copy() Function

Published on 2023-01-18

Improper Privilege Management vulnerability in Rapid7 Velociraptor in the copy() function.

Velociraptor allows users to be created with different privileges on the server. Administrators are generally allowed to run any command on the server including writing arbitrary files. However, lower privilege users are generally forbidden from writing or modifying files on the server.

The VQL copy() function applies permission checks for reading files but does not check for permission to write files. This allows a low privilege user (e.g. users with the Velociraptor "investigator" role) to overwrite files on the server, including Velociraptor configuration files.

To exploit this vulnerability, the attacker must already have a Velociraptor user account at a low privilege level (at least "analyst"). Be able to log into the GUI and create a notebook where they can run the VQL query invoking the copy() VQL function. Typically most users deploy Velociraptor with limited access to a trusted group (most users will be administrators within the GUI).

This vulnerability is associated with program files https://github.Com/Velocidex/velociraptor/blob/master/vql/filesystem/copy.go and program routines copy().

This issue affects Velociraptor: before 0.6.7-5.

Required configuration for exposure:

Velociraptor deployment with multiple users at lower roles than administrators (e.g. "investigator" and above)

Problem:

CWE-269 Improper Privilege Management CWE-269

Impact:

CAPEC-75 Manipulating Writeable Configuration Files CAPEC-75

Product Status:

ProductAffected
Rapid7 Velociraptor » VQL copy() function on Linux, Windows, MacOS, 64 bit, 32 bit
package reposource repohttps://github.com/Velocidex/velociraptor/blob/master/vql/filesystem/copy.gocopy()
Default status is unaffected
before 0.6.7-5 (unaffected from 5)

Solution:

Upgrade to 0.6.7-5

Workaround:

A valid workaround is to prevent the copy function in the Velociraptor allow list:

1. In the configuration wizard answer yes to the question "Do you want to restrict VQL functionality on the server?"
2. This will add a default allow list to the configuration file.
3. Copy this allow list to your existing server.config.yaml
4. Ensure the "copy" function is removed from the default allow list.

Credits:

Paul Alkemade from Telstra

Timeline:

  • 2023-01-12 - Notification of the issue
  • 2023-01-17 - Release 0.6.7-5 made available on Github

CVE-2023-0290 Directory Traversal In Client Id Parameter

Publishedon 2023-01-17

Velociraptor did not properly sanitize the client id parameter to the CreateCollection API allowing a directory traversal in where the collection task could be written. It was possible to provide a client id of "../clients/server" to schedule the collection for the server (as a server artifact), but only require privileges to schedule collections on the client.

Normally to schedule an artifact on the server requires the COLLECT_SERVER permissions (normally only granted to "administrator" role), but due to this issue it is sufficient to have the COLLECT_CLIENT privilege (normally granted to the "investigator" role)

To exploit this vulnerability, the attacker must already have a Velociraptor user account at a low privilege level (not administrator but at least "investigator"). Be able to authenticate to the GUI (e.g. via OAuth2) and issue an API call to the backend. Typically most users deploy Velociraptor with limited access to a trusted group (most users will be administrators within the GUI).

This vulnerability is associated with program files https://github.Com/Velocidex/velociraptor/blob/master/services/launcher/launcher.go and program routines ScheduleArtifactCollection().

This issue affects Velociraptor: before 0.6.7-5.

Required configuration for exposure:

Velociraptor deployment with multiple users at lower roles than administrators (e.g. "investigators")

Problem:

CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') CWE-22

Impact:

CAPEC-233 Privilege Escalation CAPEC-233

Product Status:

ProductAffected
Rapid7 Velociraptor » CreateCollection API on Windows, Linux, MacOS, 64 bit, 32 bit
package reposource repohttps://github.com/Velocidex/velociraptor/blob/master/services/launcher/launcher.goScheduleArtifactCollection()
Default status is unaffected
before 0.6.7-5 (unaffected from 5)

Solution:

Upgrade to 0.6.7-5

Credits:

Paul Alkemade from Telstra

Timeline:

  • 2023-01-13 - Notification of the issue
  • 2023-01-17 - Release 0.6.7-5 made available on Github