The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]




Версия для распечатки Пред. тема | След. тема
Новые ответы [ Отслеживать ]
FreeBSD 10.x PolicyKit backdoor (misconfiguration), !*! z3tbl4, 19-Дек-14, 14:58  [смотреть все]
hi all! subj из коробки (с иксами и кде):

[user@fbsd10] /home/user% su
Password:
su: Sorry
[user@fbsd10] /home/user% sudo csh
Password:
Sorry, try again.
sudo: 1 incorrect password attempts
[user@fbsd10] /home/user% pkexec csh
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/bin/csh' as the super user
Authenticating as: user
Password: [ввожу пароль пользователя user]
==== AUTHENTICATION COMPLETE ===
[root@fbsd10] ~# id
uid=0(root) gid=0(wheel) groups=0(wheel),5(operator)


похоже, дело в /usr/local/share/polkit-1/actions/org.freedesktop.policykit.policy
работает также на PCBSD 10.х

  • FreeBSD 10.x PolicyKit backdoor (misconfiguration), !*! а, 11:00 , 20-Дек-14 (1)
    > [user@fbsd10] /home/user% su
    > Password:
    > su: Sorry

    %username% в группе wheel есть?

    • FreeBSD 10.x PolicyKit backdoor (misconfiguration), !*! z3tbl4, 12:22 , 20-Дек-14 (2)
      >> [user@fbsd10] /home/user% su
      >> Password:
      >> su: Sorry
      > %username% в группе wheel есть?

      есть, но пароля от рута какбы нет

      • FreeBSD 10.x PolicyKit backdoor (misconfiguration), !*! а, 13:13 , 20-Дек-14 (3)
        А в системной консоли зайти под рутом и задать пароль или загрузиться в SingleUser и задать пароль.


        • FreeBSD 10.x PolicyKit backdoor (misconfiguration), !*! z3tbl4, 14:11 , 20-Дек-14 (4)
          > А в системной консоли зайти под рутом и задать пароль или загрузиться
          > в SingleUser и задать пароль.

          тема немного о другом- о том, что если на машине стоит кде4 (kdelibs), то рутовый пароль в принципе не требуется есть доступ к консоли или нет.

          • FreeBSD 10.x PolicyKit backdoor (misconfiguration), !*! a, 17:29 , 20-Дек-14 (5)
            FreeBSD lkhst 10.1-STABLE FreeBSD 10.1-STABLE #1 r275635
            KDE 4.14.2

            /usr/local/share/polkit-1/actions/org.freedesktop.policykit.policy

            ...
              <action id="org.freedesktop.policykit.exec">
                <description>Run programs as another user</description>
                <description xml:lang="da">Kør et program som en anden bruger</description>
                <message>Authentication is required to run a program as another user</message>
                <message xml:lang="da">Autorisering er påkrævet for at afvikle et program som en anden bruger</message>
                <defaults>
                  <allow_any>auth_admin</allow_any>
                  <allow_inactive>auth_admin</allow_inactive>
                  <allow_active>auth_admin</allow_active>
                </defaults>
              </action>

              <action id="org.freedesktop.policykit.lockdown">
                <description>Configure lock down for an action</description>
                <description xml:lang="da">Konfigurer lock down for en action</description>
                <message>Authentication is required to configure lock down policy</message>
                <message xml:lang="da">Autorisering er påkrævet for at konfigurer lock down</message>
                <defaults>
                  <allow_any>no</allow_any>
                  <allow_inactive>no</allow_inactive>
                  <allow_active>auth_admin</allow_active>
                </defaults>
                <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/pklalockdown</annotate>
              </action>

            ...

            %pkexec csh

            Вываливается окно, просит пароль от рута. Мой юзерский не подходит. Полкит не трогал.

            • FreeBSD 10.x PolicyKit backdoor (misconfiguration), !*! a, 17:32 , 20-Дек-14 (6)
              ==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
              Authentication is needed to run `/bin/csh' as the super user
              Authenticating as: Charlie & (root)
              Password:
              polkit-agent-helper-1: pam_authenticate failed: authentication error

              (process:1330): GLib-WARNING **: GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(
              ). Most likely the process is ignoring SIGCHLD, or some other thread is invoking waitpid() with a nonpositive first argument; either
              behavior can break applications that use g_child_watch_add()/g_spawn_sync() either directly or indirectly.
              ==== AUTHENTICATION FAILED ===
              Error executing command as another user: Not authorized

              • FreeBSD 10.x PolicyKit backdoor (misconfiguration), !*! z3tbl4, 17:44 , 20-Дек-14 (7)
                >[оверквотинг удален]
                > Password:
                > polkit-agent-helper-1: pam_authenticate failed: authentication error
                > (process:1330): GLib-WARNING **: GChildWatchSource: Exit status of a child process was
                > requested but ECHILD was received by waitpid(
                > ). Most likely the process is ignoring SIGCHLD, or some other thread
                > is invoking waitpid() with a nonpositive first argument; either
                >  behavior can break applications that use g_child_watch_add()/g_spawn_sync() either directly
                > or indirectly.
                > ==== AUTHENTICATION FAILED ===
                > Error executing command as another user: Not authorized

                попробуйте ввести пароль юзера, от которого запускаете ("Charlie & (root)"?), не рута.
                ща попробую на свежий virtualbox накатить и проверить ещё раз

                • FreeBSD 10.x PolicyKit backdoor (misconfiguration), !*! a, 17:59 , 20-Дек-14 (8)
                  grep Charlie /etc/passwd
                  root:*:0:0:Charlie &:/root:/bin/csh

                  • FreeBSD 10.x PolicyKit backdoor (misconfiguration), !*! z3tbl4, 18:04 , 20-Дек-14 (9)
                    > grep Charlie /etc/passwd
                    > root:*:0:0:Charlie &:/root:/bin/csh

                    меня эта строка смущает
                    Authenticating as: Charlie & (root)

                    когда я авторизуюсь под юзером (не рутом) у меня такая
                    Authenticating as: user

                    вы точно не из под рута pkexec запускаете?
                    %id
                    что говорит?

                    • FreeBSD 10.x PolicyKit backdoor (misconfiguration), !*! a, 18:07 , 20-Дек-14 (10)
                      >> grep Charlie /etc/passwd
                      >> root:*:0:0:Charlie &:/root:/bin/csh
                      > меня эта строка смущает
                      > Authenticating as: Charlie & (root)
                      > когда я авторизуюсь под юзером (не рутом) у меня такая
                      > Authenticating as: user
                      > вы точно не из под рута pkexec запускаете?
                      > %id
                      > что говорит?

                      ich@lkhst:~ % id
                      uid=1001(ich) gid=0(wheel) groups=0(wheel),5(operator)

                      • FreeBSD 10.x PolicyKit backdoor (misconfiguration), !*! z3tbl4, 19:10 , 20-Дек-14 (11)
                        >[оверквотинг удален]
                        >>> root:*:0:0:Charlie &:/root:/bin/csh
                        >> меня эта строка смущает
                        >> Authenticating as: Charlie & (root)
                        >> когда я авторизуюсь под юзером (не рутом) у меня такая
                        >> Authenticating as: user
                        >> вы точно не из под рута pkexec запускаете?
                        >> %id
                        >> что говорит?
                        > ich@lkhst:~ % id
                        > uid=1001(ich) gid=0(wheel) groups=0(wheel),5(operator)

                        ещё раз проверил на снапшоте виртуалки с офсайта(ftp://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/10.1-RE...), результат на скриншоте
                        http://i.imgur.com/0RIiX95.png
                        (тот же)

                        перед этим были поставлены кеды `pkg install kde xorg`

                      • FreeBSD 10.x PolicyKit backdoor (misconfiguration), !*! z3tbl4, 19:56 , 20-Дек-14 (12)
                        >[оверквотинг удален]
                        >>> root:*:0:0:Charlie &:/root:/bin/csh
                        >> меня эта строка смущает
                        >> Authenticating as: Charlie & (root)
                        >> когда я авторизуюсь под юзером (не рутом) у меня такая
                        >> Authenticating as: user
                        >> вы точно не из под рута pkexec запускаете?
                        >> %id
                        >> что говорит?
                        > ich@lkhst:~ % id
                        > uid=1001(ich) gid=0(wheel) groups=0(wheel),5(operator)

                        Воспроизведено на Ubuntu Linux !
                        http://i.imgur.com/jpaiyQE.png

                        • FreeBSD 10.x PolicyKit backdoor (misconfiguration), !*! a, 20:50 , 20-Дек-14 (13)
                          > Воспроизведено на Ubuntu Linux !

                          Gentoo Linux 3.17.4-geek, i3wm

                          ich@zet:~ % id
                          uid=1000(ich) gid=1000(ich) groups=1000(ich),10(wheel),18(audio),19(cdrom),27(video),85(usb),100(users),104(plugdev),1001(libvirt)

                          ich4@zet:~ % pkexec sh
                          ==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
                          Authentication is needed to run `/bin/sh' as the super user
                          Authenticating as: root
                          Password:
                          polkit-agent-helper-1: pam_authenticate failed: Authentication failure
                          ==== AUTHENTICATION FAILED ===
                          Error executing command as another user: Not authorized

                        • FreeBSD 10.x PolicyKit backdoor (misconfiguration), !*! z3tbl4, 21:39 , 20-Дек-14 (14)
                          >[оверквотинг удален]
                          > ich@zet:~ % id
                          > uid=1000(ich) gid=1000(ich) groups=1000(ich),10(wheel),18(audio),19(cdrom),27(video),85(usb),100(users),104(plugdev),1001(libvirt)
                          > ich4@zet:~ % pkexec sh
                          > ==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
                          > Authentication is needed to run `/bin/sh' as the super user
                          > Authenticating as: root
                          > Password:
                          > polkit-agent-helper-1: pam_authenticate failed: Authentication failure
                          > ==== AUTHENTICATION FAILED ===
                          > Error executing command as another user: Not authorized

                          ещё погонял линукс и  фрю и дополнительно выяснилось, что надо быть в группе sudo на линуксе или wheel на фре, однако отключение sudo через sudoers не отключает pkexec. наверное пока это самая большая неприятность.




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру