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

Fork points should be made at the point of lowest entropy in the trace #5

Open
kmeisthax opened this issue Feb 22, 2021 · 0 comments
Open

Comments

@kmeisthax
Copy link
Owner

Let's say we encounter a jump table, like so:

ld a, [JMP_PARAM]
ld hl, JMP_TABLE
add a, l
ld l, a
ld a, h
adc a, 0
ld h, a
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]

Right now tracing will hit the last line of the stream and then bail as the entropy of jp [hl] is maximal. It can literally go anywhere if you don't know the value of the jump table's parameter, which goes from 8 to 9 to 16 to up to 25 bits of entropy as to where the jump lands. If we instead forked at the start on the value of a, then we'd only have 8 bits total (although with still plenty of invalid values, which we'd have to discover by some other means).

In order to do entropy minimization, we need to actually track data values through the trace, as well as have a way to analyze data dependencies (so we can discard irrelevant forks).

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

No branches or pull requests

1 participant