feature or "feature?" one of my favorite "features" is espfix/espfix64
-
-
-
I quite like weird low-level features as well like ioperm/iopl/modify_ldt/personality. Unfortunately I'm not aware of any major users of these syscalls on Linux (interestingly, many of these got abused on Windows where they're even more undocumented and unsupported)
End of conversation
New conversation -
-
-
memfd_create is pretty cool, use with fexecve for launching ELFs from a buffer
-
#!/usr/bin/python3 import ctypes,os memfd_create = {'x86_64': 319} libc = ctypes.CDLL(None) arch = os.uname()[-1] fd_in_mem = libc.syscall(memfd_create[arch],"tempmem",0) file_like = os.fdopen(fd_in_mem, 'wb') file_like.write(elf_bytes) os.execve(fd_in_mem, (new_name,), new_env)
End of conversation
New conversation -
-
-
That when you fork(), you share the same file pointer for open files - a seek() in one process moves the pointer in the other.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Fork/exec is pretty cool, if a boring answer.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Using Unix domain sockets again: the ability to query the credentials of the peer (getpeereid, getsockopt with SO_PEERCRED, getpeerucred), so a server can perform fine-grained access control using the euid or egid of the client. This is how you gain privileges without suid.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
kqueue - epoll done right, two years early
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
BSD open(). When you forget the 3rd variadic argument to pair with O_CREAT, you get a new file with random permissions pulled from the stack and no compiler error from gcc.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.