-
Notifications
You must be signed in to change notification settings - Fork 565
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
improve and fix various dynamic parts #1809
Conversation
if cr.static is None and cr.target.file.pe is not None: | ||
cr.static = Static() | ||
cr.static.pe = cr.target.file.pe |
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.
noticed that this may store the data instead, maybe there's a better way to handle this?
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.
please add a comment with a reference to such a report and CAPE version.
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.
Do we want to add all/many/few reports to capa testfiles?
I'm pulling down sandbox data for all our current testfile EXEs and DLLs.
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 think it would be good to have a fair collection, but not necessarily one for every sample.
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.
adding a few initially here: mandiant/capa-testfiles#217
if len(cr.behavior.processes) == 0: | ||
raise EmptyReportError("CAPE did not capture any processes") |
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.
such empty reports are fairly useless
for symbol in generate_symbols(call.api): | ||
call.api = symbol | ||
|
||
addr = DynamicCallAddress(thread=th.address, id=call_index) | ||
yield CallHandle(address=addr, inner=call) |
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've noticed we run into issues since CAPE reports only list the api (like CreateFileA
), however:
- rules often include the DLL (which we won't get easily here)
- use the generic name (like
CreateFile
[not A/W])
This is one way/part of handling this, maybe we can come up with a more generic way.
81b6d21
to
9361b7b
Compare
9361b7b
to
26460a8
Compare
0ade462
to
316e65d
Compare
316e65d
to
57f7e2e
Compare
addresses various issues encountered during testing
Checklist