Skip to content

Detecting Endianess Securely #2

@DeLuks2006

Description

@DeLuks2006

Since multiple arches need to be parsed, we need a way to tell if ei_data has a valid value and that it matches the expected value for the arch in e_machine.

For that there is right now a big table- this can be simplified by first marking all little- and bi-endian arches and then deleting all big-endian entries.
This would result in treating all e_machine values that are not in the table as big endian, however since most arches are big endian this shouldn't cause that many problems.

After all that we need to do is, read e_machine, compare the ei_data value with the expected value and if they match we continue execution and set a variable to 1 if we are on big endian

later in code before printing we need to check the IsBigEndian value and if its set we need to convert the value to little endian (if needed)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions