Skip to content

Instantly share code, notes, and snippets.

@vikiival
Created April 1, 2019 12:59
Show Gist options
  • Save vikiival/ae2e3af4bec9b65547250c26ba0c8c81 to your computer and use it in GitHub Desktop.
Save vikiival/ae2e3af4bec9b65547250c26ba0c8c81 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main() {
int id;
__asm__(
"mov $0x02000004, %%eax;"
"syscall;\n"
: "=a"(id)
);
// application gets user id
// you can find system call http://shell-storm.org/shellcode/files/syscalls.html
return 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment