Categories: Vulnerability

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.
Balaji

BALAJI is an Ex-Security Researcher (Threat Research Labs) at Comodo Cybersecurity. Editor-in-Chief & Co-Founder - Cyber Security News & GBHackers On Security.

Recent Posts

Grayscale Investments Data Breach Exposes 693K User Records Reportedly Affected

Grayscale Investments, a prominent crypto asset manager, has reportedly suffered a data breach affecting 693,635…

18 hours ago

Threat Actors Allegedly Selling Database of 1,000 NHS Email Accounts

A database containing over 1,000 email accounts associated with the National Health Service (NHS) has…

18 hours ago

Mallox Ransomware Vulnerability Lets Victims Decrypt Files

Researchers from Avast have uncovered a vulnerability in the cryptographic schema of the Mallox ransomware,…

20 hours ago

Red Hat NetworkManager Flaw Allows Hackers to Gain Root Access

A recently discovered vulnerability in Red Hat's NetworkManager, CVE-2024-8260, has raised concerns in the cybersecurity…

21 hours ago

Tor Browser 14.0 Released With New Android Circuit Options

Tor Browser 14.0 has been officially launched. It brings significant updates and new features to…

22 hours ago

INE Security Launches New Training Solutions to Enhance Cyber Hygiene for SMBs

INE Security offers essential advice to protect digital assets and enhance security. As small businesses…

2 days ago