HackDig : Dig high-quality web security articles for hackers

Is the polkit Grinch Going to Steal your Christmas?, (Wed, Dec 17th)

2014-12-17 20:00

Alert Logic published a widely publizised blog outlining a common configuration problem with Polkit. To help with dissemination, Alert Logic named the vulnerability Grinch [1] .

In some ways, this isnt so much a vulnerability, as more a common overlypermissive configuration of many Linux systems. It could easily be leveraged to escalate privileges beyond the intent of the polkitconfiguration.

Lets first step back: In the beginning, there was sudo. Sudo served the Unix community well for many decades. I had to Google this myself, but looks like sudo initially was developed in 1986 [2]. Sudois relatively simple in its approach. A simple configuration file outlines who can run what command as what user. Of course, it isnt always as simple, as some software (e.g. many editors) allow the user to spawn shells, but for the most part administrators have found ways to fix these problems over the years. Most importantly, proper ly configured sudo requires the user to enter a password.

Polkit works differently then sudo. With sudo, I configure which software a user is allowed to run as root (or another user). With polkit, I configure which privileges a user is allowed to take advantage of while running a particular piece of software.

The problem pointed out by Alert Logic is two fold. First of all, the default polkitconfiguration on many Unix systems (e.g. Ubuntu), does not require authentication. Secondly, the polkit configuration essentially just maps the wheels group, which is commonly used for sudo users, to the polkit Admin. This gives users in the wheel group access to administrative functions, like installing packages, without having to enter a password.

The main risk is privilege escalation. With sudo, an attacker would have to enter the users password after compromising a lesser user account in the wheel group. With polkit, all it takes is to install a package using the polkit tool pkcon, which takes advantage of the loose polkit configuration to install packages.

What should you do? What is the risk?

First, have a relaxed christmas and enjoy it with your family. Next, take a look around your network and narrow down how is a member of the wheel group. Only administrators should be a member of the group (people who change system configurations and install software for a living). If you got some time between now and Jan 1st: Read up on Polkit and educate yourself as to what it does.

After new year: Make sure you understand how polkit action are logged, and start reviewing them. Polkit is still new, so many system administrators dont know about it and may ignore the alerts.

Of course, Shellshock and this Polkitissue make a great 1-2 punch to get root on a Unix system. But I doubt a system still vulnerable to Shellshock has no other privilege escalation vulnerability. So I dont think it this is such a huge issue. Fix Shellshock first if that is the case.

And as always, make sure to read the original Alert Logic document to get all the details.

[1] https://www.alertlogic.com/blog/dont-let-grinch-steal-christmas/
[2]http://www.sudo.ws/sudo/history.html

---
Johannes B. Ullrich, Ph.D.
STI|Twitter|LinkedIn

(c) SANS Internet Storm Center. https://isc.sans.edu Creative Commons Attribution-Noncommercial 3.0 United States License.


Source: ssr;pma&77091=diyrots?lmth.yraid/ude.snas.csi

Read:3826 | Comments:0 | Tags:No Tag

“Is the polkit Grinch Going to Steal your Christmas?, (Wed, Dec 17th)”0 Comments

Submit A Comment

Name:

Email:

Blog :

Verification Code:

Tools