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

Bug fixes and improvement in file sharing alert. #562

Merged
merged 2 commits into from
May 30, 2024

Conversation

VatsalJagani
Copy link
Collaborator

No description provided.

| iplocation ClientIP \
| fillnull value="" Country, Region, City \
| rename ClientIP as Source \
| stats values(Operation) as Operations, values(ObjectId) as ObjectId , values(SharingLinkScope) as SharingLinkScope, values(Permission) as Permission, values(ApplicationDisplayName) as ApplicationDisplayName, values(Source) as Source,values(EventData) as EventData, values(ItemType) as ItemType,values(EventSource) as EventSource latest(_time) as LastTime earliest(_time) as FirstTime, values(Country) as Country, values(City) as City, values(Region) as Region by SourceFileName, UserId \
| rex field=UserId "(?<email_user>[^@]+)@(?<email_domain>.+)" \
| eval email_domain_search = replace(email_domain, "\.", "_") | fillnull value="NOTHING_HERE_NO" email_domain_search \
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic seems it's ignoring all event which has email domain in UserId field. It is not validating which domain it is.

I think it will do similar to the following filter:
| search UserId=anonymous
| search NOT SharingLinkScope="Organization"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

| where !like(ObjectId, "%".email_domain_search."%")

This code is doing that.

Copy link
Contributor

Choose a reason for hiding this comment

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

My bad, I was testing the search where mistakenly \ was replaced.

@VatsalJagani VatsalJagani merged commit 4bbcb88 into master May 30, 2024
1 check failed
@VatsalJagani VatsalJagani deleted the bug-fix-file-sharing branch May 30, 2024 16:34
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.

2 participants