EulerOS 2.0 SP10 : polkit (EulerOS-SA-2022-1512) - Nessus

High   Plugin ID: 160009

This page contains detailed information about the EulerOS 2.0 SP10 : polkit (EulerOS-SA-2022-1512) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 160009
Name: EulerOS 2.0 SP10 : polkit (EulerOS-SA-2022-1512)
Filename: EulerOS_SA-2022-1512.nasl
Vulnerability Published: 2022-01-25
This Plugin Published: 2022-04-20
Last Modification Time: 2022-04-26
Plugin Version: 1.3
Plugin Type: local
Plugin Family: Huawei Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/cpu, Host/EulerOS/release, Host/EulerOS/rpm-list, Host/EulerOS/sp, Host/local_checks_enabled
Excluded KB Items: Host/EulerOS/uvp_version

Vulnerability Information


Severity: High
Vulnerability Published: 2022-01-25
Patch Published: 2022-04-20
CVE [?]: CVE-2021-4034
CPE [?]: cpe:/o:huawei:euleros:2.0, p-cpe:/a:huawei:euleros:polkit, p-cpe:/a:huawei:euleros:polkit-libs
Exploited by Malware: True

Synopsis

The remote EulerOS host is missing a security update.

Description

According to the versions of the polkit packages installed, the EulerOS installation on the remote host is affected by the following vulnerabilities :

- A local privilege escalation vulnerability was found on polkit's pkexec utility. The pkexec application is a setuid tool designed to allow unprivileged users to run commands as privileged users according predefined policies. The current version of pkexec doesn't handle the calling parameters count correctly and ends trying to execute environment variables as commands. An attacker can leverage this by crafting environment variables in such a way it'll induce pkexec to execute arbitrary code. When successfully executed the attack can cause a local privilege escalation given unprivileged users administrative rights on the target machine. (CVE-2021-4034)

Note that Tenable Network Security has extracted the preceding description block directly from the EulerOS security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.

Solution

