Skip to content

Add Binary Seek Functionality and Variable Block Count Resolution for Entropy Analysis - #972

Open
dbstreif wants to merge 5 commits into
ReFirmLabs:masterfrom
dbstreif:feature/entropy-args
Open

dbstreif wants to merge 5 commits into
ReFirmLabs:masterfrom
dbstreif:feature/entropy-args

Conversation

@dbstreif

@dbstreif dbstreif commented Sep 24, 2026 •

Copy link
Copy Markdown

This PR aims to contribute data offset seeking and custom block count values when generating entropy graphs.

I might be hallucinating this, but I think the v2 Python version supported this feature.

I was trying to analyze the entropy of a PE's text section recently when I realized that I had to perform manual preprocessing on the binary to isolate the desired section.

This feature PR adds such functionality in order to make the process a lot less painful.

It also adds the ability to change the block count from the default 2048 to a base2 aligned value of the user's choosing.

This feature essentially is a knob to increase/decrease the granularity of entropy calculation, which can yield much more accurate results for smaller binaries or unreadable data density for really large binaries.

I didn't want to change the contract PostConditions for the blocks() function in entropy.rs so I forced default values instead of throwing errors. It was a minimally invasive approach. Feel free to iterate on this.

And of course, make changes as deemed necessary. I'm not a Rust expert.

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