#2072·yara

Add Support for Scanning Windows 64-bit process from 32-bit Processes in YARA

Author: scc-twCreated Apr 30, 2024Updated Apr 30, 2024

Body

Description: I am currently working with YARA for scanning memory blocks in processes, and I came across a limitation when attempting to use a 32-bit version of YARA (WoW64) to scan 64-bit processes. Specifically, I am concerned with how yr_process_get_next_memory_block handles memory queries and manipulations across different architecture boundaries. https://github.com/VirusTotal/yara/blob/adf3ddeaeebd41d66da09c7ddcb9866ab665276f/libyara/proc/windows.c#L151

Request: Is there a plan to add support for scanning 64-bit processes using a 32-bit version of YARA? This feature would be very useful for environments where deploying a 64-bit version is not feasible. Or I could contribute this part of code.

Possible Issues Noted:

  • Handling of memory addresses and size calculations might cause overflows or improper memory block handling when a 32-bit version of YARA scans a 64-bit process.

Environment:

  • Windows 10 64-bit
  • YARA 32-bit version

Expected Outcome: Support for scanning 64-bit with 32-bit YARA (WoW64), which would allow more flexible deployments and potentially improve performance in mixed-architecture environments.

Attachments: None