Update the affected polkit packages.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the EulerOS 2.0 SP10 : polkit (EulerOS-SA-2022-1512) vulnerability:

  1. Metasploit: exploit/linux/local/cve_2021_4034_pwnkit_lpe_pkexec
    [Local Privilege Escalation in polkits pkexec]
  2. Exploit-DB: exploits/linux/local/50689.txt
    [EDB-50689: PolicyKit-1 0.105-31 - Privilege Escalation]
  3. GitHub: https://github.com/0x4ndy/CVE-2021-4034-PoC
    [CVE-2021-4034: CVE-2021-4034 PoC]
  4. GitHub: https://github.com/0xBruno/CVE-2021-4034
    [CVE-2021-4034: PoC for PwnKit: LPE in polkit's pkexec ...]
  5. GitHub: https://github.com/0xNix/CVE-2021-4034
    [CVE-2021-4034]
  6. GitHub: https://github.com/0xTRAW/CVE-2021-4034
    [CVE-2021-4034]
  7. GitHub: https://github.com/0xalwayslucky/log4j-polkit-poc
    [CVE-2021-4034: vulnerable setup to display an attack chain of log4j CVE-2021-44228 with privilege ...]
  8. GitHub: https://github.com/0xsyr0/OSCP
    [CVE-2021-4034]
  9. GitHub: https://github.com/1nf1n17yk1ng/CVE-2021-4034
    [CVE-2021-4034]
  10. GitHub: https://github.com/4n0nym0u5dk/CVE-2021-4034
    [CVE-2021-4034]
  11. GitHub: https://github.com/10100programer/CVE-2021-4034-Quick-Check
    [CVE-2021-4034: Single shell script to download and make berdav CVE-2021-4034 polkit exploit and see ...]
  12. GitHub: https://github.com/Al1ex/LinuxEelvation
    [CVE-2021-4034]
  13. GitHub: https://github.com/Ankit-Ojha16/CVE-2021-4034
    [CVE-2021-4034]
  14. GitHub: https://github.com/Anonymous-Family/CVE-2021-4034
    [CVE-2021-4034: Linux system service bug gives root on all major distros, exploit published A ...]
  15. GitHub: https://github.com/ArkAngeL43/CVE-2021-4034
    [CVE-2021-4034: POC for the priv esc exploit in PKEXEC [ CVE -2021-4034 ] ( needs fixing, not the ...]
  16. GitHub: https://github.com/Audiobahn/CVE-2021-4034
    [CVE-2021-4034: CVE-2021-4034 🎧]
  17. GitHub: https://github.com/Awrrays/Pentest-Tips
    [CVE-2021-4034]
  18. GitHub: https://github.com/Ayrx/CVE-2021-4034
    [CVE-2021-4034: Exploit for CVE-2021-4034]
  19. GitHub: https://github.com/BachoSeven/stellestelline
    [CVE-2021-4034]
  20. GitHub: https://github.com/EstamelGG/CVE-2021-4034-NoGCC
    [CVE-2021-4034: CVE-2021-4034简单优化,以应对没有安装gcc和make的目标环境]
  21. GitHub: https://github.com/FDlucifer/Pwnkit-go
    [CVE-2021-4034: A golang based exp for CVE-2021-4034 dubbed pwnkit (more features added......)]
  22. GitHub: https://github.com/Fato07/Pwnkit-exploit
    [CVE-2021-4034: Exploit for pkexec (CVE-2021-4034)]
  23. GitHub: https://github.com/Hifumi1337/CVE-2021-4034
    [CVE-2021-4034: Local Privilege Escalation (LPE) vulnerability found on Polkit's pkexec utility]
  24. GitHub: https://github.com/Hiimsonkul/Hiimsonkul
    [CVE-2021-4034]
  25. GitHub: https://github.com/HrishitJoshi/CVE-2021-4034
    [CVE-2021-4034: PWNKIT - Local Privilege Escalation Vulnerability on Linux (Polkit)]
  26. GitHub: https://github.com/IBM-Cloud/vpc-ha-iac
    [CVE-2021-4034]
  27. GitHub: https://github.com/ITMarcin2211/Polkit-s-Pkexec-CVE-2021-4034
    [CVE-2021-4034: Polkit's Pkexec CVE-2021-4034 Proof Of Concept and Patching]
  28. GitHub: https://github.com/Ignitetechnologies/Linux-Privilege-Escalation
    [CVE-2021-4034]
  29. GitHub: https://github.com/Immersive-Labs-Sec/CVE-2021-4034
    [CVE-2021-4034: Proof of Concept for CVE-2021-4034 Polkit Privilege Escalation]
  30. GitHub: https://github.com/J0hnbX/CVE-2021-4034-new
    [CVE-2021-4034]
  31. GitHub: https://github.com/Jesrat/make_me_root
    [CVE-2021-4034]
  32. GitHub: https://github.com/JoaoFukuda/CVE-2021-4034_POC
    [CVE-2021-4034: Proof Of Concept for the 2021's pkexec vulnerability CVE-2021-4034]
  33. GitHub: https://github.com/Joffr3y/Polkit-CVE-2021-4034-HLP
    [CVE-2021-4034: Polkit CVE-2021-4034 exploitation in High-Level Programming Language]
  34. GitHub: https://github.com/JohnHammond/CVE-2021-4034
    [CVE-2021-4034: Bash implementation of CVE-2021-4034]
  35. GitHub: https://github.com/JoyGhoshs/CVE-2021-4034
    [CVE-2021-4034: Exploit for Local Privilege Escalation Vulnerability in polkit’s pkexec]
  36. GitHub: https://github.com/Kashiki078/CVE-2021-4034
    [CVE-2021-4034]
  37. GitHub: https://github.com/LukeGix/CVE-2021-4034
    [CVE-2021-4034: A stupid poc for CVE-2021-4034]
  38. GitHub: https://github.com/MedKH1684/Pwnkit-CVE-2021-4034
    [CVE-2021-4034]
  39. GitHub: https://github.com/Mr-xn/Penetration_Testing_POC
    [CVE-2021-4034]
  40. GitHub: https://github.com/Nel0x/pwnkit-vulnerability
    [CVE-2021-4034: CVE-2021-4034 (PWNKIT). A memory corruption vulnerability in Polkit's pkexec, which ...]
  41. GitHub: https://github.com/NiS3x/CVE-2021-4034
    [CVE-2021-4034: PoC CVE 2021-4034 PwnKit: Local Privilege Escalation Vulnerability Discovered in ...]
  42. GitHub: https://github.com/Nickguitar/YAPS
    [CVE-2021-4034]
  43. GitHub: https://github.com/Nosferatuvjr/PwnKit
    [CVE-2021-4034: Prova de conceito para a vulnerabilidade Polkit Pkexec: CVE-2021-4034(Pkexec Local ...]
  44. GitHub: https://github.com/OXDBXKXO/ez-pwnkit
    [CVE-2021-4034: Go implementation of the PwnKit Linux Local Privilege Escalation exploit ...]
  45. GitHub: https://github.com/OXDBXKXO/go-PwnKit
    [CVE-2021-4034: Go implementation of the PwnKit Linux Local Privilege Escalation exploit ...]
  46. GitHub: https://github.com/OxWeb4/CVE-2021-4034-
    [CVE-2021-4034: PoC for PwnKit: Local Privilege Escalation Vulnerability in polkit’s pkexec ...]
  47. GitHub: https://github.com/PentesterSoham/CVE-2021-4034-exploit
    [CVE-2021-4034: I am not the real author of this exploits.. There are two exploits available, use ...]
  48. GitHub: https://github.com/PeterGottesman/pwnkit-exploit
    [CVE-2021-4034: CVE-2021-4034 POC exploit]
  49. GitHub: https://github.com/Plethore/CVE-2021-4034
    [CVE-2021-4034: Python exploit for CVE-2021-4034]
  50. GitHub: https://github.com/Pr0f3ssor/CVE-2021-4034
    [CVE-2021-4034: PoC for PwnKit: Local Privilege Escalation Vulnerability in polkit’s pkexec ...]
  51. GitHub: https://github.com/PwnFunction/CVE-2021-4034
    [CVE-2021-4034: Proof of concept for pwnkit vulnerability]
  52. GitHub: https://github.com/Rvn0xsy/CVE-2021-4034
    [CVE-2021-4034: CVE-2021-4034 Add Root User - Pkexec Local Privilege Escalation]
  53. GitHub: https://github.com/Sakura-nee/CVE-2021-4034
    [CVE-2021-4034]
  54. GitHub: https://github.com/SnailDev/github-hot-hub
    [CVE-2021-4034]
  55. GitHub: https://github.com/SugarP1g/LearningSecurity
    [CVE-2021-4034]
  56. GitHub: https://github.com/T3cnokarita/CVE-2021-4034
    [CVE-2021-4034]
  57. GitHub: https://github.com/T369-Real/pwnkit-pwn
    [CVE-2021-4034: It is a simple script coded in bash scripting to exploit the PwnKit vulnerability ...]
  58. GitHub: https://github.com/TW-D/PwnKit-Vulnerability_CVE-2021-4034
    [CVE-2021-4034: PwnKit - Local Privilege Escalation Vulnerability Discovered in polkit’s pkexec ...]
  59. GitHub: https://github.com/Tanmay-N/CVE-2021-4034
    [CVE-2021-4034]
  60. GitHub: https://github.com/TheJoyOfHacking/berdav-CVE-2021-4034
    [CVE-2021-4034]
  61. GitHub: https://github.com/Y3A/CVE-2021-4034
    [CVE-2021-4034]
  62. GitHub: https://github.com/Yakumwamba/POC-CVE-2021-4034
    [CVE-2021-4034]
  63. GitHub: https://github.com/aasphixie/aasphixie.github.io
    [CVE-2021-4034]
  64. GitHub: https://github.com/an0n7os/CVE-2021-4034
    [CVE-2021-4034]
  65. GitHub: https://github.com/antoinenguyen-09/CVE-2021-4034
    [CVE-2021-4034: My research about CVE-2021-4034]
  66. GitHub: https://github.com/artemis-mike/cve-2021-4034
    [CVE-2021-4034: PoC for cve-2021-4034]
  67. GitHub: https://github.com/arveske/Github-language-trends
    [CVE-2021-4034]
  68. GitHub: https://github.com/ashishlaxkar16/vulnerabilities
    [CVE-2021-4034]
  69. GitHub: https://github.com/ashutoshrohilla/CVE-2021-4034
    [CVE-2021-4034: This repository contains the exploit for vulnerability CVE-2021-4034 .]
  70. GitHub: https://github.com/aus-mate/CVE-2021-4034-POC
    [CVE-2021-4034]
  71. GitHub: https://github.com/ayypril/CVE-2021-4034
    [CVE-2021-4034]
  72. GitHub: https://github.com/azminawwar/CVE-2021-4034
    [CVE-2021-4034: CVE-2021-4034 in Bash Script]
  73. GitHub: https://github.com/backloop-biz/CVE_checks
    [CVE-2021-4034]
  74. GitHub: https://github.com/bakhtiyarsierad/CVE-2021-4034-bug-root
    [CVE-2021-4034]
  75. GitHub: https://github.com/bc29ea3c101054baa1429ffc2edba4ae/sigma_detection_rules
    [CVE-2021-4034]
  76. GitHub: https://github.com/berdav/CVE-2021-4034
    [CVE-2021-4034: CVE-2021-4034 1day]
  77. GitHub: https://github.com/binganao/vulns-2022
    [CVE-2021-4034]
  78. GitHub: https://github.com/binksjar/cve-2021-4034
    [CVE-2021-4034: Simple POC Code]
  79. GitHub: https://github.com/bollwarm/SecToolSet
    [CVE-2021-4034]
  80. GitHub: https://github.com/c0br40x/test
    [CVE-2021-4034]
  81. GitHub: https://github.com/c3l3si4n/pwnkit
    [CVE-2021-4034: PoC for the CVE-2021-4034 vulnerability, affecting polkit < 0.120.]
  82. GitHub: https://github.com/callrbx/pkexec-lpe-poc
    [CVE-2021-4034: POC for CVE-2021-4034]
  83. GitHub: https://github.com/cd80-ctf/CVE-2021-4034
    [CVE-2021-4034: A simple proof-of-concept for CVE-2021-4034 (pkexec local privilege escalation)]
  84. GitHub: https://github.com/ck00004/CVE-2021-4034
    [CVE-2021-4034: CVE-2021-4034 centos8可用版本]
  85. GitHub: https://github.com/clubby789/CVE-2021-4034
    [CVE-2021-4034]
  86. GitHub: https://github.com/cspshivam/cve-2021-4034
    [CVE-2021-4034: Pwnkit exploit]
  87. GitHub: https://github.com/dadvlingd/-CVE-2021-4034
    [CVE-2021-4034]
  88. GitHub: https://github.com/daphnetd/daphnetd
    [CVE-2021-4034]
  89. GitHub: https://github.com/drapl0n/dawnKit
    [CVE-2021-4034: DawnKit is Privilege Escalation USB-Rubber-Ducky payload, which exploits ...]
  90. GitHub: https://github.com/drapl0n/pwnKit
    [CVE-2021-4034: PwnKit: Privilege Escalation USB-Rubber-Ducky payload, which exploits CVE-2021-4034 ...]
  91. GitHub: https://github.com/dzonerzy/poc-cve-2021-4034
    [CVE-2021-4034: PoC for CVE-2021-4034 dubbed pwnkit]
  92. GitHub: https://github.com/d-rn/vulBox
    [CVE-2021-4034]
  93. GitHub: https://github.com/edsonjt81/CVE-2021-4034-Linux
    [CVE-2021-4034]
  94. GitHub: https://github.com/evdenis/lsm_bpf_check_argc0
    [CVE-2021-4034: LSM BPF module to block pwnkit (CVE-2021-4034) like exploits]
  95. GitHub: https://github.com/fdellwing/CVE-2021-4034
    [CVE-2021-4034]
  96. GitHub: https://github.com/galoget/PwnKit-CVE-2021-4034
    [CVE-2021-4034]
  97. GitHub: https://github.com/gbrsh/CVE-2021-4034
    [CVE-2021-4034]
  98. GitHub: https://github.com/glowbase/CVE-2021-4034
    [CVE-2021-4034: Local privilege escalation vulnerability for polkit's pkexec utility]
  99. GitHub: https://github.com/glowbase/PwnKit-CVE-2021-4034
    [CVE-2021-4034: PwnKit PoC - Local privilege escalation vulnerability for polkit's pkexec utility ...]
  100. GitHub: https://github.com/hAV9sad/CVE-2021-4034
    [CVE-2021-4034: golang implementation of CVE-2021-403]
  101. GitHub: https://github.com/hahaleyile/CVE-2021-4034
    [CVE-2021-4034]
  102. GitHub: https://github.com/jcatala/f_poc_cve-2021-4034
    [CVE-2021-4034]
  103. GitHub: https://github.com/joeammond/CVE-2021-4034
    [CVE-2021-4034: Python exploit code for CVE-2021-4034 (pwnkit)]
  104. GitHub: https://github.com/jostmart/-CVE-2021-4034
    [CVE-2021-4034]
  105. GitHub: https://github.com/k4u5h41/CVE-2021-4034
    [CVE-2021-4034]
  106. GitHub: https://github.com/kangpaidjo/CVE-2021-4034
    [CVE-2021-4034]
  107. GitHub: https://github.com/kaosagnt/ansible-everyday
    [CVE-2021-4034]
  108. GitHub: https://github.com/karaname/pkexec-exploit
    [CVE-2021-4034]
  109. GitHub: https://github.com/learner-ing/changeTools
    [CVE-2021-4034]
  110. GitHub: https://github.com/liamg/traitor
    [CVE-2021-4034]
  111. GitHub: https://github.com/lonnyzhang423/github-hot-hub
    [CVE-2021-4034]
  112. GitHub: https://github.com/mebeim/CVE-2021-4034
    [CVE-2021-4034: CVE-2021-4034: Local Privilege Escalation in polkit's pkexec proof of concept]
  113. GitHub: https://github.com/mike-artemis/cve-2021-4034
    [CVE-2021-4034: PoC for cve-2021-4034]
  114. GitHub: https://github.com/milot/dissecting-pkexec-cve-2021-4034
    [CVE-2021-4034]
  115. GitHub: https://github.com/movvamrocks/PwnKit-CVE-2021-4034
    [CVE-2021-4034]
  116. GitHub: https://github.com/mtthwstffrd/berdav-CVE-2021-4034
    [CVE-2021-4034]
  117. GitHub: https://github.com/n1sh1th/CVE-POC
    [CVE-2021-4034]
  118. GitHub: https://github.com/navisec/CVE-2021-4034-PwnKit
    [CVE-2021-4034: PwnKit PoC for Polkit pkexec CVE-2021-4034]
  119. GitHub: https://github.com/nel0x/pwnkit-vulnerability
    [CVE-2021-4034: CVE-2021-4034 (PWNKIT).]
  120. GitHub: https://github.com/nikaiw/CVE-2021-4034
    [CVE-2021-4034: PoC for CVE-2021-4034]
  121. GitHub: https://github.com/nikip72/CVE-2021-4034
    [CVE-2021-4034]
  122. GitHub: https://github.com/nobelh/CVE-2020-4034
    [CVE-2021-4034: Polkit pkexec CVE-2021-4034 Proof Of Concept]
  123. GitHub: https://github.com/pengalaman-1t/CVE-2021-4034
    [CVE-2021-4034]
  124. GitHub: https://github.com/phvilasboas/CVE-2021-4034
    [CVE-2021-4034]
  125. GitHub: https://github.com/ponsfrilus/ponsfrilus
    [CVE-2021-4034]
  126. GitHub: https://github.com/puckiestyle/CVE-2021-4034
    [CVE-2021-4034]
  127. GitHub: https://github.com/pyhrr0/pwnkit
    [CVE-2021-4034: PoC for CVE-2021-4034.]
  128. GitHub: https://github.com/qq224015/CVE-2021-4034
    [CVE-2021-4034]
  129. GitHub: https://github.com/ravindubw/CVE-2021-4034
    [CVE-2021-4034: PoC for PwnKit: Local Privilege Escalation Vulnerability in polkit’s pkexec in ...]
  130. GitHub: https://github.com/rhin0cer0s/CVE-2021-4034
    [CVE-2021-4034: A pkexec CVE-2021-4034 vulnerability exploit]
  131. GitHub: https://github.com/robemmerson/CVE-2021-4034
    [CVE-2021-4034]
  132. GitHub: https://github.com/rvizx/CVE-2021-4034
    [CVE-2021-4034: PoC for PwnKit: Local Privilege Escalation Vulnerability in polkit’s pkexec in ...]
  133. GitHub: https://github.com/ryaagard/CVE-2021-4034
    [CVE-2021-4034: Local Privilege Escalation in polkit's pkexec]
  134. GitHub: https://github.com/san3ncrypt3d/CVE-2021-4034-POC
    [CVE-2021-4034]
  135. GitHub: https://github.com/sanchez-anthony/ansible_pwnkit_mitigation
    [CVE-2021-4034]
  136. GitHub: https://github.com/sarutobi12/sarutobi12
    [CVE-2021-4034]
  137. GitHub: https://github.com/signfind/CVE-2021-4034
    [CVE-2021-4034]
  138. GitHub: https://github.com/slange-dev/slange-dev
    [CVE-2021-4034]
  139. GitHub: https://github.com/sunny0day/CVE-2021-4034
    [CVE-2021-4034]
  140. GitHub: https://github.com/szaszm/pwnkit
    [CVE-2021-4034]
  141. GitHub: https://github.com/tahaafarooq/CVE-2021-4034
    [CVE-2021-4034: Polkit vulnerability poc and automated mitigation]
  142. GitHub: https://github.com/tanjiti/sec_profile
    [CVE-2021-4034]
  143. GitHub: https://github.com/teelrabbit/Polkit-pkexec-exploit-for-Linux
    [CVE-2021-4034]
  144. GitHub: https://github.com/tzwlhack/CVE-2021-4034
    [CVE-2021-4034]
  145. GitHub: https://github.com/uhub/awesome-c
    [CVE-2021-4034]
  146. GitHub: https://github.com/vilasboasph/CVE-2021-4034
    [CVE-2021-4034]
  147. GitHub: https://github.com/v-rzh/CVE-2021-4034
    [CVE-2021-4034: Exploit for the PwnKit Vulnerability]
  148. GitHub: https://github.com/whokilleddb/CVE-2021-4034
    [CVE-2021-4034: An exploit for CVE-2021-4034 aka Pwnkit: Local Privilege Escalation in polkit's ...]
  149. GitHub: https://github.com/wongwaituck/CVE-2021-4034
    [CVE-2021-4034]
  150. GitHub: https://github.com/x04000/AutoPwnkit
    [CVE-2021-4034: A tool to automate the exploit PWNKIT (CVE-2021-4034)]
  151. GitHub: https://github.com/x04000/CVE-2021-4034
    [CVE-2021-4034: A simple PWNKIT file to convert you to root]
  152. GitHub: https://github.com/xcanwin/CVE-2021-4034-UniontechOS
    [CVE-2021-4034: 低调证明]
  153. GitHub: https://github.com/xuntitled/Polkit-pkexec-exploit-for-Linux
    [CVE-2021-4034]
  154. GitHub: https://github.com/xymeng16/security
    [CVE-2021-4034]
  155. GitHub: https://github.com/zcrosman/cve-2021-4034
    [CVE-2021-4034]
  156. GitHub: https://github.com/zetaemme/b4d_p3n6u1n
    [CVE-2021-4034]
  157. GitHub: https://github.com/0x05a/my-cve-2021-4034-poc
    [CVE-2021-4034: My PoC]
  158. GitHub: https://github.com/Al1ex/CVE-2021-4034
    [CVE-2021-4034: Local Privilege Escalation in polkit's pkexec (CVE-2021-4034)]
  159. GitHub: https://github.com/An00bRektn/CVE-2021-4034
    [CVE-2021-4034: A Golang implementation of clubby789's implementation of CVE-2021-4034]
  160. GitHub: https://github.com/c3c/CVE-2021-4034
    [CVE-2021-4034: Pre-compiled builds for CVE-2021-4034]
  161. GitHub: https://github.com/chenaotian/CVE-2021-4034
    [CVE-2021-4034: CVE-2021-4034 POC and Docker and Analysis write up]
  162. GitHub: https://github.com/chenaotian/CVE-2022-0185
    [CVE-2021-4034: CVE-2021-4034 POC and Docker and simple Analysis write up]
  163. GitHub: https://github.com/codiobert/pwnkit-scanner
    [CVE-2021-4034: Check CVE-2021-4034 vulnerability]
  164. GitHub: https://github.com/CYB3RK1D/CVE-2021-4034-POC
    [CVE-2021-4034: Pwnkit]
  165. GitHub: https://github.com/DanaEpp/pwncat_pwnkit
    [CVE-2021-4034: Pwncat module that automatically exploits CVE-2021-4034 (pwnkit)]
  166. GitHub: https://github.com/defhacks/cve-2021-4034
    [CVE-2021-4034: Port of CVE-2021-4034 exploit to Rust/cargo for my own edification]
  167. GitHub: https://github.com/deoxykev/CVE-2021-4034-Rust
    [CVE-2021-4034: Linux LPE using polkit-1 written in Rust.]
  168. GitHub: https://github.com/fireclasher/pwnkit-CVE-2021-4034-
    [CVE-2021-4034: Local privilage esscalation vulnerablity]
  169. GitHub: https://github.com/hackingyseguridad/CVE-2021-4034
    [CVE-2021-4034: CVE-2021-4034, exploit para escalado de privilegios en SO Linux a root]
  170. GitHub: https://github.com/hohn/codeql-sample-polkit
    [CVE-2021-4034: All stages of exploring the polkit CVE-2021-4034 using codeql]
  171. GitHub: https://github.com/jpmcb/pwnkit-go
    [CVE-2021-4034: Exploit for the PwnKit vulnerability, CVE-2021-4034, written in Go]
  172. GitHub: https://github.com/kimusan/pkwner
    [CVE-2021-4034: A python3 and bash PoC for CVE-2021-4034 by Kim Schulz]
  173. GitHub: https://github.com/LJP-TW/CVE-2021-4034
    [CVE-2021-4034: Pkexec EoP exploit]
  174. GitHub: https://github.com/lourkeur/cve-2021-4034-playground
    [CVE-2021-4034: Impromptu pwn chal]
  175. GitHub: https://github.com/luckythandel/CVE-2021-4034
    [CVE-2021-4034: This is a POC for the vulnerability found in polkit's pkexec binary which is used to ...]
  176. GitHub: https://github.com/luijait/PwnKit-Exploit
    [CVE-2021-4034: Proof of Concept (PoC) CVE-2021-4034]
  177. GitHub: https://github.com/ly4k/PwnKit
    [CVE-2021-4034: Self-contained exploit for CVE-2021-4034 - Pkexec Local Privilege Escalation]
  178. GitHub: https://github.com/moldabekov/CVE-2021-4034
    [CVE-2021-4034: Pseudo patch for CVE-2021-4034]
  179. GitHub: https://github.com/mutur4/Hacking-Scripts
    [CVE-2021-4034: This is a repo about some hacking scripts to make your hacks better and ...]
  180. GitHub: https://github.com/N1et/CVE-2021-4034
    [CVE-2021-4034: Just a sh script file to CVE-2021-4034]
  181. GitHub: https://github.com/n3onhacks/CVE-2021-4034-BASH-One-File-Exploit
    [CVE-2021-4034: CVE-2021-4034 - One line in the terminal for an instant priv esc to boxes that are ...]
  182. GitHub: https://github.com/Nero22k/CVE-2021-4034
    [CVE-2021-4034: Dirty PoC for CVE-2021-4034 (Pwnkit)]
  183. GitHub: https://github.com/nobelh/CVE-2021-4034
    [CVE-2021-4034: Polkit pkexec CVE-2021-4034 Proof Of Concept and Patching]
  184. GitHub: https://github.com/oreosec/pwnkit
    [CVE-2021-4034]
  185. GitHub: https://github.com/Ph4nt0mh4x0r/auto-CVE-2021-4034
    [CVE-2021-4034: A python script that downloads neofetch and traitor and attempts to exploit ...]
  186. GitHub: https://github.com/Pr0f3ssor/CVE-2021-4034-Pwnkit
    [CVE-2021-4034: PoC for PwnKit: Local Privilege Escalation Vulnerability in polkit’s pkexec ...]
  187. GitHub: https://github.com/qasj/CVE-2021-4034
    [CVE-2021-4034: First public golang implementation of CVE-2021-4034]
  188. GitHub: https://github.com/rayheffer/CVE-2021-4034
    [CVE-2021-4034: Exploit PoC for the polkit pkexec (PWNKIT) vulnerability]
  189. GitHub: https://github.com/scent2d/PoC-CVE-2021-4034
    [CVE-2021-4034: Pwnkit CVE-2021-4034]
  190. GitHub: https://github.com/tahaafarooq/poppy
    [CVE-2021-4034: CVE-2021-4034 PoC , polkit < 0.131]
  191. GitHub: https://github.com/TomSgn/CVE-2021-4034
    [CVE-2021-4034: Pkexec --> privilege escalation]
  192. GitHub: https://github.com/Xuanyaz/CVE-2021-4034
    [CVE-2021-4034: Polkit-pkexec local privilege escalation vulnerability]
  193. GitHub: https://github.com/zhzyker/CVE-2021-4034
    [CVE-2021-4034: Polkit pkexec Local Privilege Vulnerability to Add custom commands]
  194. GitHub: https://github.com/ziadsaleemi/polkit_CVE-2021-4034
    [CVE-2021-4034: Ansible role to patch RHSB-2022-001 Polkit Privilege Escalation - (CVE-2021-4034) ...]
  195. GitHub: https://github.com/Almorabea/pkexec-exploit
    [CVE-2021-4034: Pwnkit: Local Privilege Escalation in polkit's pkexec (CVE-2021-4034)]
  196. GitHub: https://github.com/arthepsy/CVE-2021-4034
    [CVE-2021-4034: PoC for PwnKit: Local Privilege Escalation Vulnerability Discovered in polkit’s ...]
  197. GitHub: https://github.com/DosAmp/pkwned
    [CVE-2021-4034: Proof of Concept for CVE-2021-4034 (with experimental traceless exploitation)]
  198. GitHub: https://github.com/GatoGamer1155/CVE-2021-4034
    [CVE-2021-4034: Script en python sobre la vulnerabilidad CVE-2021-4034]
  199. GitHub: https://github.com/Kirill89/CVE-2021-4034
    [CVE-2021-4034: Pkexec (Polkit) exploit of Privilege Escalation vulnerability CVE-2021-4034]
  200. GitHub: https://github.com/sofire/polkit-0.96-CVE-2021-4034
    [CVE-2021-4034: Centos 6.10 rpm for fix polkit CVE-2021-4034; centos ...]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2021-4034
CVSS V2 Vector: AV:L/AC:L/Au:N/C:C/I:C/A:C/E:H/RL:OF/RC:C
CVSS Base Score:7.2 (High)
Impact Subscore:10.0
Exploitability Subscore:3.9
CVSS Temporal Score:6.3 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.3 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:7.8 (High)
Impact Subscore:5.9
Exploitability Subscore:1.8
CVSS Temporal Score:7.5 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.5 (High)
STIG Severity [?]: I
STIG Risk Rating: High

Go back to menu.

Plugin Source


This is the EulerOS_SA-2022-1512.nasl nessus plugin source code. This script is Copyright (C) 2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
##
# (C) Tenable, Inc.
##

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(160009);
  script_version("1.3");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/26");

  script_cve_id("CVE-2021-4034");
  script_xref(name:"IAVA", value:"2022-A-0055");

  script_name(english:"EulerOS 2.0 SP10 : polkit (EulerOS-SA-2022-1512)");

  script_set_attribute(attribute:"synopsis", value:
"The remote EulerOS host is missing a security update.");
  script_set_attribute(attribute:"description", value:
"According to the versions of the polkit packages installed, the EulerOS installation on the remote host is affected by
the following vulnerabilities :

  - A local privilege escalation vulnerability was found on polkit's pkexec utility. The pkexec application is
    a setuid tool designed to allow unprivileged users to run commands as privileged users according
    predefined policies. The current version of pkexec doesn't handle the calling parameters count correctly
    and ends trying to execute environment variables as commands. An attacker can leverage this by crafting
    environment variables in such a way it'll induce pkexec to execute arbitrary code. When successfully
    executed the attack can cause a local privilege escalation given unprivileged users administrative rights
    on the target machine. (CVE-2021-4034)

Note that Tenable Network Security has extracted the preceding description block directly from the EulerOS security
advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional
issues.");
  # https://developer.huaweicloud.com/ict/en/site-euleros/euleros/security-advisories/EulerOS-SA-2022-1512
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?0f2e62c2");
  script_set_attribute(attribute:"solution", value:
"Update the affected polkit packages.");
  script_set_cvss_base_vector("CVSS2#AV:L/AC:L/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2021-4034");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploited_by_malware", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Local Privilege Escalation in polkits pkexec');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2022/01/25");
  script_set_attribute(attribute:"patch_publication_date", value:"2022/04/20");
  script_set_attribute(attribute:"plugin_publication_date", value:"2022/04/20");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:polkit");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:polkit-libs");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:huawei:euleros:2.0");
  script_set_attribute(attribute:"stig_severity", value:"I");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Huawei Local Security Checks");

  script_copyright(english:"This script is Copyright (C) 2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/EulerOS/release", "Host/EulerOS/rpm-list", "Host/EulerOS/sp");
  script_exclude_keys("Host/EulerOS/uvp_version");

  exit(0);
}

include("rpm.inc");

if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);

var release = get_kb_item("Host/EulerOS/release");
if (isnull(release) || release !~ "^EulerOS") audit(AUDIT_OS_NOT, "EulerOS");
var uvp = get_kb_item("Host/EulerOS/uvp_version");
if (release !~ "^EulerOS release 2\.0(\D|$)") audit(AUDIT_OS_NOT, "EulerOS 2.0 SP10");

var sp = get_kb_item("Host/EulerOS/sp");
if (isnull(sp) || sp !~ "^(10)$") audit(AUDIT_OS_NOT, "EulerOS 2.0 SP10");

if (!empty_or_null(uvp)) audit(AUDIT_OS_NOT, "EulerOS 2.0 SP10", "EulerOS UVP " + uvp);

if (!get_kb_item("Host/EulerOS/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);

var cpu = get_kb_item("Host/cpu");
if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$" && "aarch64" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "EulerOS", cpu);
if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_ARCH_NOT, "i686 / x86_64", cpu);

var flag = 0;

var pkgs = [
  "polkit-0.116-6.h4.eulerosv2r10",
  "polkit-libs-0.116-6.h4.eulerosv2r10"
];

foreach (var pkg in pkgs)
  if (rpm_check(release:"EulerOS-2.0", sp:"10", reference:pkg)) flag++;

if (flag)
{
  security_report_v4(
    port       : 0,
    severity   : SECURITY_HOLE,
    extra      : rpm_report_get()
  );
  exit(0);
}
else
{
  var tested = pkg_tests_get();
  if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
  else audit(AUDIT_PACKAGE_NOT_INSTALLED, "polkit");
}

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/EulerOS_SA-2022-1512.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\EulerOS_SA-2022-1512.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/EulerOS_SA-2022-1512.nasl

Go back to menu.

How to Run


Here is how to run the EulerOS 2.0 SP10 : polkit (EulerOS-SA-2022-1512) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Huawei Local Security Checks plugin family.
  6. On the right side table select EulerOS 2.0 SP10 : polkit (EulerOS-SA-2022-1512) plugin ID 160009.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl EulerOS_SA-2022-1512.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a EulerOS_SA-2022-1512.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - EulerOS_SA-2022-1512.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state EulerOS_SA-2022-1512.nasl -t <IP/HOST>

Go back to menu.

References


IAVA | Information Assurance Vulnerability Alert:
  • 2022-A-0055
See also: Similar and related Nessus plugins:
  • 157156 - CentOS 8 : polkit (CESA-2022:0267)
  • 157164 - Oracle Linux 6 : polkit (ELSA-2022-9073)
  • 157182 - Amazon Linux 2 : polkit (ALAS-2022-1745)
  • 157244 - FreeBSD : polkit -- Local Privilege Escalation (0f8bf913-7efa-11ec-8c04-2cf05d620ecc)
  • 157259 - Debian DSA-5059-1 : policykit-1 - security update
  • 157262 - Debian DLA-2899-1 : policykit-1 - LTS security update
  • 157414 - RHEL 7 : RHV-H security update (redhat-virtualization-host) 4.3.21 (Important) (RHSA-2022:0443)
  • 157807 - Rocky Linux 8 : polkit (RLSA-2022:267)
  • 158076 - RHEL 8 : Red Hat Virtualization Host security update [ovirt-4.4.10-1] (Important) (RHSA-2022:0540)
  • 158121 - OracleVM 3.4 : polkit (OVMSA-2022-0006)
  • 158856 - AlmaLinux 8 : polkit (ALSA-2022:0267)
  • 159099 - EulerOS 2.0 SP5 : polkit (EulerOS-SA-2022-1335)
  • 159256 - EulerOS 2.0 SP8 : polkit (EulerOS-SA-2022-1359)
  • 159322 - EulerOS 2.0 SP3 : polkit (EulerOS-SA-2022-1365)
  • 159781 - EulerOS 2.0 SP9 : polkit (EulerOS-SA-2022-1420)
  • 159800 - EulerOS 2.0 SP9 : polkit (EulerOS-SA-2022-1419)
  • 159992 - EulerOS 2.0 SP10 : polkit (EulerOS-SA-2022-1493)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file EulerOS_SA-2022-1512.nasl version 1.3. For more plugins, visit the Nessus Plugin Library.

Go back to menu.