-
Notifications
You must be signed in to change notification settings - Fork 516
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
[New Rule] Google Workspace Resource Copied from External Drive #2627
[New Rule] Google Workspace Resource Copied from External Drive #2627
Conversation
@@ -112,6 +112,9 @@ | |||
"logs-google_workspace*": { | |||
"gsuite.admin": "keyword", | |||
"gsuite.admin.new_value": "keyword", | |||
"gsuite.admin.setting.name": "keyword" | |||
"gsuite.admin.setting.name": "keyword", |
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.
Are these fields new for a yet to be released integration version (or beats 8.8)? Why do they need to be added 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.
the example data is from 8.5. Do we just need to refresh the integrations and update beats?
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 believe these were added when we did the integration validation PR. The GSuite integration was renamed to Google Workspace after 7.16. Therefore the rules in 7.16 failed unit tests as there is no gsuite
integration to validate against nor is it available in EPR because of the rename. As a result, we needed to add this to the non-ecs
file and let it backport to pass validation. @Mikaayenson is this correct?
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.
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.
@brokensound77 So it looks like it HAS to be an ECS or Beats schema field, if not validation will fail because our logic is "valid ECS/Beats AND valid integration". If it were an OR, it would not find it in ECS/Beats but find it in the integrations schema next, therefore it had to be added to non-ecs
file.
...ons/google_workspace/initial_access_google_workspace_object_copied_from_external_source.toml
Show resolved
Hide resolved
…d-from-external-source
…d-from-external-source
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.
LGTM!
…d-from-external-source
…d-from-external-source
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.
Really cool rule and research
…d-from-external-source
…d-from-external-source
…d-from-external-source
…d-from-external-source
* added new rule 'Google Workspace Resource Copied from External Drive' * adjusted mitre att&ck subtechnique ID (cherry picked from commit 7be5788)
* added new rule 'Google Workspace Resource Copied from External Drive' * adjusted mitre att&ck subtechnique ID (cherry picked from commit 7be5788)
* added new rule 'Google Workspace Resource Copied from External Drive' * adjusted mitre att&ck subtechnique ID (cherry picked from commit 7be5788)
* added new rule 'Google Workspace Resource Copied from External Drive' * adjusted mitre att&ck subtechnique ID (cherry picked from commit 7be5788)
* added new rule 'Google Workspace Resource Copied from External Drive' * adjusted mitre att&ck subtechnique ID (cherry picked from commit 7be5788)
* added new rule 'Google Workspace Resource Copied from External Drive' * adjusted mitre att&ck subtechnique ID (cherry picked from commit 7be5788)
* added new rule 'Google Workspace Resource Copied from External Drive' * adjusted mitre att&ck subtechnique ID (cherry picked from commit 7be5788)
* added new rule 'Google Workspace Resource Copied from External Drive' * adjusted mitre att&ck subtechnique ID (cherry picked from commit 7be5788)
* added new rule 'Google Workspace Resource Copied from External Drive' * adjusted mitre att&ck subtechnique ID (cherry picked from commit 7be5788)
Issues
Summary
Detects when a user copies a Google spreadsheet, form, document or script from an external drive. An adversary may send
a phishing email to the victim with a Drive resource link where "copy" is included in the URI, thus copying the resource to
the victim's drive. If a container-bound script is attached to this resource, execution of the related code is done with the user's privileges via OAuth.
Google Workspace users typically share Drive resources with a shareable link where parameters are edited to indicate
when it is viewable or editable by the intended recipient. It is uncommon for a user in an organization to manually
copy a Drive object from an external drive to their corporate drive. This may happen where users find a useful
spreadsheet in a public drive, for example, and replicate it to their Drive.
Additional Information
google_workspace.drive.owner_is_team_drive == "false" and google_workspace.drive.copy_type == "external"
was added to ensure this logic does not flag on internal resource copying which could be quite noisy. FYI, when sharing a resource typically a "share" link is created whereedit
orview
is included in the URI. It is not common forcopy
to be in the URI unless manually created by the source.google_workspace.drive.file.type: ("script", "form", "spreadsheet", "document")
this was added to ensure we scope this down to only resources in Google Workspace that can have container-bound scripts.Example Data
Screenshots