Skip to content

Enhance ransomware file modification detection logic#576

Open
kevross33 wants to merge 2 commits into
CAPESandbox:masterfrom
kevross33:patch-794950
Open

Enhance ransomware file modification detection logic#576
kevross33 wants to merge 2 commits into
CAPESandbox:masterfrom
kevross33:patch-794950

Conversation

@kevross33

Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the RansomwareFileModifications signature to improve detection accuracy and reduce noise. Key changes include tracking file handles by PID, introducing helper methods for noise path filtering and rename handling, adding support for NtSetInformationFile (handling both renames and delete-on-close operations), and implementing a composite behavior threshold. The review feedback suggests several improvements: performing case-insensitive comparisons for file renames, relaxing the rename matching logic to support extension replacement, optimizing the regular expressions used for extension extraction, and ensuring robust type handling when checking FileInformationClass values.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread modules/signatures/windows/ransomware_filemodifications.py Outdated
Comment thread modules/signatures/windows/ransomware_filemodifications.py Outdated
Comment thread modules/signatures/windows/ransomware_filemodifications.py Outdated
Comment thread modules/signatures/windows/ransomware_filemodifications.py Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant