Conversation
vmray_import and vmray_submit both instantiate VMRayRESTAPI with verify_cert hardcoded to False, overriding the library's safe default of True. This silently disables TLS certificate validation for every report fetch and every sample submission, including uploads that carry the malware sample and the API key over the connection, exposing both to interception via a trivial MITM with no warning to the analyst and no way to turn verification back on. A new "disable_certificate_verification" config key is added to both modules (and threaded through VMRayParser.from_api), following the existing disable_tags/disable_misp_objects pattern, so certificate verification is enabled by default and can only be turned off by an explicit, documented opt-in for the rare self-signed deployment. Verified with flake8 (clean) and the full pytest suite against a live modules server on port 6771: 160 passed, 1 failed, 4 skipped, 5 subtests passed, with the single failure (test_macvendors, HTTP 429 rate limit from a third-party API unrelated to vmray) passing on retry in isolation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018dfYpyaSZd1nxSRLr8suj8
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BLUF — The VMRay modules disabled TLS verification unconditionally; it is now on by default.
vmray_submit.pyand the shared_vmrayparser hardcodeverify_cert=Falseon every VMRay API call, so report fetches and sample submissions — including the API key and the malware sample itself — run over TLS that is never validated, with no config option to re-enable checking.disable_certificate_verificationmoduleconfig key to both modules and default certificate verification on.vmray_importorvmray_submitare no longer silently exposed to man-in-the-middle interception of the API key and submitted samples.disable_certificate_verificationto keep working.Both
vmray_submit.pyandvmray_import.py(viaparser.py'sVMRayParser.from_api) hardcoded TLS certificate verification off for every VMRay API call:VMRayRESTAPIdefaultsverify_cert=True(lib/_vmray/rest_api.py:41), but both call sites explicitly override it toFalse, with no config option to turn it back on. Every report fetch and every sample submission is affected — and submission uploads the malware sample itself plus the API key over that unverified connection.Impact: an analyst using either the
vmray_importorvmray_submitmodule is silently exposed to man-in-the-middle interception/tampering on every request to VMRay, including exfiltration of the API key and the submitted sample, with no way to opt back into certificate checking.Fix: added a
disable_certificate_verificationmoduleconfig key to both modules, following the codebase's existingdisable_tags/disable_misp_objectsboolean-config pattern. Certificate verification now defaults toTrue(safe) and can only be disabled via explicit opt-in, for the rare self-signed-deployment case.Behaviour change: this flips the default from "verification disabled" to "verification enabled." This is a deliberate security-default fix — any deployment relying on the previous silent bypass (e.g. against a self-signed VMRay instance) must now set
disable_certificate_verificationto keep working; that is the intended trade-off for closing an unauthenticated MITM exposure by default.Verification
flake8clean on the two changed module files;py_compileclean onlib/_vmray/parser.py.test_macvendors, an HTTP 429 rate limit from a third-party API unrelated to vmray, and it passed on an isolated retry). No vmray-specific tests exist in the suite.Found during a review of the repository; other findings are being submitted as separate PRs.
🤖 Generated with Claude Code