+44 (0)203 88 020 88

Menu

Search

Cyber Security News & Articles

 

Cyber Security
News & Articles

Trusted Cyber Security Experts
25+ Years Industry Experience
Ethical, Professional & Pragmatic

Microsoft Teams Reverse Shell Attack Using GIFs

A number of vulnerabilities have been exploited in Microsoft Teams by attackers through the use of GIFs. The attack technique has been named ‘GIFShell’, and allows the attackers to send malicious files, execute commands, and exfiltrate data from their victims. Affected versions of Microsoft Teams include version 1.5.00.11163 and earlier, where the exploited insecure design elements and vulnerabilities are present. However, security researcher Bobbyr who discovered and reported on this flaw on Medium states that these “remain unpatched in the most recent version of Teams” and therefore attackers can still use the GIFShell attack chain in the current version. 

This is a reverse shell attack, where the attacker and victim do not have direct communication, instead all communication is with the Microsoft Teams Server. This can be channelled through malicious GIFs that are sent via Teams Messages, or through out of bounds lookups of GIFs by the Microsoft servers themselves. Because the traffic going to the victims is ‘legitimate’ traffic from the Microsoft servers, this attack is harder for security software to detect.  

Seven different insecure elements and vulnerabilities are exploited to accomplish this attack:  

  1. Microsoft Teams allows for all external senders to send messages to users within a new tenant by default 
  2. Microsoft Teams messages are stored in plain text in the low-privileged user’s file directory and can be scanned easily by a simple staged payload  
  3. The GIFShell stager can run and scan the Teams plain text log files with no need for elevated or administrator privileges 
  4. Microsoft Teams attempts to render GIFs on the user’s behalf, which allows for Out of Bounds HTTP and DNS requests 
  5. GIFs in Microsoft Teams messages are base64 encoded and not scanned for malicious bytes or content 
  6. Sending of Microsoft Teams messages can be easily automated using the Python requests module which bypasses restrictions from the Microsoft Graph API 
  7. Data can be exfiltrated via Teams Cards embedded with GIFs due to no protections or authentication necessary when sending Teams messages to a public webhook 

A further two vulnerabilities caused by a lack of permission enforcement and attachment spoofing can be used by the attackers to drop and execute the GIFShell stager on the victim’s computer, which completes the attack chain. This uses techniques and vulnerabilities detailed in another Medium post by the same security researcher. Although all of the flaws involved in this attack were disclosed to Microsoft in May and June 2022, they were not directly addressed, as Microsoft believed that they did not meet the “bar for immediate servicing”. A workaround to avoid falling victim to this attack is to disable the default external access setting in Microsoft Teams, and monitor unusual requests in the log files, or specifically in the Teams Gif lookup, for long Gif names which could potentially contain exfiltrated data.  

Administrators can also adjust the Teams settings to prevent the use of GIFs and stickers by setting Messaging Policies 

 

 

Subscribe to our monthly newsletter today

If you’d like to stay up-to-date with the latest cyber security news and articles from our technical team, you can sign up to our monthly newsletter. 

We hate spam as much as you do, so we promise not to bombard you with emails. We’ll send you a single, curated email each month that contains all of our cyber security news and articles for that month.

Why Choose SecureTeam?

CREST
CCS
ISO9001
ISO27001
CE-PLUS

Customer Testimonials

“We were very impressed with the service, I will say, the vulnerability found was one our previous organisation had not picked up, which does make you wonder if anything else was missed.”

Aim Ltd Chief Technology Officer (CTO)

"Within a very tight timescale, SecureTeam managed to deliver a highly professional service efficiently. The team helped the process with regular updates and escalation where necessary. Would highly recommend"

IoT Solutions Group Limited Chief Technology Officer (CTO) & Founder

“First class service as ever. We learn something new each year! Thank you to all your team.”

Royal Haskoning DHV Service Delivery Manager

“We’ve worked with SecureTeam for a few years to conduct our testing. The team make it easy to deal with them; they are attentive and explain detailed reports in a jargon-free way that allows the less technical people to understand. I wouldn’t work with anyone else for our cyber security.”

Capital Asset Management Head of Operations

“SecureTeam provided Derbyshire's Education Data Hub with an approachable and professional service to ensure our schools were able to successfully certify for Cyber Essentials. The team provided a smooth end-to-end service and were always on hand to offer advice when necessary.”

Derbyshire County Council Team Manager Education Data Hub

“A very efficient, professional, and friendly delivery of our testing and the results. You delivered exactly what we asked for in the timeframe we needed it, while maintaining quality and integrity. A great job, done well.”

AMX Solutions IT Project Officer

“We were very pleased with the work and report provided. It was easy to translate the provided details into some actionable tasks on our end so that was great. We always appreciate the ongoing support.”

Innovez Ltd Support Officer

Get in touch today

If you’d like to see how SecureTeam can take your cybersecurity posture to the next level, we’d love to hear from you, learn about your requirements and then send you a free quotation for our services.

Our customers love our fast-turnaround, “no-nonsense” quotations – not to mention that we hate high-pressure sales tactics as much as you do.

We know that every organisation is unique, so our detailed scoping process ensures that we provide you with an accurate quotation for our services, which we trust you’ll find highly competitive.

Get in touch with us today and a member of our team will be in touch to provide you with a quotation. 

0

No products in the basket.

No products in the basket.