juju.re/jujure/static/svartalfheim/main.c
Julien CLEMENT 171c5040b2 add svartalheim writeup
Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
2024-04-11 10:33:38 +02:00

9 lines
295 B
C

int64_t _start()
{
int64_t path = '_';
syscall(sys_unlink {0x57}, &path);
int32_t fd = syscall(sys_open {2}, &path, O_CREAT | O_WRONLY);
syscall(sys_write {1}, fd, &__elf_header, 0x1a228);
syscall(sys_close {3}, fd);
syscall(sys_execve {0x3b}, &path, nullptr, nullptr);
}