DEV Community

Prathap Rathod
Prathap Rathod

Posted on

Address Bar Spoofing in Microsoft Edge and Safari

The second location bar ridiculing occurrence was found by Pakistani scientist Rafay Baloch, who addresses at different meetings, for example, Blackhat, on his exploration of program security. The location mocking method he found influenced Microsoft Edge and Safari programs.

While a site diverted its guest to another site with a shut port, the assailant could intercede and change the substance of the present website page any way they enjoyed.

Since the URL bar previously demonstrated the location of the area with the shut port, clients were persuaded that they were perusing a real site rather than an aggressor controlled one and are persuaded to enter their accreditations.

In his evidence of-idea, before diverting the client to the site with the shut port, Baloch decoded the base64 encoded rendition of Gmail login page and after that adding it to the DOM. Hence the location in the URL (http://gmail.com:8080) and the phishing page looked exceptionally persuading. Baloch figured out how to keep the parodied location stable by utilizing the setinterval() work that attempted to divert the client like clockwork.

The Code Used to Spoof the Web Browser Address Bar

Baloch used the following code for the aforementioned exploit.

function spoof()
{
var gmail = 'PCFET0NC8+KArOK.........ZHk+PC9odG1sPg=='; // The base64 encoded version of the Gmail page
x=document.body.innerHTML=atob(gmail);
document.write("Gmail");
document.write("x");
window.location.assign("https://www.Gmail.com:8080");
}
setInterval(spoof(),100000);

The proof-of-concept above was the one working on the Microsoft Edge browsers.

Top comments (0)