{"id":8136,"date":"2025-11-03T10:03:27","date_gmt":"2025-11-03T10:03:27","guid":{"rendered":"https:\/\/serisec.com\/index.php\/2025\/11\/03\/new-bof-tool-exploits-microsoft-teams-cookie-encryption-allowing-attackers-to-access-user-chats\/"},"modified":"2025-11-03T10:03:27","modified_gmt":"2025-11-03T10:03:27","slug":"new-bof-tool-exploits-microsoft-teams-cookie-encryption-allowing-attackers-to-access-user-chats","status":"publish","type":"post","link":"https:\/\/serisec.com\/index.php\/2025\/11\/03\/new-bof-tool-exploits-microsoft-teams-cookie-encryption-allowing-attackers-to-access-user-chats\/","title":{"rendered":"New BOF Tool Exploits Microsoft Teams\u2019 Cookie Encryption Allowing Attackers to Access User Chats"},"content":{"rendered":"<p>    New BOF Tool Exploits Microsoft Teams\u2019 Cookie Encryption Allowing Attackers to Access User Chats<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n    <!-- no image --><br \/>\n \t<BR><br \/>\n<BR><\/BR><\/p>\n<div>\n<p>A specialized Beacon Object File (BOF) designed to extract authentication cookies from Microsoft Teams without disrupting the application.<\/p>\n<p>This development builds on recent findings that expose how Teams stores sensitive access tokens, potentially allowing attackers to impersonate users and access chats, emails, and documents. <\/p>\n<p>The tool, released by Tier Zero Security, adapts an existing browser exploitation technique to bypass Teams\u2019 file-locking mechanisms, raising fresh concerns about endpoint security in enterprise environments.<\/p>\n<p>The innovation stems from a detailed analysis of Teams\u2019 authentication process. As outlined in a recent <a href=\"https:\/\/cybersecuritynews.com\/microsoft-teams-access-tokens\/\" target=\"_blank\" rel=\"noreferrer noopener\">research post<\/a> by RandoriSec, Microsoft Teams embeds a browser window using the msedgewebview2.exe process, a Chromium-based component that handles login via Microsoft\u2019s online services.<\/p>\n<p>During <a href=\"https:\/\/cybersecuritynews.com\/authentication\/\" target=\"_blank\" rel=\"noreferrer noopener\">authentication<\/a>, this process writes cookies to a SQLite database in a manner similar to traditional web browsers.<\/p>\n<p>These cookies contain access tokens that grant entry to Teams conversations, Skype features, and even the Microsoft Graph API for broader Office 365 interactions.<\/p>\n<p>However, modern <a href=\"https:\/\/cybersecuritynews.com\/chromium-blink-vulnerability\/\" target=\"_blank\" rel=\"noreferrer noopener\">Chromium browsers<\/a> have bolstered their defenses. They now protect encryption keys through a COM-based IElevator service that runs with SYSTEM privileges, verifying the caller\u2019s legitimacy by checking the executable\u2019s secure installation path.<\/p>\n<p>This setup demands either execution within the browser process or elevated administrator access to decrypt cookie values. <\/p>\n<p>In contrast, Teams relies on the simpler Data Protection API (DPAPI) tied to the current user\u2019s master key, making its cookies comparatively easier to target once the encryption key is obtained.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-overcoming-file-locks-with-process-injection\"><strong>Overcoming File Locks With Process Injection<\/strong><\/h2>\n<p>A key hurdle in the original research was Teams\u2019 runtime behavior: the application locks its Cookies database file while running, even in the background, preventing direct reads or copies. <\/p>\n<p>Killing the MS-Teams.exe process, as suggested in the post, would alert users and trigger security monitoring.<\/p>\n<p>To address this, the researchers <a href=\"https:\/\/tierzerosecurity.co.nz\/2025\/11\/03\/teams-cookies-bof.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">drew inspiration<\/a> from the Cookie-Monster-BOF, an open-source tool that extracts cookies from live browser processes by duplicating file handles and invoking the IElevator service.<\/p>\n<p>The new Teams-Cookies-BOF repurposes this logic for the messaging app. Instead of terminating Teams, it runs directly within the ms-teams.exe process, potentially via DLL or COM hijacking, to identify child webview processes holding open handles to the Cookies file.<\/p>\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\">\n<div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"teams-cookies-bof\" width=\"696\" height=\"522\" src=\"https:\/\/www.youtube.com\/embed\/609t4AeEwA0?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div>\n<\/figure>\n<p>It duplicates these handles, reads the file contents on the fly, and decrypts the values using the user\u2019s DPAPI master key. This approach ensures stealth, as the tool mimics legitimate process activity without file system disruptions.<\/p>\n<p>Notably, the BOF\u2019s flexibility extends beyond Teams injection. It can execute in any process sharing the same user privileges, querying webview children across the system to download relevant cookies.<\/p>\n<p>While this broadens its applicability, it also introduces detectable indicators, such as unusual handle operations on unrelated processes. <\/p>\n<p>For demonstration, the researchers shared a Gist script that achieves similar results from a neutral context, though it risks pulling non-Teams cookies as collateral.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-implications-for-red-teamers-and-defenders\"><strong>Implications For Red Teamers And Defenders<\/strong><\/h2>\n<p>The decryption mechanism mirrors Cookie-Monster-BOF exactly, employing AES-256-GCM after extracting the nonce and encrypted payload from the \u201cv10\u201d-tagged values in the database. <\/p>\n<p>Once obtained, the tokens enable API calls to fetch conversation histories, read messages, or send phishing content on behalf of victims, escalating risks in lateral movement or social engineering campaigns.<\/p>\n<p>Tier Zero Security has made the BOF publicly <a href=\"https:\/\/github.com\/TierZeroSecurity\/teams-cookies-bof\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">available on GitHub<\/a>, compatible with any <a href=\"https:\/\/cybersecuritynews.com\/command-and-controlc2-server\/\" target=\"_blank\" rel=\"noreferrer noopener\">C2 framework<\/a> supporting Beacon payloads, and it requires no arguments for basic use.<\/p>\n<p>This release underscores a persistent gap in Teams\u2019 security model compared to hardened browsers. Organizations should prioritize behavioral monitoring for process injection, enforce least-privilege execution, and consider endpoint detection rules targeting DPAPI accesses or webview handle manipulations.<\/p>\n<p>As hybrid work relies heavily on Teams, such vulnerabilities highlight the need for ongoing scrutiny of embedded browser components in productivity apps.<\/p>\n<p class=\"has-text-align-center has-background\" style=\"background:linear-gradient(180deg,rgb(238,238,238) 94%,rgb(169,184,195) 100%)\"><strong>Follow us on <a href=\"https:\/\/news.google.com\/publications\/CAAqMggKIixDQklTR3dnTWFoY0tGV041WW1WeWMyVmpkWEpwZEhsdVpYZHpMbU52YlNnQVAB?hl=en-IN&amp;gl=IN&amp;ceid=IN:en\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Google News<\/a>, <a href=\"https:\/\/www.linkedin.com\/company\/cybersecurity-news\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">LinkedIn<\/a>, and <a href=\"https:\/\/x.com\/cyber_press_org\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">X<\/a> for daily cybersecurity updates. <a href=\"https:\/\/cybersecuritynews.com\/contact-us\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Contact us<\/a> to feature your stories.<\/strong><\/p>\n<p>The post <a href=\"https:\/\/cybersecuritynews.com\/bof-tool-exploits-microsoft-teams\/\">New BOF Tool Exploits Microsoft Teams\u2019 Cookie Encryption Allowing Attackers to Access User Chats<\/a> appeared first on <a href=\"https:\/\/cybersecuritynews.com\/\">Cyber Security News<\/a>.<\/p>\n<\/div>\n<p> \t<BR><br \/>\n <BR><\/BR><br \/>\n    Guru Baran<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n<a href=\"https:\/\/cybersecuritynews.com\/bof-tool-exploits-microsoft-teams\/\">Go to cyber-security-news<\/a><br \/>\n \t<BR><br \/>\n <BR><\/BR><\/p>\n","protected":false},"excerpt":{"rendered":"<p>New BOF Tool Exploits Microsoft Teams\u2019 Cookie Encryption Allowing Attackers to Access User Chats A specialized Beacon Object File (BOF) designed to extract authentication cookies from Microsoft Teams without disrupting the application. This development builds on recent findings that expose how Teams stores sensitive access tokens, potentially allowing attackers to impersonate users and access chats, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129,63,395],"tags":[130],"class_list":["post-8136","post","type-post","status-publish","format-standard","hentry","category-cyber-security","category-cyber-security-news","category-windows","tag-cyber-security-news"],"_links":{"self":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/8136"}],"collection":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/comments?post=8136"}],"version-history":[{"count":0,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/8136\/revisions"}],"wp:attachment":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/media?parent=8136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/categories?post=8136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/tags?post=8136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}