Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Uninstrumented strace
# LD_PRELOAD=preeny/x86_64-linux-gnu/desock.so strace ./main < get
execve("./main", ["./main"], [/* 23 vars */]) = 0
brk(0) = 0x801000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd14ca18000
open("preeny/x86_64-linux-gnu/desock.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\24\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=18659, ...}) = 0
getcwd("/root", 128) = 6
mmap(NULL, 2240912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fd14c5d0000
mprotect(0x7fd14c5d3000, 2093056, PROT_NONE) = 0
mmap(0x7fd14c7d2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fd14c7d2000
mmap(0x7fd14c7d4000, 127376, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fd14c7d4000
close(3) = 0
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=18225, ...}) = 0
mmap(NULL, 18225, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd14ca10000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0po\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=141574, ...}) = 0
mmap(NULL, 2217264, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fd14c3b0000
mprotect(0x7fd14c3c9000, 2093056, PROT_NONE) = 0
mmap(0x7fd14c5c8000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7fd14c5c8000
mmap(0x7fd14c5ca000, 13616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fd14c5ca000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\37\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1840928, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd14ca1d000
mmap(NULL, 3949248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fd14bfe8000
mprotect(0x7fd14c1a3000, 2093056, PROT_NONE) = 0
mmap(0x7fd14c3a2000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ba000) = 0x7fd14c3a2000
mmap(0x7fd14c3a8000, 17088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fd14c3a8000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14664, ...}) = 0
mmap(NULL, 2109744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fd14bde0000
mprotect(0x7fd14bde3000, 2093056, PROT_NONE) = 0
mmap(0x7fd14bfe2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fd14bfe2000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd14ca17000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd14ca15000
arch_prctl(ARCH_SET_FS, 0x7fd14ca15740) = 0
mprotect(0x7fd14c3a2000, 16384, PROT_READ) = 0
mprotect(0x7fd14bfe2000, 4096, PROT_READ) = 0
mprotect(0x7fd14c5c8000, 4096, PROT_READ) = 0
mprotect(0x7fd14c7d2000, 4096, PROT_READ) = 0
mprotect(0x60e000, 4096, PROT_READ) = 0
mprotect(0x7fd14ca1a000, 4096, PROT_READ) = 0
munmap(0x7fd14ca10000, 18225) = 0
set_tid_address(0x7fd14ca15a10) = 13102
set_robust_list(0x7fd14ca15a20, 24) = 0
futex(0x7ffebd8ef3f0, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7fd14ca15740) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x7fd14c3b69f0, [], SA_RESTORER|SA_SIGINFO, 0x7fd14c3c0340}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7fd14c3b6a80, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7fd14c3c0340}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
futex(0x7fd14bfe30d0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
brk(0) = 0x801000
brk(0x822000) = 0x822000
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd14ca14000
socketpair(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0, [3, 4]) = 0
dup2(4, 503) = 503
close(4) = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fd14b5df000
mprotect(0x7fd14b5df000, 4096, PROT_NONE) = 0
clone(child_stack=0x7fd14bddefb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fd14bddf9d0, tls=0x7fd14bddf700, child_tidptr=0x7fd14bddf9d0) = 13103
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fd14adde000
mprotect(0x7fd14adde000, 4096, PROT_NONE) = 0
clone(child_stack=0x7fd14b5ddfb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fd14b5de9d0, tls=0x7fd14b5de700, child_tidptr=0x7fd14b5de9d0) = 13104
setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fd14a5dd000
mprotect(0x7fd14a5dd000, 4096, PROT_NONE) = 0
clone(child_stack=0x7fd14addcfb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fd14addd9d0, tls=0x7fd14addd700, child_tidptr=0x7fd14addd9d0) = 13105
open("/proc/self/task/13105/comm", O_RDWR) = 6
write(6, "libmicrohttpd", 13) = 13
close(6) = 0
shutdown(3, SHUT_RDWR) = 0
shutdown(5, SHUT_RDWR) = 0
shutdown(4, SHUT_RDWR) = 0
shutdown(5, SHUT_RDWR) = 0
shutdown(4, SHUT_RDWR) = 0
close(4) = 0
close(5) = 0
close(3) = 0
futex(0x7fd14bddf9d0, FUTEX_WAIT, 13103, NULL) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=503, events=POLLIN}], 1, 0) = 1 ([{fd=503, revents=POLLIN|POLLHUP}])
read(503, "", 65536) = 0
write(1, "hohihiha", 8hohihiha) = 8
exit_group(0) = ?
+++ exited with 0 +++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.