-
Notifications
You must be signed in to change notification settings - Fork 20
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
Look into other ways than file extension to give Cuckoo file-type hints #47
Comments
I don't see a straight way to achieve this Here is the API documentation of CuckooSandbox: And the values which can be used via |
The latter looks promising though: We could map certain mime types to specific packages. If e.g. we know the mimetype to be image/jpeg but do not know a file extension we could use the ie package to open those files with Internet Explorer explicitly because we know it should be able to do something useful with them. The question is how much new information we might gain by this because we would explicitly be testing if the image tries to exploit some bug in the media libraries used by IE when it would normally be rendered by e.g. Outlook because it's an inline image of an HTML mail. But I'd say, something is better than nothing and Outlook and IE likely use the same libraries to render JPEGs anyway (just a guess). |
... but if we're willing to add code to map mime types to packages we could just as well add our own code to map mime types to extensions instead of relying on or at least overriding parts of the logic of the |
Windows goes by file extension. Linux by file magic. To make it a bit more complex: File can be differnt file types: https://github.com/corkami/pocs/tree/master/poly This would be the perfect case - but could require heavy re-design of the database.... Maybe do a quick fix now and start a new issue for this complex handling ? |
It would be best if the exact behavior would be configurable in the ruleset which package to use or multiple. Probably the best default is the Cuckoo generic package that is closest to a double click on windows |
Discussion on #29 showed that mapping from MIME type to file extension throws up lots of questions. We should look into whether the whole issue can be avoided by using other means than the file type extension to give cuckoo a hint about how it needs to analyse a file. One possibility might be providing the MIME type itself to cuckoo and let it figure out what to do with it. This might be especially easy using the REST API.
Suggested by @Jack28.
The text was updated successfully, but these errors were encountered: