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

Static scanning: Determine how to handle native code #5

Open
Col-E opened this issue Jul 10, 2023 · 3 comments
Open

Static scanning: Determine how to handle native code #5

Col-E opened this issue Jul 10, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@Col-E
Copy link
Collaborator

Col-E commented Jul 10, 2023

If a jar bundles native code, how do we treat it?

I'm inclined to automatically mark as max sus level and let manual review (by user) decide.
We can print the sha256 hash of each native file so users can easily search for it on maven central / virus total to check for authenticity

@Col-E Col-E added the enhancement New feature or request label Jul 10, 2023
@0xAda
Copy link
Collaborator

0xAda commented Jul 10, 2023

I'd agree with marking it as high severity, maybe we could support a string/pattern scan, but I feel like even that is heading towards scope creep.

@Semisol
Copy link
Collaborator

Semisol commented Jul 10, 2023

I think yara and SSDeep should be good enough if we want to push this a bit far.

@Col-E
Copy link
Collaborator Author

Col-E commented Jul 10, 2023

I'm *heavily against including non-JVM tooling in our Java scanning tool. It expands the scope of responsibilities and complicated requirements. For instance:

  • Do we bundle yara?
    • What OS are they on if we bundle it? Do we make multiple releases for each OS/Platform combo? Do we make a one-for-all release?
  • Do we not bundle yara?
    • Does the user have it on their path?
    • Is it something we'd automate installing?

Hence why I'm inclined to say "hey, here are the hashes, make of these what you will" rather than delve into relying on bundling native applications we don't manage ourselves.

Later down the line we may be able to use Native4J once it is out of private alpha. If we just want to look at the import table we can use JavaPeParser for windows files. Not yet looked around much for Linux ELF files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants