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

Adding extension-less Office file snippet #679

Merged
merged 7 commits into from
Dec 19, 2023

Conversation

aidenmitchell
Copy link
Member

Office files without an extension appear as

.file_extension is null
and .file_type == "unknown"
and .content_type == "application/octet-stream"

in MQL, so adding this snippet to all of our Office file rules to ensure coverage. Size check is a guard rail.

@aidenmitchell aidenmitchell requested a review from a team August 21, 2023 18:01
@@ -15,6 +15,12 @@ source: |
.file_extension in~ ("rtf", "doc", "docx")
or .file_extension in~ $file_extensions_common_archives
or .file_extension in~ $file_extensions_macros
or (
.file_extension is null
and .file_type == "unknown"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking you, but it sounds like we should add more file type matchers based on the contents? That way we can detect pdf(x), ppt(x), doc(x), etc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule specifically, or the snippet in general? Agreed that we should have more file type matching, but it shouldn't go inside the snippet.

Copy link
Contributor

@rw-access rw-access Aug 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

totally, nothing you need to change here yet. Just making an observation that it sounds like we're short on some file type matchers in the backend. If we did have extra matchers, then you'd want to update .file_type here

@morriscode
Copy link
Member

100000 is only .1mb. might want to bump it?

@aidenmitchell aidenmitchell requested a review from a team August 25, 2023 18:26
@morriscode
Copy link
Member

/update-test-rules

github-actions bot pushed a commit that referenced this pull request Nov 21, 2023
Adding extension-less Office file snippet by @aidenmitchell
#679
Source SHA 7628945
Triggered by @morriscode
@aidenmitchell aidenmitchell merged commit fa11a71 into sublime-security:main Dec 19, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants