[SUGGESTION] add 32 or 64 bit architecture to (or aside) BinaryMagic function #8
Open
Description
Line 50 in 605d46e
So here is my suggestion if you like it I am happy to implement it and make a PR:
My suggestion is to look for the architecture type 32 or 64 bit in the magic header in addition to the file type.
After looking at this three sites I am confident that this is an very easy task:
- https://learn.microsoft.com/en-us/windows/win32/debug/pe-format for pe file
- https://en.wikipedia.org/wiki/Executable_and_Linkable_Format for elf file
- https://en.wikipedia.org/wiki/Mach-O for macho file
I think because of backwards compatibility it is not a viable option to extend the BinaryMagic
function therefor I would implement this feature in a new function ArchType
or so.
I got to this issue because I read the injection code for executable files in the backdoorfactory repo and stumbled upon a todo-comment with the arch type.
I will fix that too just thought I can start here to make it a nicer fix 😄.
Metadata
Assignees
Labels
No labels