Thursday, March 28, 2024

Microsoft Edge Browser Vulnerability Allows Malicious Hackers Steal Your Computer Local Files

Newly discovered in Microsoft Edge Browser vulnerability allows attackers stealing the computer local files from victims who all are using a vulnerable version of the Edge browser.

This Edge Browser Vulnerability exists in the version 17.8600.40445.0 where the researcher tested and successfully exploits this vulnerability.

Edge browser brought many new security futures and the team behind the Edge has always focused with well defined  Content Security Policy (CSP).

In this case, the researcher identified the flaw in Same Origin Policy (SOP) that allows special format of the URL can inject into the browser and the attacker can read the content of any local file.

Edge Browser Vulnerability Attack Scenario

Basically, SOP functioning Edge browser and other SOP support browsers prevent from an attacker who tries to read the file from users computer by loading the malicious URL.

Because the Protocol and the port need to match if the attacker needs to access the local data using JavaScript-issued request, but it’s not possible since the 2 protocols(( file://https://)) is totally different.

In this case, the Attacker can’t read the local files. but it could be bypassed using another scenario using TWO files URLs neither have a hostname nor a port.

So the attack can be achieved by using two file URLs(file://) that eventually form the same origin in the targeted system because,

  • The port matches: Both have no port
  • The hostname matches: There is no hostname on both of them
  • The protocol scheme matches: Both use the file:// scheme

Attacker Need to Trick the Victim

In this case, Edge’s SOP failed to validate the two same URLs because that has no port, no hostname, also it belongs to same protocol(file://) and the attacker can trick the victims and let them open the malicious HTML file.

Html file contains malicious code that loads the local file:// protocol, as we discussed above, that neither has a hostname nor a port.

Eventually, once the victims execute the malicious URL then it will load into the local system and read the local files in victims computer.

Researchers Albeniz said, I drafted an email from another computer, added the file as an attachment and then opened the attachment in the Mail and Calendar app. Much to my surprise, it worked. I expected that the app, like the Edge browser, would block the attachment.
But this was not the case at all. When I sent the email as an attachment and waited until a user opened it, it would immediately send local files of my choosing to my server, where I could store and read them. There is probably no antivirus program that would recognize my file as malicious, and, I could extract the files over a secure HTTPS connection.

So In order to protect from this attacker, all the Edge user need to update their browsers and Windows Mail and Calendar applications. also, avoid opening attachments from unknown senders.

This vulnerability can exploit using following POC code by changing it in HTML file.

<html> <head> <script> let resultDiv = document.getElementById("result");     let xhr= new XMLHttpRequest();     let user = document.location.href.match(/file:\/\/\/C:\/Users\/([a-z0-9\-]*)\//i)[1];     xhr.open("GET",'file://C:/Users/${user}/Desktop/secret.txt");     xhr.onreadystatechange = ()=> {      if(xhr.readyState==4) {      resultDiv.innerText = xhr.responseText;      }     }     xhr.send(); </script> </head> <body> </body> <div id="result"></div> </html>
Microsoft fixed the vulnerability (CVE-2018-0871) and release Patch June 2018 security updates.
Website

Latest articles

GoPlus’s Latest Report Highlights How Blockchain Communities Are Leveraging Critical API Security Data To Mitigate Web3 Threats

GoPlus Labs, the leading Web3 security infrastructure provider, has unveiled a groundbreaking report highlighting...

Wireshark 4.2.4 Released: What’s New!

Wireshark stands as the undisputed leader, offering unparalleled tools for troubleshooting, analysis, development, and...

Zoom Unveils AI-Powered All-In-One AI Work Workplace

Zoom has taken a monumental leap forward by introducing Zoom Workplace, an all-encompassing AI-powered...

iPhone Users Beware! Darcula Phishing Service Attacking Via iMessage

Phishing allows hackers to exploit human vulnerabilities and trick users into revealing sensitive information...

2 Chrome Zero-Days Exploited at Pwn2Own 2024: Patch Now

Google has announced a crucial update to its Chrome browser, addressing several vulnerabilities, including...

The Moon Malware Hacked 6,000 ASUS Routers in 72hours to Use for Proxy

Black Lotus Labs discovered a multi-year campaign by TheMoon malware targeting vulnerable routers and...
Balaji
Balaji
BALAJI is an Ex-Security Researcher (Threat Research Labs) at Comodo Cybersecurity. Editor-in-Chief & Co-Founder - Cyber Security News & GBHackers On Security.

Mitigating Vulnerability Types & 0-day Threats

Mitigating Vulnerability & 0-day Threats

Alert Fatigue that helps no one as security teams need to triage 100s of vulnerabilities.

  • The problem of vulnerability fatigue today
  • Difference between CVSS-specific vulnerability vs risk-based vulnerability
  • Evaluating vulnerabilities based on the business impact/risk
  • Automation to reduce alert fatigue and enhance security posture significantly

Related Articles