Sudo haavatavus, mis võimaldab privileegide tõstmist, kasutades spetsiifilisi reegleid.

Utilities Sudo, which is used to organize the execution of commands on behalf of other users, tuvastatud haavatavus (CVE-2019-14287), which allows commands to be executed with root privileges, if there are rules in the sudoers file where the user ID checking section after the allowing keyword "ALL" contains a specific prohibition against running with root privileges ("… (ALL, !root) …"). This vulnerability does not manifest in the default configurations of distributions.

If there are permissible sudoers rules, albeit extremely rarely encountered in practice, allowing the execution of a specific command under the UID of any user except root, an attacker with the right to execute this command can bypass the restriction and run the command with root privileges. To bypass the restriction, it is enough to try executing the specified command with UID "-1" or "4294967295", which will result in its execution with UID 0.

For example, if there is a rule in the settings that allows any user to execute the program /usr/bin/id under any UID:

myhost ALL = (ALL, !root) /usr/bin/id

või variant, mis lubab teostada ainult konkreetset kasutajat bob:

myhost bob = (KÕIK, !root) /usr/bin/id

Kasutaja võib käivitada "sudo -u ‘#-1’ id" ja utiliit /usr/bin/id käivitatakse root’i õigustes, hoolimata selgest keeldumisest seadetes. Probleem tuleneb tähelepanematusest eriväärtuste "-1" või "4294967295", mis ei põhjusta UID vahetust, kuid kuna sudo juba töötab root’i all, käivitatakse sihtkäsklus samuti root’i õigustes ilma UID vahetuseta.

SUSE ja openSUSE distributsioonides on ilma reeglita "NOPASSWD" haavatavus mitte äratav, kuna sudoers failis on vaikimisi lubatud "Defaults targetpw" režiim, kus toimub UID kontrollimine paroolide andmebaasis, küsides sihtkasutaja parooli sisenemist. Selliste süsteemide puhul saab rünnakut teostada ainult olemasolevate reeglitega, nagu:

myhost KÕIK = (KÕIK, !root) NOPASSWD: /usr/bin/id

Probleem on lahendatud väljaandes Sudo 1.8.28. Parandus on samuti saadaval kujul patš. Distributsioonides on haavatavus juba lahendatud Debian, Arch Linuxis, SUSE/openSUSE, Ubuntu, Gentoo ja FreeBSD. Käesoleva uudise kirjutamise hetkel on probleem endiselt lahendamata RHEL ja Fedora. Haavatavus tuvastati Apple'i turva-uurijate poolt.

Allikas: opennet.ru

Osta usaldusväärne veebihosting DDoS kaitsega, VPS VDS serverid 🔥 Osta usaldusväärne veebihosting DDoS kaitsega, VPS VDS serverid | ProHoster