Markakd / CVE-2022-2588

exploit for CVE-2022-2588
464 stars 71 forks source link

Update exp_file_credential.c #10

Closed johnckirk closed 1 year ago

johnckirk commented 1 year ago

When you add a new line to /etc/passwd, change "/root/root" to "root:/root" (i.e. remove a slash and add a colon). a) Adding the extra colon will treat "/root" as the home directory and "/bin/bash" as the shell, rather than treating "/bin/bash" as the home directory (which doesn't exist). b) Removing the leading slash will made the comment "root" rather than "/root" (or "/root/root"). This isn't essential, but it's unusual for a comment to start with a slash.

Markakd commented 1 year ago

thank you!