capa-rules icon indicating copy to clipboard operation
capa-rules copied to clipboard

update screenshot rule: add display regex and GDI+ routines

Open cipherBT opened this issue 8 months ago • 3 comments

closes #981 Hi! I'm an undergraduate student actively preparing a proposal for the Automated Rule Generation GSoC 2026 project. This PR fixes the false negatives for the screenshot capability by accurately implementing @williballenthin original suggestions.

I have verified it locally and ran it against the 2f8... sandbox report to ensure the GDI+ branch fires successfully. Since this is my first time modifying existing rule architecture, I would deeply appreciate any review or feedback on the formatting!

cipherBT avatar Mar 23 '26 22:03 cipherBT

@cipherBT please post a screenshot of the unit tests passing locally before we give this a review.

mike-hunhoff avatar Mar 27 '26 16:03 mike-hunhoff

image image

Hi @mike-hunhoff Here are the local test results

Results: 944 passed, 566 skipped, 179 xfailed, 1 xpassed, 1 failed

The single failure (test_scripts[capa2sarif.py) is unrelated to my rule change, it fails due to a missing sarif_om dependency on my local environmen, which is solved by installing 'python3 -m pip install sarif_om>=1.0.4'.`

All rule-related tests pass cleanly. I have also verified locally that the updated rule successfully detects the GDI+ screenshot behavior against the 2f8a79b.. VMray sandbox report. image

cipherBT avatar Mar 27 '26 22:03 cipherBT

@corkamig what are your thoughts on this one?

mr-tz avatar Jun 03 '26 08:06 mr-tz