Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip show as difference a basicblock if has only NOP instructions #41

Open
marakew opened this issue Apr 11, 2024 · 2 comments
Open

skip show as difference a basicblock if has only NOP instructions #41

marakew opened this issue Apr 11, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@marakew
Copy link

marakew commented Apr 11, 2024

look at the pics

many variants

bindiff_skip_nop1

bindiff_skip_nop2

bindiff_skip_nop3

@marakew marakew added the enhancement New feature or request label Apr 11, 2024
@cblichmann
Copy link
Member

BinDiff, just shows whatever is different in the underlying BinExport files. It has no knowledge about the instruction types.

Implementing such a feature would mean that we need to make BinExport aware of the instruction types as well and mark them somehow.
And then it remains an open question of wether we still want to include the nop-style instructions in the BinDiff similarity score.

There are also use cases where I as an analyst would be legitimately interested in extra nop bytes. If a basic block changes in a way that includes multi-byte nops, then that might be an indicator that something was patched out, or that it should serve as a placeholder for other code/exploits to overwrite it.

@marakew
Copy link
Author

marakew commented Apr 11, 2024

compiler can emit nop/s to align the block

as you can see the picture

there no interests to both blocks if sums of instructions whithout nop the same for it

may be this can be under some addition options, "skip check nops"

i see already exist the function

https://github.com/google/binexport/blob/main/x86_nop.cc

so may be with some addition options it can be enable for this for comparing blocks by instructions ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants