CVE-2021-4034 icon indicating copy to clipboard operation
CVE-2021-4034 copied to clipboard

[!] Error Execute on UBUNTU SERVER with no gcc [!]

Open instagmag opened this issue 3 years ago • 7 comments

./cve-2021-4034-poc sh: 1: gcc: not found GLib: Cannot convert message: Could not open converter from 'UTF-8' to 'PWNKIT' The value for the SHELL variable was not found the /etc/shells file

Polkit (pkexec --version) pkexec version 0.105

KERNEL (uname -a) Linux new-server1 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

instagmag avatar Jan 26 '22 18:01 instagmag

I've had the same problem, so I compiled the binary and the library separately (only for x86 64) and made an archive from the working check. It has a test-remote.sh script, pass to it a hostname (example.com, [email protected], the name of an entry from your SSH config, ..., whatever scp takes) and it will upload PwnKit to the host, run the exploit and if you get a shell, well, the host is vulnerable. And then use it to fix it (either update policykit or chmod 0755 /usr/bin/pkexec).

pwnkit-check.zip

toxyl avatar Jan 26 '22 19:01 toxyl

GLib: Cannot convert message: Could not open converter from “UTF-8” to “PWNKIT” The value for the SHELL variable was not found the /etc/shells file

kylincodelab avatar Jan 27 '22 01:01 kylincodelab

./cve-2021-4034-poc sh: 1: gcc: not found GLib: Cannot convert message: Could not open converter from 'UTF-8' to 'PWNKIT' The value for the SHELL variable was not found the /etc/shells file

Polkit (pkexec --version) pkexec version 0.105

KERNEL (uname -a) Linux new-server1 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

sudo apt update sudo apt install build-essential

anupamjaiswall avatar Jan 27 '22 05:01 anupamjaiswall

install gcc

babyshen avatar Jan 28 '22 01:01 babyshen

install gcc

not always a good idea, especially not when you are testing production servers

toxyl avatar Jan 28 '22 12:01 toxyl

Related PR: https://github.com/arthepsy/CVE-2021-4034/pull/2

kenorb avatar Jan 28 '22 13:01 kenorb

GLib: Cannot convert message: Could not open converter from “UTF-8” to “PWNKIT” The value for the SHELL variable was not found the /etc/shells file

Any solution for this? I am facing same issue

ParnaviKulkarni avatar Apr 23 '23 05:04 ParnaviKulkarni