Can a Windows wallpaper really hijack your Microsoft account password?
Tags: security, windows, phishing, password
Published: 2020-09-22 16:28:21

This month security researcher [*bohops*](https://twitter.com/bohops/status/1302264069311926274 "https://twitter.com/bohops/status/1302264069311926274") demonstrated a credential harvesting trick that uses Windows theme files. Setting a Windows wallpaper location to a file present at a remote location, for example, a password-protected HTTP(s) page, instead of a locally present image, can be abused for phishing.

This happens because the password-protected website, using the [HTTP Basic Access Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication "https://en.wikipedia.org/wiki/Basic_access_authentication"), would naturally prompt the user for a password *to that website,* before the wallpaper can be accessed.

![](https://firebasestorage.googleapis.com/v0/b/hackernoon-app.appspot.com/o/images%2FoTiYTYuLerOJsmYRVttqIdGESsa2-u7j3t4f.jpeg?alt=media&token=0ce8a9e0-cb39-4686-8f24-5581ccb98e4a)

Those not familiar with HTTP Basic Authentication can use the *W3's Jigsaw* link for a demo.

Head straight to [https://jigsaw.w3.org/HTTP/Basic/](https://jigsaw.w3.org/HTTP/Basic/ "https://jigsaw.w3.org/HTTP/Basic/") in your web browser (username and password are both "guest").

Now instead of a webpage, had a wallpaper or Windows theme lived there, and you provided this URL to Windows where a filename was expected, you'd be prompted for a username and password *to that website* in an identical manner.

Actually, other software programs do the same thing. Try inserting a remote resource (image, for example, from a password-protected URL) in Word, and you'd be presented with a similar dialog box.

![](https://firebasestorage.googleapis.com/v0/b/hackernoon-app.appspot.com/o/images%2FoTiYTYuLerOJsmYRVttqIdGESsa2-7b1m3tbv.jpeg?alt=media&token=02fc53ed-df7e-4709-a369-6986e1a4f9a3)

## Phishing attacks? Maybe...

Yes, in some ways, this "intended feature" can be abused for phishing attacks: if a naïve user on seeing a native system dialog box enters *their* Windows or Microsoft Account credentials as opposed to the website's.

However, I'd argue in that case the user really doesn't know what they are doing and need additional computer security training.

**Moreover, in all cases - whether you were setting a remote wallpaper, or inserting an image into your Word document, the name of the website requesting the password is clearly displayed.**

According to [*bohops*](https://twitter.com/bohops/status/1302264071379734533 "https://twitter.com/bohops/status/1302264071379734533")*,* Microsoft stated they'd not be patching this bug as it was a "feature by design," but I'd argue why should they? What is a better way to allow HTTP Basic Authentication?

Maybe disable the option of allowing remote resources from being inserted in some locations (such as wallpapers and themes) altogether?

The only other way I can think that may help is, adding a warning to all such dialog boxes.

For example, whenever a user tries to access an HTTP Basic Auth-protected resource, a system-initiated prompt requesting the password should make it very clear to the user that this is not a solicitation for their Windows credentials.

After all, the chances of the (unknown) remote resource or wallpaper, and the user's Windows account sharing the same set of credentials are infinitesimally small.

## NTLM "Pass-the-hash" hack: more serious

Further investigation conducted by Lawrence Abrams of [BleepingComputer](https://www.bleepingcomputer.com/news/microsoft/windows-10-themes-can-be-abused-to-steal-windows-passwords/ "https://www.bleepingcomputer.com/news/microsoft/windows-10-themes-can-be-abused-to-steal-windows-passwords/") \[full disclosure: I occasionally write for them\] though reveals an additional attack vector.

Instead of a URL requiring HTTP Basic Authentication what if the remote wallpaper used a different protocol? For example, what if the remote wallpaper/theme lived at a Samba (smb) share?

When trying to access a remote Samba location (e.g. \\\\example.com\\wallpapers\\image.jpg), Windows would **automatically** try to authenticate to the share by sharing the user's NTLM hashes in the background to the remote server. This is called "[passing the hash](https://en.wikipedia.org/wiki/Pass_the_hash "https://en.wikipedia.org/wiki/Pass_the_hash")" authentication.

Now, this is a problem... Simply by adding an attacker-provided wallpaper or a Windows theme file to your system would initiate a connection to the attacker's server and share your NTLM hashes without your knowledge or explicit consent.

Although NTLM hashes are encrypted, it may not take that long for them to be cracked as history tells us.

"In a Pass-the-Hash attack, the sent credentials are harvested by the attackers, who then attempt to dehash the password to access the visitors' login name and password," writes Abrams.

"In a test [previously done by BleepingComputer](https://www.bleepingcomputer.com/news/security/understanding-the-windows-credential-leak-flaw-and-how-to-prevent-it/ "https://www.bleepingcomputer.com/news/security/understanding-the-windows-credential-leak-flaw-and-how-to-prevent-it/"), dehashing an easy password took approximately 4 seconds to crack!" he continues.

Therefore, the short answer to the question, if Windows wallpapers can hijack your Microsoft Account credentials is, **"yes, but it depends."**

Whereas the HTTP Basic Authentication may be easier to spot for seasoned users, the "pass-the-hash" authentication hack is more subtle and its automatic nature makes it difficult for the end-user to prevent credential harvesting attacks.

A key point to note though, HTTP Basic Authentication transmits your credentials in plaintext over a network (unless the website requesting the password uses HTTPS), whereas NTLM "pass the hash" authentication would **not** transmit your actual plaintext password, but a [hash](https://en.wikipedia.org/wiki/Cryptographic_hash_function "https://en.wikipedia.org/wiki/Cryptographic_hash_function") of it.

Still, the risk remains from "pass the hash," given the attacker would *now* know your Windows username and potentially be able to guess or deduce your Windows password from the hash (if the password was weak).

Users should therefore refrain from using Windows wallpapers and theme files from untrusted sources.