Skip to content

VMRay extractor: get_processes() yields invalid entries for PID 0 or missing filename #2807

@secresearch00

Description

@secresearch00

Description

VMRayExtractor.get_processes() yields monitor process entries where:

  • pid == 0, or
  • the monitor process object does not have a valid filename attribute

These entries are not real user processes and appear to be incomplete VMRay monitor records. Passing them through causes downstream logic to run on invalid processes.

A minimal guard resolves the issue:

if monitor_process.pid == 0 or not getattr(monitor_process, "filename", None):
    continue

Steps to Reproduce

  1. Run capa on a VMRay analysis JSON containing monitor entries with pid = 0 or missing filename

  2. Observe that get_processes() yields these entries as valid processes

Expected behavior:

Invalid or incomplete monitor process entries are ignored.

Actual behavior:

They are yielded as valid processes.

Versions

  • Capa version v9.3.1
  • Python 3.12
  • OS: Debian Bookworm (slim)
  • Base image: python:3.12-slim-bookworm
  • Component: /capa/features/extractors/vmray/extractor.py

Additional Information

Tested using the VMray analysis archive from running sample 1ecebdf9dfc8fb0997c4d68fb810182fa3582fc592336e8be071be3ab61daccc (available on VT) in a Windows 10 VM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomersvmrayrelated to VMRay sandbox report analysis

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions