-
Notifications
You must be signed in to change notification settings - Fork 418
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
File.macho create #1097
File.macho create #1097
Conversation
rebasing
Prepare link to Logs docs changing with the 7.10 release in "products…
Prepare link to Logs docs changing with the 7.10 release in "getting-…
Not that I'm super excited about it, but--how do you envision working with fat object files with multiple architectures? Just wondering because I would think you'd almost need to structure the entire |
Co-authored-by: Andrew Stucki <andrew.stucki@gmail.com>
Co-authored-by: Andrew Stucki <andrew.stucki@gmail.com>
Co-authored-by: Andrew Stucki <andrew.stucki@gmail.com>
Co-authored-by: Andrew Stucki <andrew.stucki@gmail.com>
Co-authored-by: Andrew Stucki <andrew.stucki@gmail.com>
Co-authored-by: Andrew Stucki <andrew.stucki@gmail.com>
Co-authored-by: Eric Beahan <ebeahan@gmail.com>
`macho.headers` to nested
set `headers` to nested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a pass on the macho
YAML field definition.
The only major change I made was removing the sub-fields from macho.segments.sections
, due to using type: flattened
. I also touch on this in another comment below.
Co-authored-by: Eric Beahan <ebeahan@gmail.com>
Co-authored-by: Eric Beahan <ebeahan@gmail.com>
I think we're nearly there with this one. Here's a summary of what's already completed and what's outstanding for advancing:
*I believe the thread here is the last open discussion point, but I'll make another pass at the current field definitions in the proposal. |
| Name | Type | Description | | ||
|--------------------------------------------|------------|-----------------------------------------------------------------------------| | ||
| macho.cpu | object | CPU information for the file. | | ||
| macho.cpu.architecture | keyword | CPU architecture target for the file. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrewstucki I did some cross-checking between the proposed field list here and your work in elastic/beats#24195. I pulled those mappings for macho
into a gist for easier reference.
100% alignment isn't necessary at all at this point. However, there are enough differences between that approach and what's captured here I think it's worth raising.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have since updated this PR with a proposed layout that aligns sections and segments with ELF and PE (which doesn't have segments).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @dcode.
There's still some large differences between the implementation in elastic/beats#24195 and what's proposed here.
Again, not something we need to completely resolve now. At a minimum, let's capture the difference in approaches as a Concern
to make sure we revisit the topic in the next stage's PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrewstucki the strategy I'm suggesting here is splitting out fat binary components that can be unified by the same file metadata (namely hashes or other source unique id's). That will allow analyzing all binaries by their sections, segments, symbols, etc in a seamless way, regardless of platform or if their multi-platform. Do you think that can work for your implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just pining to see if there was a resolution here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dcode sorry, just caught up on this. To clarify, you're talking about essentially emitting an event per cpu architecture? I'm not completely against that, but it does seem like a pretty artificial constraint to model something that is, by its nature, a single entity (i.e. a multi-arch mach-o file).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as a use-case example: let's say we're triggering an alert on a malicious binary that has been compiled for both the new m1 as well as older, intel-based chipsets and we want to add in object-level data about the file. Would we emit two separate alerts, one for each architecture? Seems kind of odd.
Co-authored-by: Derek Ditch <dcode@users.noreply.github.com>
Co-authored-by: Derek Ditch <dcode@users.noreply.github.com>
Moved to new PR #1346 |
RFC Preview
Resolves #1096
make test
? NA at this stagemake
and committed those changes? NA at this stage